Register Login

Difference between Float and Packed Data Type

Updated May 18, 2018

Float vs. Packed Data Type

Packed decimal values are stored two digits per byte. The end byte is an exception; it stores a single digit and the sign. The decimal point is not stored and so does not take up any space in the field; it is part of the definition.

Floating-point variables are always approximate. They can be used for calculations requiring very large values or many decimal places. Precision up to 15 decimal places is possible, but this is hardware-dependent.

Can we print decimals in type n?

No, we can’t print decimals in type n. 


Comments

  • 12 Aug 2010 5:38 am Guest
    give me example of floating point and packed decimal for understanding the difference

×