Numeric (Advanced) Operators
|x|
returns the absolute
value of the input value.
For example, -3 returns
3.
Ceil
rounds the input value
up to the nearest integer.
For example, 4.2 returns
5 and -4.8 returns -4.
Exp
raises the constant e to
the power specified by the input value.
For example, 5 returns
e to
the 5th power (148.41).
Floor
rounds the input value
down to the nearest integer.
For example, 4.8 returns
4 and -4.2 returns -5.
Ln
returns the natural
logarithm (base e) of the input value.
For example, 10 returns
the
eth root of 10 (2.30...).
Log
returns the logarithm
of the first value, where the second value specifies the base.
For example, (64, 8)
returns the base 8 logarithm of 64 (2).
Mod
returns the remainder
after dividing the first value by the second value.
For example, (5,2)
returns 1.
Power
raises the first value
to the power of the second value.
For example, (5,2)
returns 5 to the 2nd power (25).
Root
returns the nth
root of the first value, where the second value specifies n (the
base of the root).
For example, (27,3)
returns the 3rd (cube) root of 27 (3).
Round
rounds the first value
to the number of decimal places that is specified by the second value.
Selects the second value from the drop-down list.
For example, (7.354,
2) returns 7.35.
Note: If you select 0 decimal places,
then the values are rounded to the nearest integer.
Trunc
truncates the input
value to an integer.
For example, 8.9 returns
8 and -8.9 returns -8.
Copyright © SAS Institute Inc. All rights reserved.