Numeric Data Type: Floating Point Real Numbers


Some precision required for floating point numbers, in terms of the numbers of digits used in the decimal representation, may be specified by the programmer, as a Ada. • similar arithmetic operations, relational and assignment operations as with integers are usually provided for real.
• boolean operation has restrictions.
• equality between two real number is rarely achieved due to round off issues. Because program that check for equality to exit a loop may never terminate.
• some inbuilt functions like

Sine and maximum value.

sine: real*real-> real



Implementation of Floating Point

• Storage representation based on hardware representation in which storage location is divided into mantissa(that is significant digit of the number ) and an exponent.
• any number N can be expressed as N=m*2k form between 0 and 1 and for some integer k.
• A double-precision form of floating point number is also often available, in which an additional memory word is used to store an extended mantissa. <

Facebook Likes