Including the Multiple-Precision Floating-Point Rounding [ MPFR ] Library with Solaris Stefan Teleman October 21, 2008 1. Summary and motivation The GNU MPFR Library [0] is described as "[...] a C library for multiple-precision floating-point computations with correct rounding. [...] MPFR is based on the GNU MP [1] multiple-precision library." There are several key differences between MPFR and GNU MP [ MPF ] [2]: - The precision of a MPFR variable is the exact number of bits used for its mantissa, whereas in MPF, the precision requested by the user is a minimum value (MPF generally uses a higher precision). With the additional difference below, this implies that the MPFR results do not depend on the number of bits (16, 32, 64 or more) of the underlying architecture. - As a consequence, MPFR uses a base-2 exponent, whereas in MPF, this is a base-232 or base-264 exponent, depending on the limb size. For this reason (and other internal ones), the maximum exponent range in MPFR is different (and smaller, if the exponent is represented by the same type as in MPF). - MPFR provides an additional rounding mode argument to its functions; furthermore, it is guaranteed that the result of any operation is the nearest possible floating-point value from the exact result (considering the input variables as exact values), taking into account the precision of the destination variable and the rounding mode. MPFR also says whether the rounded result is above or below the exact result. - MPFR supports much more functions (in particular transcendental functions such as exponentials, logarithms, trigonometric functions and so on) and special values: signed zeros, infinities, not-a-number (NaN). A detailed paper describing the facilities provided by MPFR is available online at: http://hal.inria.fr/inria-00070266. [3] MPFR is a required dependency for GCC [ The GNU Compiler Collection ] versions 4.3.0 and above. [4] This Case seeks Micro/Patch Release Binding. 2. Technical issues 2.1. Key objects /usr/lib/libmpfr.so.1.1.1 /usr/lib/libmpfr.so.1 -> libmpfr.so.1.1.1 /usr/lib/libmpfr.so -> libmpfr.so.1.1.1 /usr/lib/${MACH64}/libmpfr.so.1.1.1 /usr/lib/${MACH64}/libmpfr.so.1 -> libmpfr.so.1.1.1 /usr/lib/${MACH64}/libmpfr.so -> libmpfr.so.1.1.1 /usr/lib/pkgconfig/mpfr.pc /usr/lib/${MACH64}/pkgconfig/mpfr.pc /usr/include/mpfr/mpfr.h /usr/include/mpfr/mpf2mpfr.h /usr/share/info/mpfr/mpfr.info /usr/share/man/man3/mpfr.3 This case proposes the integration of MPFR Version 2.3.1. 2.2. Language Bindings The MPFR Library is written in ANSI C. 2.3. Documentation MPFR provides documentation in GNU texinfo format. UNIX man pages are not provided by default. For the purpose of this Integration, a generic man page will be provided, in Section 3 of the manual [ mpfr.3 ]. This man page will only include pointers to the installed documentation. 3. Interfaces 3.1. Interface Stability The development and release schedules of MPFR are controlled by a group of researchers and developers external to SMI. Although MPFR attempts to maintain API and ABI compatibility between releases, incompatible breakage between releases may occur. 3.2. Imported Interfaces MPFR imports interfaces from the Standard C Library, the Standard Math Library, and the GNU MP [ Bignum ] Library. 3.3. Exported Interfaces NAME STABILITY NOTES SUNWgnu-mpfr Uncommitted Package Name /usr/lib/libmpfr.so.1.1.1 Uncommitted Shared Library /usr/lib/libmpfr.so.1 Uncommitted Symbolic Link /usr/lib/libmpfr.so Uncommitted Symbolic Link /usr/include/mpfr/mpfr.h Uncommitted Header file /usr/include/mpfr/mpf2mpfr.h Uncommitted Header file /usr/lib/${MACH64}/libmpfr.so.1.1.1 Uncommitted Shared Library /usr/lib/${MACH64}/libmpfr.so.1 Uncommitted Symbolic Link /usr/lib/${MACH64}/libmpfr.so Uncommitted Symbolic Link /usr/lib/pkgconfig/mpfr.pc Uncommitted Pkg-config file /usr/lib/${MACH64}/pkgconfig/mpfr.pc Uncommitted Pkg-config file /usr/share/info/mpfr/mpfr.info Uncommitted Texinfo Page /usr/share/man/man3/mpfr.3 Uncommitted Manual Page 4. References [0] http://www.mpfr.org/ [1] http://gmplib.org/ [2] http://www.mpfr.org/faq.html [3] http://hal.inria.fr/inria-00070266 [4] http://gcc.gnu.org/