Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Pascal Misc > Re: freepascal ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 4 of 4 Topic 758 of 811
Post > Topic >>

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
 




 4 Posts in Topic:
freepascal random gives different results for x86_64 and i386
harga <info@[EMAIL PRO  2007-09-27 05:51:25 
Re: freepascal random gives different results for x86_64 and i38
harga <info@[EMAIL PRO  2007-09-27 05:55:39 
Re: freepascal random gives different results for x86_64 and i38
Jonas Maebe <Jonas.Mae  2007-09-27 16:32:09 
Re: freepascal random gives different results for x86_64 and i38
Jonas Maebe <Jonas.Mae  2007-09-27 14:57:33 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Jul 24 12:46:18 CDT 2008.