10.12.2012 Views

Oracle C++ Call Interface Programmer's Guide

Oracle C++ Call Interface Programmer's Guide

Oracle C++ Call Interface Programmer's Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Number Class<br />

Number Class<br />

The Number class handles limited-precision signed base 10 numbers. A Number<br />

guarantees 38 decimal digits of precision. All positive numbers in the range<br />

displayed here can be represented to a full 38-digit precision:<br />

10^-130<br />

and<br />

9.99999999999999999999999999999999999999*10^125<br />

The range of representable negative numbers is symmetrical.<br />

The number zero can be represented exactly. Also, <strong>Oracle</strong> numbers have<br />

representations for positive and negative infinity. These are generally used to<br />

indicate overflow.<br />

The internal storage type is opaque and private. Scale is not preserved when<br />

Number instances are created.<br />

Number does not support the concept of NaN and is not IEEE-754-85 compliant.<br />

Number does support +Infinity and -Infinity.<br />

There are several variants of syntax:<br />

Default constructor.<br />

Number();<br />

Number(const Number &srcNum);<br />

Translates a native long double into a Number. The Number is created using the<br />

precision of the platform-specific constant LDBL_DIG.<br />

Number(long double val);<br />

Translates a native double into a Number. The Number is created using the precision<br />

of the platform-specific constant DBL_DIG.<br />

Number(double val);<br />

Translates a native float into a Number. The Number is created using the precision of<br />

the platform-specific constant FLT_DIG.<br />

Number(float val);<br />

OCCI Classes and Methods 8-101

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!