Re: Problem with floats
Posted in 1999
Topics: Data Types & Schema Design, Third-Party Tools & Monitoring
Hello Jussi, about you problem, I recommend you to change the datatype from float to decimal(15,0). The datatype INTEGER can store only 10^9. The FLOAT datatype, must be used for cientific purpose only. The float number is stored with the formula: (Mantissa * e) ^ Exponent. At 03:04 PM 1/25/99 +0200, you wrote: >We have noticed an annoying feature (?) in float data type. We have a >table which has float column used only with large integer values, i.e. >integers from 10^6 up to 10^10. Sometimes Informix changes the values a >little, for example 102658875,0 becomes 102658874,9999999. > >We haven't found any common situation where the problem would arise, it >just happends few times a year. The table is not updated very >frequently, only few times a week. The float type is used because of >historical reasons, and changing it to integer is not the worth of the >work. > >Anyone seen anything like it before? Could it have something to do with >Informix internal presentation of floating point numbers? > >Thanks, > >Jussi Paasonen >System Specialist >Helsinki Exchanges > | Valmir Vicente Minella | ########################### Analista de Suporte Sul Fabril S.A fone: 047-331-1444 fax: 047-331-1188 Blumenau S.C - Brazil ########################### http://www.sulfabril.com.br