[Dbi-interbase-devel] rounding in IB 5.6 (Sco) with perl]
Status: Beta
Brought to you by:
edpratomo
From: Bill K. <bi...@so...> - 2001-09-04 05:08:35
|
Hi, > > I have a field in the db which is numeric(15,2) > > When I sum in isql I get: > > SUM > ====================== > > 1858.7500 > > Field values are as follows: > > COIN > ====================== > > 222.25 > 333.33 > 444.55 > 666.66 > 111.11 > 0.00 > 0.00 > 80.85 > > When I extract using perl and add the values I get: 1858.74 > > Why? > > Should I be rounding before adding as a previous post suggests? > > > If so, does anyone know how to round to 2 decimal places in perl > (apart from sprintf) > > thanks > bill |