Technical Considerations

blocks in numerical functions. The transcendental functions include the usual logarithmic and exponential functions, as well as ln(1+x) and ex-1; financial functions for compound interest and annuity calculations; trigonometric functions; error and gamma functions; and a random number generator.

PowerPC Numerics Versus SANE

Although PowerPC Numerics is an implementation of the IEEE Standard, it is not the Standard Apple Numerics Environment (SANE). SANE is the numerics environment used on 680x0-based Macintosh computers, and it is the numerics environment used when you run a 680x0 application on a PowerPC processor-based Macintosh computer.

PowerPC Numerics is the environment used when you run an application built for a PowerPC processor-based Macintosh computer.

There are fundamental differences between PowerPC Numerics and SANE because of the differences in the microprocessors on which the two environments are used. The major difference is that SANE supports an 80-bit extended type and performs all floating-point computations in extended precision. This protects the user from roundoff error, overflows, and underflows that might occur in an intermediate value when determining the result of an expression.

Because the PowerPC processor is double-based, support of an 80-bit data type would be inefficient. It instead supports a 128- bit type (in software) called double-double(which corresponds to the long double type in C).

PowerPC Numerics provides this wide type only for cases where precision greater than that provided by the double format is necessary; PowerPC Numerics does not perform all computations in double-double precision. Instead, PowerPC Numerics recommends a method by which an expression is evaluated in the widest precision necessary.

Another fundamental difference is that PowerPC Numerics conforms to the FPCE recommendations as well as to the IEEE standard. C implementations using SANE do not necessarily comply with the FPCE recommendations.

About Floating-Point Data Formats

The IEEE standard defines several floating-point data formats, one required and the others recommended. IEEE requires that

Technical Considerations

35

iMalc Manual

Page 41
Image 41
Apple 1.1.2 manual PowerPC Numerics Versus Sane, About Floating-Point Data Formats