Comparing double and float values
Don
nospam at nospam.com
Fri May 13 00:12:00 PDT 2011
Matthew Ong wrote:
> Hi Alexander,
>
> Is there anyway to ensure the comparison of float/double to be done with the raw
> bits like in Java
> Double.doubleToRawLongBits(double value)
>
> http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Double.html#doubleToRawLongBits%28double%29
>
> when it comes to financial data and percentage computation, that seems to be
> rather important.
>
> Thanks in advance.
>
> Matthew Ong
std.math.isIdentical().
I doubt it would ever be appropriate to use this in a financial context,
it's more for precise testing of math functions.
Note that, for example, isIdentical(-0.0, +0.0) returns false.
More information about the Digitalmars-d
mailing list