Subject Re: [firebird-support] best type for storing 0.686956521739130434782?
Author Ann Harrison
On Thu, Feb 2, 2012 at 6:50 AM, angel_ignacio_colmenares
<angel_ignacio_colmenares@...> wrote:
> I'm writing a firebird provider for ServiceStack.OrmLite and unit tests
> ask for store  the value : 0.686956521739130434782 in a table.
> the datatable is simple:
>
> CREATE TABLE TEST
> (
>    v1 float,
>    v2 float
> );


Float is a useless datatype, having only seven digits of decimal
precision. You'll do better with double - with about 16 decimal
digits of precision. Even that isn't enough for an accurate
representation of your number, which needs 21 digits. I think the
closest you'll come is decimal [19,19]

Ann