Chapter 20. Package: Math Library

Table of Contents
Component: Compatibility mode
Component: Thread safety
Component: Tracing output levels in Math library
Option: Bessel function limit of significance

Macro name

CYGPKG_LIBM

Type

Boolean

Description

ISO standard floating point mathematical library containing many useful functions for mathematical calculations.

Component: Compatibility mode

Macro name

CYGPKG_LIBM_COMPATIBILITY

Type

Dummy

Description

These options deal with behavior related to the various compatibility modes - POSIX, IEEE, X/OPEN and SVID.

Option: IEEE-only

Macro name

CYGSEM_LIBM_COMPAT_IEEE_ONLY

Type

Radio

Description

The math library can be hard-coded to only behave in one compatibility mode - IEEE. This cannot be changed at run-time. IEEE mode is the most minimal of the compatibility modes, and so this will best help code size and speed, as well as omitting the code for other compatibility modes. If not defined, the math library can be set at run-time to any of the supported compatibility modes.

Component: Default mode

Macro name

CYGPKG_LIBM_COMPATIBILITY_DEFAULT

Type

Radio

Description

If you want to have support for more than one compatibility mode settable at run-time, rather than hard-coded IEEE mode, this component lets you choose which mode should be the default.

Option: POSIX

Macro name

CYGNUM_LIBM_COMPATIBILITY_POSIX

Type

Radio

Description

This sets the default compatibility mode to POSIX

Option: IEEE

Macro name

CYGNUM_LIBM_COMPATIBILITY_IEEE

Type

Radio

Description

This sets the default compatibility mode to IEEE

Option: X/OPEN

Macro name

CYGNUM_LIBM_COMPATIBILITY_XOPEN

Type

Radio

Description

This sets the default compatibility mode to X/OPEN

Option: SVID

Macro name

CYGNUM_LIBM_COMPATIBILITY_SVID

Type

Radio

Description

This sets the default compatibility mode to SVID

Option: SVID3-style scalb()

Macro name

CYGFUN_LIBM_SVID3_scalb

Type

Boolean

Description

SVID3 defined the scalb() function as double scalb(double, double) rather than double scalb(double, int) which is used by IBM, DEC, and probably others. Enabling this option chooses the (double, double) version. Note there is a function double scalbn(double, int) which is unaffected by this choice.

Option: Reduce namespace pollution

Macro name

CYGSYM_LIBM_NO_XOPEN_SVID_NAMESPACE_POLLUTION

Type

Boolean

Description

If you do not want to use either the X/Open or SVID3 compatibility modes, you may want to define this option to reduce the chance of namespace pollution. This is particularly likely to occur here as these standards define symbols with names that often appear in applications, such as exception, DOMAIN, OVERFLOW, etc. If your application also used these names, it may cause problems.

Option: Output to stderr for math errors

Macro name

CYGSEM_LIBM_USE_STDERR

Type

Boolean

Description

The SVID3 standard says that error messages should be output on the stderr console output stream. This option allows this ability to be explicitly controlled. However, this still only has an effect in SVID3 compatibility mode.