Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
41
Добавлен:
16.04.2013
Размер:
4.96 Mб
Скачать

Representing Numeric Data with Number and Floating-Point Datatypes

small because its exponent would be too large if its significand were normalized to have an implied leading bit set. IEEE 754 formats support subnormal values. Subnormal values preserve the following property:

if: x - y == 0.0 (using floating-point subtraction)

then: x == y

Table 2–4 shows the range and precision of the required formats in the IEEE 754 standard and those of Oracle NUMBER. Range limits are expressed here in terms of positive numbers; they also apply to the absolute value of a negative number. (The

notation "number e exponent" used here stands for number multiplied by 10 raised to the exponent power: number . 10 exponent.)

Table 2–4 Range and Precision of IEEE 754 formats

Range and

Single-precision

Double-precision

Oracle NUMBER

Precision

32-bit1

64-bit1

Datatype

Max positive normal

3.40282347e+38

1.7976931348623157

< 1.0e126

number

 

e+308

 

Min positive normal

1.17549435e-38

2.2250738585072014

1.0e-130

number

 

e-308

 

Max positive

1.17549421e-38

2.2250738585072009

not applicable

subnormal number

 

e-308

 

Min positive

1.40129846e-45

4.9406564584124654

not applicable

subnormal number

 

e-324

 

Precision (decimal

6 - 9

15 - 17

38 - 40

digits)

 

 

 

1 These numbers are quoted from the IEEE Numerical Computation Guide.

See Also: Oracle Database SQL Reference

Representing Special Values with Native Floating-Point Formats

IEEE 754 allows special values to be represented. These special values are positive infinity (+INF), negative infinity (-INF), and not-a-number (NaN). IEEE 754 also distinguishes between positive zero (+0) and negative zero (-0). NaN is used to represent results of operations that are undefined.

There are many bit patterns in IEEE 754 that represent NaN. Bit patterns can represent NaN with and without the sign bit set. IEEE 754 distinguishes between signalling NaNs and quiet NaNs. IEEE 754 specifies behavior for when exceptions

2-14 Oracle Database Application Developer's Guide - Fundamentals

Соседние файлы в папке Oracle 10g