Subject | Re: [ib-support] Re: 3 * 1/3 = 0 ??? |
---|---|
Author | Svein Erling Tysvaer |
Post date | 2002-08-30T15:53:17Z |
At 01:16 31.08.2002 +1000, you wrote:
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
>Others think it should conform to the SQL standard. Dialect 1 - which youSure, I agree that Firebird should conform to the SQL standard, but does
>call "proper" doesn't. Dialect 3: integer/integer results in integer,
>which will always cause reals to be truncated back.
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