Computes machine and mathematical constants.

Category: | Mathematical |

CAUTION:

In some
operating environments, the run-time library might have limitations
that prevent the use of the full range of floating-point numbers that
the hardware provides.

In such cases, the
CONSTANT function attempts to return values that are compatible with
the limitations of the run-time library. For example, if the run-time
library cannot compute

`EXP(LOG(CONSTANT('BIG')))`

, then `CONSTANT('LOGBIG')`

will not return
the same value as `LOG(CONSTANT('BIG'))`

, but
will return a value such that `EXP(CONSTANT('LOGBIG'))`

can be computed.
CONSTANT('EXACTINT' <, nbytes> )

The exact integer is
the largest integer k such
that all integers less than or equal to k in absolute value have an exact representation in a SAS numeric
variable of length nbytes.
This information can be useful to know before you trim a SAS numeric
variable from the default 8 bytes of storage to a lower number of
bytes to save storage.

CONSTANT('LOGBIG' <, base> )

This case returns the
logarithm with respect to base of the largest double-precision floating-point number (8-bytes)
that is representable on your computer.

CONSTANT('LOGSMALL' <, base> )

This case returns the
logarithm with respect to base of the smallest double-precision floating-point number (8-bytes)
that is representable on your computer.

Copyright © SAS Institute Inc. All rights reserved.