cancel
Showing results for 
Search instead for 
Did you mean: 

what is the difference between packed decimals and float decimals?

sivapalani10
Explorer
0 Kudos

hi friends,

could you help me to know the difference between packed decimals and float decimals? and it will be appreciated if you explain with a scenario.

Thanks

shiva.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

<b>Packed Numbers</b>

The valid length for packed numbers is between 1 and 16 bytes;

two decimal places are packed into one byte, whereby the last byte

only contains one place and the plus/minus sign;

after the decimal separator, up to 14 decimal places are permitted.

Depending on the field length len and the number of decimal places dec,

the following applies for the value area:

(-10(2len -1) +1) / (10(dec)) to (10(2len -1) -1) /(10(+dec)) in steps of 10^(-dec).

Values in between this range are rounded off.

<b>Floating point numbers</b>

Floating point numbers are displayed internally with 16 decimal places

according to the IEEE-754 standard (double precision).

Valid values are -1,7976931348623157EE+308 to -2,2250738585072014EE-308

for the negative area,

the value zero,

and +2,2250738585072014EE-308 to 1,7976931348623157EE308

for the positive area.

Both validity areas are extended in the direction of zero

through denormalized numbers after IEEE-754.

best regards,

Thangesh

Former Member
0 Kudos

Hi Siva,

<b>Packed decimal</b>: one digit per half byte, sign in extreme right half byte, 1 to 10 bytes long, maximum of 18 digits, the position of the decimal point is derived from the table column type.

I dont have idea about float decimals.

regards,

Azaz Ali.