Re: freepascal random gives different results for x86_64 and i386
by Jonas Maebe <Jonas.Maebe@[EMAIL PROTECTED]
>
Sep 27, 2007 at 02:57 PM
In article <1190897485.781162.294770@[EMAIL PROTECTED]
>,
harga <info@[EMAIL PROTECTED]
> wrote:
> I wonder whether some already came across this: when compiling a
> program under x86_64 the random() function call returns doubles within
> the range of -0.5 to 0.5, while
> when I compile it on a i386-machine it returns values between 0 and 1
> as it should.
>
> Any ideas how I can prevent this? Do I need a special compiler switch
> under x86_64 to get the normal random() behaviour?
That sounds like a bug in the x86_64 code generator, as the random
procedure is identical for i386 and x86_64 (and it also works fine on
ppc64, so it's not a 32 vs 64 bit issue).
Please submit a bug re****t with a compilable example program at
http://www.freepascal.org/mantis
Jonas