For Programmers: Free Programming Magazines  


Home > Archive > Fortran > June 2007 > Why was "unsigned integer" not considered as a native data type in Fortran









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Why was "unsigned integer" not considered as a native data type in Fortran
analyst41@hotmail.com

2007-06-20, 10:06 pm

>From what I understand from the simulation expert's posts, he was able
to generate Pseudo-Random numbers very efficiently with C, using
unsigned integers.

I can see that the unsigned integer type could be quite useful and
would the experts please explain why it couldn't be introduced as a
native data type in Fortran ?

Also,

If we are using N bits to represent integers,

The set of integers from -2**(N/2) to 2**(N/2) - 1 can be obtained by
translating the set of unsigned integers from 0 to 2**N - 1 by the
constant -2**(N/2).

Can this fact be used to efficiently define unsigned integers as a
derived data type ?

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com