[mercury-users] Converting time_t to int using common library?

doug.auclair at logicaltypes.com doug.auclair at logicaltypes.com
Thu Feb 15 02:03:41 AEDT 2007

... and while we're on the topic ...

I'm generating many random floats, and it would be nice to extend
random to have a pred that returns a random value between 0.0
and 1.0 ... of course, it is doable with

randmax(Maxie, !RNG),
random(Intie, !RNG),
Floatie = float(Intie) / float(Maxie)

but I worry about the randomness of the float value returned
(should I?), and it seems like a lot of unnecessary work retrieving
or passing Maxie around all the time to get a random float value,

[feature request] please add a predicate to the random module
that gives a float between 0.0 and 1.0, and if there's a need
[feature request] please add a predicate that returns a random
float value between MINFLOAT and MAXFLOAT.

Doug Auclair

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