Linker IT Software
Google
Web www.oraxcel.com
menubar-top-links menubar-top-rechts
Home Help Search Login
Welcome, Guest. Please Login.
SQL*XL: Database to Excel bridge litLIB: Excel power functions pack ExcelLock: Locking and securing your valuable Excel spreadsheets encOffice: Protect your Excel file easy and safe encOffice: Protect your Excel file easy and safe
Pages: 1
Oracle large numbers: binary_double & binary_float (Read 10249 times)
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 75
Oracle large numbers: binary_double & binary_float
05.01.09 at 13:59:44
 
Oracle large numbers: binary_double & binary_float
 
In Oracle 11g two new datatypes have been added to the Oracle database to support calculations with large numbers.
 
Binary_double: 64 bits: 11 bits exponent and 52 bits fraction
Binary_float: 32 bits: 8 bits exponent and 23 bits fraction
 
Binary-Float      Maximum finite value      1.79e308      
Binary-Double   Maximum finite value      3.4e38
 
In a NUMBER column, floating point numbers have decimal precision. In a BINARY_FLOAT or BINARY_DOUBLE column, floating-point numbers have binary precision. The binary floating-point numbers support the special values infinity and NaN (not a number).
 
 
Source:
http://www.oracle.com/technology/sample_code/tutorials/jdbc10g/ieeedatatypes/fil es/IEEEDatatypes.pdf
Back to top
 
« Last Edit: 05.01.09 at 14:19:42 by Gerrit-Jan Linker »  

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 75
binary_double & binary_float example
Reply #1 - 05.01.09 at 14:02:01
 
binary_double & binary_float example
 
To try out the new binary_double and binary_float data types I have created a new table and loaded some values into it:
 
create table mytest ( d binary_double, f binary_float);
 
insert into mytest (d,f) values (1,2);
 
insert into mytest (d,f) values (4/3,7/6);
 
 
These columns support two special values: NaN (Not a number) and infinity:
 
insert into mytest (d,f) values ('NaN', 'infinity');
 
References:
NaN
http://en.wikipedia.org/wiki/NaN
IEEE Standard 754  Floating Point Numbers
http://steve.hollasch.net/cgindex/coding/ieeefloat.html
Back to top
 
« Last Edit: 08.01.09 at 14:55:50 by Gerrit-Jan Linker »  

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
Pages: 1