Dalibor
Unless of course your accounting in fractions of cents (which does
happen quite a lot)
Neven
:
On Apr 21, 5:38 pm, Richard Clark <[email protected]> wrote:
2. Don't use floating point numbers to manage currency. They're they
lossy compression of numerics and you can end up with some unpleasant
surprises.
I.e.
if (0.1 + 0.2 == 0.3)
echo "Roger roger";
else
echo "WAT?!";
>> WAT?!
Or you can bypass the whole issue by working in cents :-)
dali
--
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]