comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » randomn problem
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
randomn problem [message #52956] Sun, 11 March 2007 11:24 Go to next message
askemer is currently offline  askemer
Messages: 4
Registered: March 2007
Junior Member
Hi all,

I was playing around with randomn and noticed some weird behavior:

IDL> print, stddev(randomn(seed, 1e7))

I consistently get back numbers around ~0.992. I've tried it on a
different computer, and the result was not exactly the same, but
similar. If I change 1e7 to 1e8, the problem gets worse, and I get
~0.853. I've tried the syntax with floats, integers, and longs, and I
still get the same answer. Does anyone know what could be going on?

-Andy
Re: randomn problem [message #53019 is a reply to message #52956] Tue, 13 March 2007 11:15 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
askemer@gmail.com writes:

> Thanks for all the help. It's still curious that older versions of
> IDL seem to do better (ie default use double), and that David
> Fanning's windows 6.3 works while the linux versions don't.

I wouldn't read TOO much into that! :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: randomn problem [message #53020 is a reply to message #52956] Tue, 13 March 2007 10:05 Go to previous message
askemer is currently offline  askemer
Messages: 4
Registered: March 2007
Junior Member
Thanks for all the help. It's still curious that older versions of
IDL seem to do better (ie default use double), and that David
Fanning's windows 6.3 works while the linux versions don't.

-Andy
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Material properties for object graphics
Next Topic: Sky Falling, etc. : Array substitution + addition with plus-equal (+=)

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:56:53 PDT 2025

Total time taken to generate the page: 0.00472 seconds