[mercury-users] a typeclassful random.m

Peter Schachte schachte at csse.unimelb.edu.au
Mon Feb 19 16:47:05 AEDT 2007


Richard A. O'Keefe wrote:

>
> --------------------------------------------------------------------------
> mercury-users mailing list
> Post messages to:       mercury-users at csse.unimelb.edu.au
> Administrative Queries: owner-mercury-users at csse.unimelb.edu.au
> Subscriptions:          mercury-users-request at csse.unimelb.edu.au
> --------------------------------------------------------------------------



>     However, there are quite a few applications of random floating point    
>     numbers where returning 0.0 would be a devastating bug.  It took me
>     ages to get my head around this.  I even patched a copy of the
>     Mersenne Twister code to "fix" what I thought was the "bug" of not
>     returning 0.0.  Until the day I happened to have one of those uses
>     where 0.0 really won't do, and I was Enlightened.  (Oh.  Other people
>     really are smarter than me.)

Hi Richard,

So are you saying that there should be a function to return a float in [0.0,
1.0) and another for (0.0, 1.0), or that only the latter is desirable?

-- 
Peter Schachte              The ruling class has the schools and press under
schachte at cs.mu.OZ.AU        its thumb. This enables it to sway the emotions
www.cs.mu.oz.au/~schachte/  of the masses.
Phone: +61 3 8344 1338          -- Albert Einstein
--------------------------------------------------------------------------
mercury-users mailing list
Post messages to:       mercury-users at csse.unimelb.edu.au
Administrative Queries: owner-mercury-users at csse.unimelb.edu.au
Subscriptions:          mercury-users-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the users mailing list