Subject Re: [firebird-support] Datatype Numeric rounding issues
Author Martijn Tonies
Hi,

> I`m kinda confused about how Firebird rounds numeric datatypes. Here`s
> an example:
>
> SELECT CAST(3.6648 AS NUMERIC(9, 2)) FROM rdb$database
> Results in: 3.66
>
> SELECT CAST(3.6648 AS NUMERIC(9, 3)) FROM rdb$database
> Results in: 3.665
>
> My question: should`nt it result in 3.67 in first example? Tested on
> `Firebird_2_1_0_17735-0_Win32` and `Firebird_2_0 `
>
> Tried dialect 1 and 3 too

http://en.wikipedia.org/wiki/Rounding

Check for "round-to-even" or "bankers' Rounding".

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com