| Deutsch English Français Italiano |
|
<6673445d$0$708$14726298@news.sunsite.dk> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!news.mixmin.net!weretis.net!feeder8.news.weretis.net!usenet.goja.nl.eu.org!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail Date: Wed, 19 Jun 2024 16:49:33 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Fortran, no RAN ? Newsgroups: comp.os.vms References: <v4n3gt$1019$1@i2pn2.org> <v4n8sb$5g4b$2@dont-email.me> <v4ocuf$vft$2@i2pn2.org> <v4qcbm$urij$1@dont-email.me> <6670cba7$0$719$14726298@news.sunsite.dk> Content-Language: en-US From: =?UTF-8?Q?Arne_Vajh=C3=B8j?= <arne@vajhoej.dk> In-Reply-To: <6670cba7$0$719$14726298@news.sunsite.dk> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Lines: 33 Message-ID: <6673445d$0$708$14726298@news.sunsite.dk> Organization: SunSITE.dk - Supporting Open source NNTP-Posting-Host: d4bdf1ee.news.sunsite.dk X-Trace: 1718830173 news.sunsite.dk 708 arne@vajhoej.dk/68.14.27.188:15617 X-Complaints-To: staff@sunsite.dk Bytes: 1893 On 6/17/2024 7:49 PM, Arne Vajhøj wrote: > But if RNDOM is REAL*4 then my guess would be: > > RAN_LONGER_CYCLE(SEED1, SEED2) > > Example: > > real*4 function ran2arg(seed1, seed2) > implicit none > integer*4 seed1, seed2 > integer*4 temp > real*4 dummy > temp = xor(seed1, seed2) > ran2arg = ran(temp) > seed1 = xor(ishc(seed1, 1), temp) > seed2 = xor(ishc(seed2, -1), temp) > end > > Disclaimer: I do not know if the cycle from this one is actual longer. I did an experiment with start seeds 1234567 and 7654321. I aborted after burning a little over 2 CPU hours. No cycle detected after 1281 billion calls. That doesn't prove that cycle will always be longer. But it does not provide any basis for pessimism either. Arne