Subject | FLOAT value storage problems in Interbase 6.x |
---|---|
Author | mario1fb |
Post date | 2005-07-08T10:12:45Z |
I am struggling with the strange Interbase behaviour of storing simple
float values.
All of the float values, except for integers (e.g. 4 ) and half values
(e.g. 4.5), are unpredictably rounded up or down to several decimal
places, once entered into FLOAT type fields.
e.g. after entering a value of 4.4, it appears stored as 4.40000009536743,
4.1 becomes stored as 4.09999990463257, etc...
Why ??
Is there a method of storing these float values exactly as entered ?
And most importantly, does Firebird 1.5x resolve this strange float
storage behaviour ?
If this was the case, then for me it would be the most compelling
reason to migrate my databases from Interbase to Firebird !
Mario
float values.
All of the float values, except for integers (e.g. 4 ) and half values
(e.g. 4.5), are unpredictably rounded up or down to several decimal
places, once entered into FLOAT type fields.
e.g. after entering a value of 4.4, it appears stored as 4.40000009536743,
4.1 becomes stored as 4.09999990463257, etc...
Why ??
Is there a method of storing these float values exactly as entered ?
And most importantly, does Firebird 1.5x resolve this strange float
storage behaviour ?
If this was the case, then for me it would be the most compelling
reason to migrate my databases from Interbase to Firebird !
Mario