[Detroit-pm] Strange problem with simple math in perl
Craig Maloney
craig at decafbad.net
Thu Nov 12 07:50:32 PST 2009
On Thu, 2009-11-12 at 10:34 -0500, Jim McQuillan wrote:
> That's awfully close to the right answer, but I'm depending on perl to
> be useful for calculating account balances.
>
You might want to use integer math for this instead ( multiply by 100,
then do the subtraction). That'll guarantee you won't get bit by some
float anomaly.
--
--------------------------------------------------------------------
Craig Maloney (craig at decafbad.net) http://decafbad.net
"Work hard, rock hard, eat hard, sleep hard, grow big,
wear glasses if you need 'em." -- The Webb Wilder Credo
More information about the Detroit-pm
mailing list