> By the way, is there a perl module to do calculations with money?

We use Math::BigInt to do fixed point.  We couldn't get the other math
modules to work a few years back.  Our wrapper (Bivio::Type::Number)
normalizes the rounding and allows subclasses to specify precision,
decimals, min, max, etc.  It's not fast, but fast enough. :-)
It's part of bOP, which is available under the Artistic license from
http://www.bivio.biz/hm/download-bOP

We don't do too much math in the database, i.e. with PL/SQL and such.
One thing we have done which has really helped is to define the sign
of all amounts/quantities so that we can use SQL's SUM() function.
Our database is normalized, which speeds development and reduces bugs.
Using SUM() keeps queries fast (<100MS) even processing ~1K rows to
produce a portfolio.

Cheers,
Rob

Reply via email to