www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Walter, plz make std.math.mfreq() a public function

reply David L. Davis <SpottedTiger yahoo.com> writes:
Walter: I found the std.math.mfreq( real x, real y, real precision ) function to
be very useful in the unittesting of real values in my current project, could
you make it a public function? Cause I think others will find as useful as I
have (plus I wouldn't have to copy it locally, just to change it from a private
function to public one). :P

Also are there any rounding type functions in Phobos, I've been looking around
in the code, and thus far I haven't seen any.


-------------------------------------------------------------------
"Dare to reach for the Stars...Dare to Dream, Build, and Achieve!"
Jul 17 2004
parent "Walter" <newshound digitalmars.com> writes:
"David L. Davis" <SpottedTiger yahoo.com> wrote in message
news:cdcfol$1pk9$1 digitaldaemon.com...
 Walter: I found the std.math.mfreq( real x, real y, real precision )
function to
 be very useful in the unittesting of real values in my current project,
could
 you make it a public function? Cause I think others will find as useful as
I
 have (plus I wouldn't have to copy it locally, just to change it from a
private
 function to public one). :P
mfreq() is, frankly, a lousy function. I don't want to enshrine it and thereby have it live forever <g>. A properly written one would interpret the 'precision' as the number of bits in the mantissa that should match.
 Also are there any rounding type functions in Phobos, I've been looking
around
 in the code, and thus far I haven't seen any.
You can use any of the ones from C99's math.h.
Jul 17 2004