On Sat, Dec 02, 2000 at 03:46:30PM -0600, Jarkko Hietaniemi wrote: > In alpha where sizeof(long long) == sizeof(long) == sizeof(double) == 8: > > imprecision=18446744073709552000.0 max=lu > imprecision == (double) max ^ eh? > You can see how the low order bits fade into garbage... so both == aren't true? good. > (btw, fwiw, long long is still thought to be a non std language extension, > so in the actual test we should use UV) I was doing so. It's just clearer for the test case to use the compiler's types. As I have been taught by rote by someone who likes ANSI C, long long breaks utterly the commitment that ANSI C (1989) makes that long is the longest integer type. and therefore should never be allowed to exist. (He's an idealist. His opinion is that if you need 64 bits define a new ABI where sizeof int is 4, sizeof long is 8. If your programs break at this point, then fix 'em. They're making unwarranted assumptions and are not portable) [OK, I'm not asking to be told how many programmer years of toil it would take to recode all programs to cope with sizeof long increasing, versus just defining long long to be longer than long. We both realise that's why long long exists] is it safe to assume that the macros Strtol and Strtoul point to long long versions if IV/UV are long long? Nicholas ClarkThread Previous | Thread Next