Subject Re: [firebird-support] Why does FB evaluate numbers this way?
Author Stefan Heymann
> select (3/2)
> from rdb$database
>
> The result should be 3/2 = 1.5. Instead I get 1. Why?

3 is an integer, 2 is an integer. You are performing an integer
division.

select (3.0/2) will also bring up 1.5
A float or decimal type is a "larger" type than integer and the larger
type will determine the type of the operation.


HTH

Regards

Stefan



--
Stefan Heymann
www.destructor.de/firebird