Subject Re: [ib-support] Float data type
Author Stevio
I should give more information.

What I am actually trying to do is to store a Dewey Number. However, one of
the users wants to be able to search within a range of Dewey Numbers, e.g.
to return all books in the system between 658.05 and 658.09.

Therefore, I think storing them as a float with up to 6 decimal places would
be best. However, you say that floats are not stored exactly, when I want
this to be an exact number.

Any ideas?

Thanks,
Stephen

----- Original Message -----
From: "Svein Erling Tysvær" <svein.erling.tysvaer@...>
To: <ib-support@yahoogroups.com>
Sent: Friday, June 21, 2002 4:48 PM
Subject: Re: [ib-support] Float data type


> >I am going to create a new table and I want to include a datatype that is
> >similar to a float.
> >Please note that the 3 digits before the decimal point are a must, even
when
> >they are 0. e.g. 004.232 but the digits after the decimal point, and the
> >decimal point itself, are optional.
> >Anyone got any suggestions?
>
> Leading zeroes doesn't sound like similar to a float. If it is, beware of
> rounding problems (floats are not stored exactly)! To me this sound like a
> string - unless you are doing any calculations like adding to or
> multiplying your type, of course.
>
> HTH,
> Set