[Discuss] Financial database / balance?

Richard Pieri richard.pieri at gmail.com
Sun Jan 15 18:22:07 EST 2012


On Jan 15, 2012, at 6:19 PM, markw at mohawksoft.com wrote:
> 
> To address the assertion that you can't represent some numbers "exactly,"
> this is partially true. You can use doubles for calculation, but you can't
> just use printf( "%f"); to display the value. You need to play some
> tricks. with floor(), ceil(), and round().

This clarifies things a bit for me.  It's not that you are recommending the use of doubles.  It's that you are suggesting the use of doubles plus some tricks that the average programmer isn't going to know to use or how to use them correctly.  If so then I see it as more reason to avoid IEEE floating point math for this.

--Rich P.




More information about the Discuss mailing list