[mercury-users] [Feature request] Printing reasonable floats/printer pred

doug.auclair at logicaltypes.com doug.auclair at logicaltypes.com
Mon Feb 12 14:30:04 AEDT 2007


Dear Ralph, you wrote:

>I think the solution that would satisfy 99% of users would be to simply
>trim redundant trailing zeroes from floats unless a specific precision
>has been specified.

I must be a 1%er then (I always knew I was 'special'), because this doesn't
work in my specific (or, more generally, in my general) situation -- when
the RNG gives me a value (which I then convert into N / RandMax float),
I only care about one digit of precision, but it has many other (usually
non-zero) numbers trailing what I care about.

In the general case, when I'm printing a float, I almost always only care
about one or two digits of precision, some of the time the other digits
are zero, but not very often, because when I'm dealing with floats, I more
often than not have a good deal of noise or randomness "below the radar".

It's more work than automatic zero truncation, but could user control
over printing (precision) please be worked in for objects (floats)?

Sincerely,
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