Subject Re: [ib-support] Re: 3 * 1/3 = 0 ???
Author Geert Bevin
For what it's worth, in postgres, mysql and oracle

select (3*1)/3;

Produces 1

Svein Erling Tysvaer wrote:
> 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
>
>
>
> To unsubscribe from this group, send an email to:
> ib-support-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>



--
Geert Bevin Uwyn
"Use what you need" Lambermontlaan 148
http://www.uwyn.com 1030 Brussels
gbevin@... Tel & Fax +32 2 245 41 06