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

Home » Public Forums » archive » random numbers in version 4.0
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
random numbers in version 4.0 [message #10398] Tue, 25 November 1997 00:00
Kirt Schaper is currently offline  Kirt Schaper
Messages: 6
Registered: February 1997
Junior Member
Has anyone else encountered odd behavior with random numbers in
IDL version 4.0? Specifically, if you repeatedly generate an odd
number of random numbers with the same seed, you don't get the same
numbers (strictly speaking, you do get the same numbers, but shifted
one position). For example:

% idl
IDL. Version 4.0.1 (sunos sparc).
Copyright 1989-1995, Research Systems, Inc.
All rights reserved. Unauthorized reproduction prohibited.
Installation number: XXXXXXX.
Licensed for use by: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Initial setup: quiet=1, order=0
IDL> seed = 10.
IDL> s = seed & print,randomn(s,3)
2.10917 1.36675 -1.02318
IDL> s = seed & print,randomn(s,3)
-0.568035 2.10917 1.36675
IDL> s = seed & print,randomn(s,3)
2.10917 1.36675 -1.02318
IDL> s = seed & print,randomn(s,3)
-0.568035 2.10917 1.36675

This behavior has been repeated on HPUX, Digital UNIX and Solaris
version of IDL. It seems to have gone away in version 5 but we
are stuck with version 4.0 until the convolv 2X slowdown in
version 5 is fixed.

kt
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: ingesting GRIB files?
Next Topic: Re: box plot

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

Current Time: Fri Oct 10 05:41:05 PDT 2025

Total time taken to generate the page: 0.72243 seconds