Chapter Contents 
Previous 
Next 
CONSTANT 
Category:  Mathematical 
Syntax  
Arguments  
Details  
The natural base  
Euler constant  
Pi  
Exact Integer  
The largest doubleprecision number  
The smallest doubleprecision number  
Machine precision 
Syntax 
CONSTANT(constant<, parameter>) 
Constant  Argument 

The natural base  'E' 
Euler constant 
'EULER' 
Pi 
'PI' 
Exact integer 
'EXACTINT' <,nbytes> 
The largest doubleprecision number 
'BIG' 
The log with respect to base of BIG 
'LOGBIG' <,base> 
The square root of BIG 
'SQRTBIG' 
The smallest doubleprecision number 
'SMALL' 
The log with respect to base of SMALL 
'LOGSMALL' <,base> 
The square root of SMALL 
'SQRTSMALL' 
Machine precision constant 
'MACEPS' 
The log with respect to base of MACEPS 
'LOGMACEPS' <,base> 
The square root of MACEPS 
'SQRTMACEPS' 
Details 
Syntax 
CONSTANT('E') 
The natural base is described by the following equation:
Syntax 
CONSTANT('EULER') 
Euler's constant is described by the following equation:
Syntax 
CONSTANT('PI') 
Pi is the wellknown 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:
Syntax 
CONSTANT('EXACTINT' <, nbytes>) 
Range:  2 nbytes 8 
Default:  8 
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.
Syntax 
CONSTANT('BIG') 
This case returns the largest doubleprecision floating point number (8bytes) that is representable on your computer.
Syntax 
CONSTANT('LOGBIG' <, base>) 
where
Restriction:  The base that you specify must be greater than the value of 1+SQRTMACEPS. 
Default:  the natural base, E. 
This case returns the logarithm with respect to base of the largest doubleprecision floating point number (8bytes) 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.
Syntax 

This case returns the square root of the largest doubleprecision floating point number (8bytes) 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.
Syntax 
CONSTANT('SMALL') 
Syntax 
CONSTANT('LOGSMALL' <, base>) 
where
Restriction:  The base that you specify must be greater than the value of 1+SQRTMACEPS. 
Default:  the natural base, E. 
This case returns the logarithm with respect to base of the smallest doubleprecision floating point number (8bytes) 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.
Syntax 

This case returns the square root of the smallest doubleprecision floating point number (8bytes) 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.
Syntax 
CONSTANT('MACEPS') 
This constant is important in finite precision computations. A number n_{1} is considered larger than another number n_{2} if the (8byte) representation of n_{1} + n_{2} is identical to n_{1}. This constant can be used in summing series to implement a machine dependent stopping criterion.
Syntax 
CONSTANT('LOGMACEPS' <, base>) 
where
Restriction:  The base that you specify must be greater than the value of 1+SQRTMACEPS. 
Default:  the natural base, E. 
This case returns the logarithm with respect to base of CONSTANT('MACEPS').
Syntax 

This case returns the square root of CONSTANT('MACEPS').
Chapter Contents 
Previous 
Next 
Top of Page 
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.