Rounding real numbers to X decimal places

jicman cabrera_ at _wrc.xerox.com
Fri Mar 9 11:49:16 PST 2007


Greetings!

Forgive me for this stupid question, but I have searched all over digitalmars
and std.math and I can not find a round(real,places) where real is a real
number and places is an integer suggesting the decimal places to round to.  I
had to do a subroutine for this using std.math.ceil() and some multiplication.
 But, is there a function in std.math, or anywhere to do this?

thanks,

josé


More information about the Digitalmars-d-learn mailing list