Subject CAST/ Round disparity 1.5->2.1
Author Alan McDonald
You can probably poke your finger at this with disdain but this simplified
query has always returned 65.57 up thru FB1.5.5
But now in FB2.1 it returns 65.56

SELECT
CAST(CAST(1.5 AS NUMERIC(18,2))
* CAST(43.71 AS NUMERIC(18,2))
* (CAST(0.00 AS DOUBLE PRECISION)/100+1.00)
AS NUMERIC(18,2))
AS ITEMTOTAL
FROM RDB$DATABASE

The zero value in the double cast is a constant in this context but it's not
in real life.
It has something to do with this cast as double precision - it's changed in
FB2.1.
My focus here is on loss of consistency, not precision.

Does anyone know why consistency has been altered? Is it because some grave
fault was discovered i.e. precision was in error all this time?

 regards
 Alan McDonald