Ver Mensaje Individual
  #4  
Antiguo 12-03-2009
Avatar de Casimiro Noteví
Casimiro Noteví Casimiro Noteví is offline
Merodeador
 
Registrado: sep 2004
Ubicación: En algún lugar.
Posts: 32.671
Reputación: 10
Casimiro Noteví Tiene un aura espectacularCasimiro Noteví Tiene un aura espectacular
Código:
Create TABLE TBPRUEBAS (
    ID           INTEGER NOT NULL,
    CAMPOFLOAT   FLOAT,
    CAMPODOUBLE  DOUBLE PRECISION,
    PRIMARY KEY (ID)
);

commit work;

insert into tbpruebas values (1,93262548,93262548);
insert into tbpruebas values (2,93262549,93262549);
insert into tbpruebas values (3,54548865,54548865);
insert into tbpruebas values (4,37063683,37063683);
commit work;
Código:
SQL> select * from tbpruebas;

          ID     CAMPOFLOAT             CAMPODOUBLE 
============ ============== ======================= 

           1      93262544.       93262548.00000000 
           2      93262552.       93262549.00000000 
           3      54548864.       54548865.00000000 
           4      37063684.       37063683.00000000
Como ves, el campo double guarda perfectamente el valor indicado.

Del libro de Helen Borrie (The Firebird Book: A reference for Database Developers):
Cita:
FLOAT
FLOAT is a 32-bit floating-point data type with a limit of approximately 7 digits of
precision (assume 6 digits for reliability. A 10-digit number 25.33333312 inserted into
a FLOAT column is stored as 25.33333. The range is from -3.402*10^38 to 3.402*10^38
The smallest positive number it can store is 1.175*10^-38

DOUBLE PRECISION
DOUBLE PRECISION is a 64-bit floating-point data type with a limit of approximately
15 digits of precision. The range is from -1.797*10^308 to 1.797*10^308. The small-
est positive number it can store is 2.225*10^-308

Última edición por Casimiro Noteví fecha: 12-03-2009 a las 02:39:45.
Responder Con Cita