How numbers are represented in A+?

devquora
devquora

Posted On: Feb 22, 2018

 

The machines on which A+ is run represent numbers in binary (base 2), for efficient storage and computation. A+ (via C) represents integers in 32 bits (binary digits) and floating-point numbers in 64. The largest integer representable in this way is (2*31)-1 and the smallest is ¢2*31 (-2147483648); the greatest magnitude representable as a floating-point number is approximately 1.7977e+308.

In display and print, of course, A+ represents numbers in decimal. People tend to think in decimal and their input is usually decimal. Numbers like .1 and .01 seem exactly representable intrinsically (as they are in decimal), but, in fact, these numbers cannot be exactly represented in binary, and decimal to binary and binary to decimal conversions are one source of imprecision. Read more from http://www.aplusdev.org/APlusRefV2_9.html

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    A+ Interview Questions

    What is A+ programming language?

    A+ is a powerful and efficient programming language. It is freely available under the GNU General Public License. It emb..

    A+ Interview Questions

    Who Wrote A+?

    A+ is written by Arthur Whitney at Morgan Stanley in 1988...

    A+ Interview Questions

    What is APL programming language?

    APL (named after the book A Programming Language) is a programming language developed in the 1960s by Kenneth E. Iverso..