Subject Re: [ib-support] Re: 3 * 1/3 = 0 ???
Author Svein Erling Tysvaer
At 01:16 31.08.2002 +1000, you wrote:
>Others think it should conform to the SQL standard. Dialect 1 - which you
>call "proper" doesn't. Dialect 3: integer/integer results in integer,
>which will always cause reals to be truncated back.

Sure, I agree that Firebird should conform to the SQL standard, but does
that standard say that intermediate results should conform to it, i.e. that
integer*(integer/integer) should evaluate to integer*integer=integer, or is
it only concerned about the final result, i.e. could
integer*(integer/integer) evaluate (as an intermediate step) to
integer*<something> as long as the final result is integer? To me, it at
least sounds logical that integer*(integer/integer) should equal
(integer*integer)/integer, but currently (3*1)/3 = 1 whereas 3*(1/3) = 0 (I
haven't tested that, but that is what I have reasoned from this discussion).

Set
-giving Roger some moral support, but not to the extent of deviating from
the SQL standard