Subject: Re: Very small numbers from awk's rand()
To: Ray Phillips <r.phillips@mailbox.uq.edu.au>
From: Chris Rupnik <chrisr@geeknet.montreal.qc.ca>
List: port-alpha
Date: 05/09/2000 23:03:48
Something has to be wrong here, as i get the following from my netbsd
1.4/sparc
0.487477
0.0715607
0.00395315
0.832913
0.765252
0.599829
0.131783
0.88603
0.0732417
0.34195
How can these be the same?
Chris
On Wed, 10 May 2000, Ray Phillips wrote:
> Dear Port Alpha:
>
> Can anyone tell me why NetBSD/alpha 1.4.1's awk's rand() function produces
> such small results?
>
> Typing this command
>
> awk '{for(i=1;i<=10;i++) print rand(); exit}'
>
> followed by two <returns> gives this output:
>
> 1.135e-10
> 1.66615e-11
> 9.20415e-13
> 1.93928e-10
> 1.78174e-10
> 1.39659e-10
> 3.06831e-11
> 2.06295e-10
> 1.70529e-11
> 7.96164e-11
>
> but on a NetBSD/i386 system the result is:
>
> 0.487477
> 0.0715607
> 0.00395315
> 0.832913
> 0.765252
> 0.599829
> 0.131783
> 0.88603
> 0.0732417
> 0.34195
>
> which seems much more reasonable.
>
>
> Ray Phillips
>
>
>