Subject Rounding/division error???
Author Bradley Tate
Hi

My compatriots have an issue with Firebird 1.5 rounding or dividing. On
any database:

select round(2 / 3, 2) as Field1, 2.0 / 3.0 as field2, round(2.0 / 3.0,
2) as field3, round(2.0000 / 3.0000, 2) as field4 from Table

Field 1 is 0 (OK)
Field 2 is 0.66 (expected 0.6666666666667 or similar)
Field 3 is 0.66 (expected 0.67)
Field 4 is 0.67 (OK)


This seems very wrong to me, and is certainly different from the values
returned from SQL Server, Postgresql and Foxpro which seem to round
properly. Can someone shed any light on this behaviour?

Cheers,

Bradley.