References - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim

Numeric Computation References






The numeric computation environment in Maple is based on the IEEE Standard 754 for Binary Floating-Point Arithmetic [1], and its subsequent generalization to base 10 machines, known as IEEE/854 [2]. These standards have natural generalizations to the arbitrary precision computing environment in Maple, and by adopting such natural generalizations the hardware and software numeric computing environments are formed into a cohesive whole.


The hardware computation environment simulated within Maple (currently under development) is referred to as the Maple hardware computation environment, to distinguish it from the underlying physical hardware computation environment.


Floating point systems are specified by four parameters, Fl(B, p, L, U), and elements of these systems are specified by three parameters, (s, m, e):


s is the sign of a floating-point number,


m is its (unsigned) mantissa, and


e is its exponent.


Certain values of these parameters are reserved for special values (for example, to represent objects within the system that do not have interpretations as numbers). Otherwise, the number represented is s * m * B^e.


B is the base of the number system.


p is the precision. It specifies the maximum number of base-B digits in the mantissa of a floating-point number in the machine. Unspecified trailing digits, if any, are assumed to be 0.


L is the largest negative (base-B) exponent of a representable number. The smallest positive, normalized, representable number is (1, 1, L).


U is the largest positive (base-B) exponent of a representable number. The largest positive representable number is (1, ddd...d, U), where the mantissa has p d's and d = B - 1.


Maple's software floating-point environment can be viewed as a large (effectively infinite) collection of distinct virtual machines, with b = 10, and these machines are distinguished only by the value of the parameter p. That is, all machines are base 10, and floating-point numbers in all machines have the same ranges of possible exponent values. The smallest value of p is 1; the largest can be dependent on the underlying physical machine architecture.


Note:  To avoid certain difficulties, Maple considers the largest representable software float to be (1, 9, U), independent of Digits.


These virtual machines coexist with each other according to the following rule: A software float (s,m,e) belongs to no virtual machine until it is used in a computation in which a specific virtual machine is required, at which time it is "entered" into that machine. "Entering" a software float (s, m, e) into a machine Fl(10, p, L, U) requires nothing to be done if the length of m is no more than p. However, if the length of m is more than p,  then m must be properly rounded to p digits. Similarly, software floats are "entered" into the Maple hardware computational environment only when this operation is required, and Maple hardware floats are "entered" into a virtual machine only when required. A software float that results from a floating-point computation is again treated as belonging to no specific virtual machine.



[1]  "IEEE Standard 754-1985 for Binary Floating-Point Arithmetic." Reprinted in ACM SIGPLAN Notices, Vol. 22 No. 2. (1987): 9-25.


[2]  "A Proposed Radix- and Word-Length-Independent Standard for Floating-Point Arithmetic." Reprinted in IEEE Micro, (August 1984): 86-100.


[3]  Goldberg, D. "What Every Computer Scientist Should Know About Floating-Point Arithmetic." ACM Comp. Surv. Vol. 23. (1991): 5-48.


[4]  "Programming Languages - C." ISO/IEC 9899 "C9X" (esp. Annexes "F" and "G").


[5]  "Information technology - Language independent arithmetic." ISO/IEC 10967-1 (1994).