it seems to be an anti-patternNo. It is not an anti-pattern here at all.
In fact is is the ONLY sensible thing to do.
That floats are not suitable to reprensent monetary amounts (ultimately because 0.1 is not a finite decimal in binary) is in fact so well known and has been so many times advised against that I am in fact surprised that anybody would consider this even for a second.
In reply to Re^3: Floating point problems
by morgon
in thread Floating point problems
by bluescreen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |