Computes some machine and mathematical constants and returns a
value
|
CONSTANT(constant<,
parameter>)
|
-
constant
-
is a character string that identifies the
constant. Valid constants are
-
parameter
-
is an optional numeric parameter. Some of
the constants specified in constant have an optional argument
that alters the functionality of the CONSTANT function.
The natural base is described by the
following equation:
Euler's constant is described by the following equation:
Pi is the well-known constant in trigonometry that
is
the ratio between the circumference and the diameter of a circle. Many expressions
exist for computing this constant. One such expression for the series is described
by the following equation:
|
CONSTANT('EXACTINT' <,
nbytes>)
|
where
-
nbytes
-
is a numeric value that is the number of
bytes.
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.
This case
returns the largest double-precision floating
point number (8-bytes) that is representable on your computer.
|
CONSTANT('LOGBIG' <,
base>)
|
where
-
base
-
is a numeric value that is the base of the
logarithm.
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.
It is safe to exponentiate the given base
raised to a power less than or equal to CONSTANT('LOGBIG', base)
by using the power operation (**) without causing any overflows.
It is safe to exponentiate any floating point number
less than or equal to CONSTANT('LOGBIG') by using the exponential function,
EXP, without causing any overflows.
This case returns
the square root of the largest double-precision
floating point number (8-bytes) that is representable on your computer.
It is safe to square any floating point number less
than or equal to CONSTANT('SQRTBIG') without causing any overflows.
This case returns the smallest
double-precision
floating point number (8-bytes) that is representable on your computer.
|
CONSTANT('LOGSMALL' <, base>)
|
where
-
base
-
is a numeric value that is the base of the
logarithm.
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.
It is safe to exponentiate the given base
raised to a power greater than or equal to CONSTANT('LOGSMALL', base) by using the power operation (**) without causing any underflows
or 0.
It is safe to exponentiate any floating point number
greater than or equal to CONSTANT('LOGSMALL') by using the exponential function,
EXP, without causing any underflows or 0.
This case
returns the square root of the smallest double-precision
floating point number (8-bytes) that is representable on the machine.
It is safe to square any floating point number greater
than or equal to CONSTANT('SQRTBIG') without causing any underflows or 0.
This case returns the smallest double-precision floating point
number (8-bytes)
for some integer j, such that
.
This constant is important in finite precision computations.
A number n1 is considered larger than
another number n2 if the (8-byte) representation
of n1 + n2
is identical to n1. This constant can
be used in summing series to implement a machine dependent stopping criterion.
|
CONSTANT('LOGMACEPS' <,
base>)
|
where
-
base
-
is a numeric value that is the base of the
logarithm.
This case returns the logarithm with
respect to base of
CONSTANT('MACEPS').
This case returns the square
root of CONSTANT('MACEPS').
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.