Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Oracle internal number format(s)

Re: Oracle internal number format(s)

From: Klaus Zeuch <KZeuch_at_nospamhotmail.com>
Date: 2000/07/17
Message-ID: <8kvqm5$gb8$15$1@news.t-online.com>#1/1

From 8.1.6 Manual:
"Internal Numeric Format
Oracle stores numeric data in variable-length format. Each value is stored in scientific notation, with one byte used to store the exponent and up to 20 bytes to store the mantissa. The resulting value is limited to 38 digits of precision. Oracle does not store leading and trailing zeros. For example, the number 412 is stored in a format similar to 4.12 x 102, with one byte used to store the exponent (2) and two bytes used to store the three significant digits of the mantissa (4, 1, 2). Negative numbers include the sign in their length.

Taking this into account, the column size in bytes for a particular numeric data value NUMBER (p), where p is the precision of a given value, can be calculated using the following formula:

ROUND((length(p)+s)/2))+1

where s equals zero if the number is positive and s equals 1 if the number is negative.

Zero and positive and negative infinity (only generated on import from Version 5 Oracle databases) are stored using unique representations. Zero and negative infinity each require one byte; positive infinity requires two bytes.

"
(Oracle 8i concepts Built-In Datatypes)

hth

Klaus
"JShepherd" <jashepherd_at_usa.net> schrieb im Newsbeitrag news:sRIc5.364$7Y2.190336_at_news.uswest.net...
> Is Oracles' internal format for numbers defined in a manual somewhere ?
>
> i.e.
>
> xC106 = 5
> xC202 = 100
> xC40D23394F = 12345678
> x3B59432D1766 = -12345678
>
Received on Mon Jul 17 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US