apache > db
Apache DB Project
 
Font size:      

DOUBLE PRECISION

DOUBLE PRECISION

The DOUBLE PRECISION data type provides 8-byte storage for numbers using IEEE floating-point notation.

Syntax

DOUBLE PRECISION

or, alternately

DOUBLE

DOUBLE can be used synonymously with DOUBLE PRECISION.

Limitations

DOUBLE value ranges:

  • Smallest DOUBLE value: -1.79769E+308
  • Largest DOUBLE value: 1.79769E+308
  • Smallest positive DOUBLE value: 2.225E-307
  • Largest negative DOUBLE value: -2.225E-307

These limits are different from the java.lang.DoubleJava type limits.

An exception is thrown when any double value is calculated or entered that is outside of these value ranges. Arithmetic operations do not round their resulting values to zero. If the values are too small, you will receive an exception.

Numeric floating point constants are limited to a length of 30 characters.

-- this example will fail because the constant is too long: 
values 01234567890123456789012345678901e0;

Corresponding Compile-Time Java Type

java.lang.Double

JDBC Metadata Type (java.sql.Types)

DOUBLE

When mixed with other data types in expressions, the resulting data type follows the rules shown in Numeric Type Promotion in Expressions.

See also Storing Values of One Numeric Data Type in Columns of Another Numeric Data Type.

Examples

3421E+09
425.43E9
9E-10
4356267544.32333E+30


Previous Page
Next Page
Table of Contents
Index