Subject Re: [ib-support] Re: 3 * 1/3 = 0 ???
Author Helen Borrie
At 03:09 PM 30-08-02 +0000, you wrote:
>I hope you didn't think we thought that (1/3) * 3 should equal 1.
>Read the manual, where it clearly states that right means wrong, 1/3
>means 0, and Madrid is the capital of France.
>
>Oops, sorry, that sounds a bit sarcastic. But I do feel quite
>strongly that there should be a reasonably close relationship between
>the arithmetic of "normal" people, and the arithmetic of our chosen
>database.

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.

So, for your n/integer calculations, be sure to make n a real in order to
ensure that your result is a real.

Check out:

1.0/3

heLen