float storage and usage



Greetings.

I need to convert some columns of type numeric(12, 0) to hold floating point
information scale and precision I can't determine in advance (customer data
can vary wildly) so I wanted to use the datatype that offers the maximum scale
and precision..

I'm targeting sql server 2005 systems (not 2000).

It seems my choices are real and float, and the docs seem to indicate that
float offers with widest ranges.

I'm trying out using the 'float' for the new data type as the default
precision is said to be 53.. Does this mean the total number of digits is up
to 53?

I don't know if there is anything else I need to take into account since these
two columns are part of a primary key, and I supposed, therefore, are indexed.

thanks
Jeff Kish
.



Relevant Pages

  • Re: Losing Precision from FLOAT in DBD::Informix
    ... The versions of CSDK and IDS are also not ... STSM, Informix Database Engineering, IBM Data Management ... >> are declared FLOAT. ... >> - where and why is the precision lost? ...
    (perl.dbi.users)
  • Re: converting float to double
    ... >> insists that I read the stock prices as float. ... >> Since everywhere else the system uses double to hold these prices, ... A 64 bit integer will correctly model currency to 18 digits (with ... calcuations in 110 digits of precision (so that things like interest ...
    (comp.lang.c)
  • Re: one-liner for characater replacement
    ... (previous snip, someone wrote) ... integer divide as a coefficient of a float polynomial. ... They consider magnitude, but not precision, so int to float is ...
    (comp.lang.fortran)
  • Re: 32/64 bit cc differences
    ... Your pseudo-random number generator produces `float' values. ... format whose range and precision may be greater than ... eliminating all floating-point calculation from the program. ... a purely-integer PRNG, and use purely-integer arithmetic on what ...
    (comp.lang.c)
  • RE: Losing Precision from FLOAT in DBD::Informix
    ... Subject: Losing Precision from FLOAT in DBD::Informix ... An SQL FLOAT in Informix is equivalent to a C double. ... The alternative way to work it is to modify the switch so that the SQLFLOAT ... You may need to choose a different format for the value than ...
    (perl.dbi.users)