Oracle® Solaris Studio 12.4: Numerical Computation Guide

Exit Print View

Updated: January 2015
 
 

3.2.2 Optimized Libraries

The libmopt library provides faster versions of some of the functions in libm and libsunmath. libmopt is provided as a static archive only. The routines contained in libmopt replace corresponding routines in libm. Typically, the libmopt versions are noticeably faster. Unlike the libm versions, however, which support any of ANSI/POSIX®, SVID, X/Open, or C99/IEEE-style treatment of exceptional cases, the libmopt routines only support C99/IEEE-style handling of these cases. (See Appendix E, Standards Compliance.) Also, while all mathematical functions in libm deliver results with reasonable accuracy regardless of the floating-point rounding direction mode, the result of calling any function in libmopt with a rounding direction other than round-to-nearest is undefined. A program that uses libmopt must ensure that the default round-to-nearest mode is in effect whenever any standard math function is called. To link a program with libmopt, use the –xlibmopt flag.