On Mon, Apr 26, 2004 at 07:33:09AM +0200, Marcus Holland-Moritz <[EMAIL PROTECTED]> wrote: > Ok, I found it... :)
Good job! > Looking at the generated assembly code revealed that casting 'double' > to 'unsigned long long' calls __fixunsdfdi(). GCC implements this > function, as does OpenBSD's libc (!). Now, the cool thing is that > casting works as long as you do _not_ link libc to your executable. > I you do (and Perl does), you start getting wrong results for values > larger 2**32: Does openbsd libc also have a buggy __fixunsxfdi? If not, a workaround would be assigning to a long double and then casting to unsigned long long.
