abs
Returns the absolute value of a numeric value. If the argument is not negative, the
argument is returned. If the argument is negative, the negation of the argument is
returned.
| Arguments |
- Number
- numeric argument whose absolute value is to be determined
|
| Returns |
Numeric value of the same datatype as the input argument |
The following special cases apply to this function:
- If the argument is positive, zero, or negative zero, the result is positive zero.
- If the argument is infinite, the result is positive infinity.
- If the argument is not a number (NaN), the result is also not a number.
acos
Returns the arc cosine of an angle, in the range of 0.0 through pi.
| Arguments |
- Number
- Numeric argument whose arc cosine is to be determined. This value can range from -1 to 1.
|
| Returns |
Real - the arc tangent of the argument. |
The following special cases apply to this function:
- If the argument is NaN or its absolute value is greater than 1, the result is NaN.
asin
Returns the arc sine of an angle, in the range of -pi/2 through pi/2.
| Arguments |
- Number
- Numeric argument whose arc sine is to be determined. This value can range from -1 to 1.
|
| Returns |
Real - the arc sine of the argument. |
The following special cases apply to this function:
- If the argument is NaN or its absolute value is greater than 1, the result is NaN.
- If the argument is zero, the result is a zero with the same sign as the argument.
atan
Returns the arc tangent of an angle, in the range of -pi/2 through pi/2.
| Arguments |
- Number
- Numeric argument whose arc sine is to be determined.
|
| Returns |
Real - the arc tangent of the argument. |
The following special cases apply to this function:
- If the argument is NaN, the result is NaN.
- If the argument is zero, the result is a zero with the same sign as the argument.
ceil
Returns the smallest (closest to negative infinity) real value which is not less than the
argument and is equal to a mathematical integer.
| Arguments |
Real |
| Returns |
Real - the smallest (closest to negative infinity) floating-point value that is not less
than the argument and is equal to a mathematical integer. |
The following special cases apply to this function:
- If the argument value is already equal to a mathematical integer, the result is the same
as the argument.
- If the argument is positive zero or negative zero, the result is the same as the argument.
- If the argument value is less than zero but greater than -1.0, the result is negative
zero.
Note: The value of ceil(<Real>) is exactly the value of
-floor(-<Real>).
cos
Returns the trigonometric cosine of an angle.
| Arguments |
Real - an angle, in radians. |
| Returns |
Real - the cosine of the argument. |
The following special cases apply to this function:
- If the argument is NaN or an infinity, the result is NaN.
exp
Returns Euler's number e raised to the power of a real value.
| Arguments |
Real - the exponent to raise e to. |
| Returns |
Real -the value e exp a, where e is the base of the natural logarithms. |
The following special cases apply to this function:
- If the argument is NaN, the result is NaN.
- If the argument is positive infinity, the result is positive infinity.
- If the argument is negative infinity, the result is positive zero.
floor
Returns the largest (closest to positive infinity) real value that is not greater than the
argument and is equal to a mathematical integer.
| Syntax |
Real = floor (Real) |
| Arguments |
Real - a value. |
| Returns |
Real - the largest (closest to positive infinity) floating-point value that is not greater
than the argument and is equal to a mathematical integer. |
The following special cases apply to this function:
- If the argument value is already equal to a mathematical integer, the result is the same
as the argument.
- If the argument is NaN, an infinity, positive zero, or negative zero, the result is the
same as the argument.
log
Returns the natural logarithm (base e) of a numeric value.
| Arguments |
Number - a number greater than 0. |
| Returns |
Real - the value ln argument, the natural logarithm of argument. |
The following special cases apply to this function:
- If the argument is NaN or less than zero, the result is NaN.
- If the argument is positive infinity, the result is positive infinity.
- If the argument is positive zero or negative zero, the result is negative infinity.
max(numA, numB)
Returns the greater of two numeric values. That is, the result is the argument closer to
positive infinity. If the arguments have the same value, the result is that same
value. If either value is NaN, the result is NaN. Unlike the numerical comparison
operators, this method considers negative zero to be strictly smaller than positive
zero. If one argument is positive zero and the other is negative zero, the result is
positive zero (see the References in the footnotes).
| Arguments |
- numA
- numeric value A
- numB
- numeric value B
|
| Returns |
Numeric value - the larger of the two arguments. |
min(numA, numB)
Returns the smaller of two numeric values. That is, the result is the argument closer to
the value of
Real.MIN_VALUE
. If the arguments have the same value, the result is that same value.
| Arguments |
- numA
- numeric value A
- numB
- numeric value B
|
| Returns |
Numeric value - the smaller of the two arguments. |
pow
Returns the value of the first argument raised to the power of the second argument.
| Arguments |
Real - the base.
Real - the exponent.
|
| Returns |
Real |
The following special cases apply to this function:
- If the second argument is positive or negative zero, the result is 1.0.
- If the second argument is 1.0, the result is the same as the first argument.
- If the second argument is NaN, the result is NaN.
- If the first argument is NaN and the second argument is nonzero, the result is NaN.
- If
- the absolute value of the first argument is greater than 1 and the second argument is
positive infinity, or
- the absolute value of the first argument is less than 1 and the second argument is
negative infinity, the result is positive infinity.
- If
- the absolute value of the first argument is greater than 1 and the second argument is
negative infinity, or
- the absolute value of the first argument is less than 1 and the second argument is
positive infinity, the result is positive zero.
- If the absolute value of the first argument equals 1 and the second argument is infinite,
the result is NaN.
- If
- the first argument is positive zero and the second argument is greater than zero, or
- the first argument is positive infinity and the second argument is less than zero, the
result is positive zero.
- If
- the first argument is positive zero and the second argument is less than zero, or
- the first argument is positive infinity and the second argument is greater than zero, the
result is positive infinity.
- If
- the first argument is negative zero and the second argument is greater than zero but not a
finite odd integer, or
- the first argument is negative infinity and the second argument is less than zero but not
a finite odd integer, the result is positive zero.
- If
- the first argument is negative zero and the second argument is a positive finite odd
integer, or
- the first argument is negative infinity and the second argument is a negative finite odd
integer, the result is negative zero.
- If
- the first argument is negative zero and the second argument is less than zero but not a
finite odd integer, or
- the first argument is negative infinity and the second argument is greater than zero but
not a finite odd integer, the result is positive infinity.
- If
- the first argument is negative zero and the second argument is a negative finite odd
integer, or
- the first argument is negative infinity and the second argument is a positive finite odd
integer, the result is negative infinity.
- If the first argument is finite and less than zero
- if the second argument is a finite even integer, the result is equal to the result of
raising the absolute value of the first argument to the power of the second
argument.
- if the second argument is a finite odd integer, the result is equal to the negative of the
result of raising the absolute value of the first argument to the power of the
second argument
- if the second argument is finite and not an integer, the result is NaN.
- If both arguments are integers, the result is exactly equal to the mathematical result of
raising the first argument to the power of the second argument if that result can,
in fact, be represented exactly as a real value.
In the foregoing descriptions, a floating-point value is considered to be an integer if
and only if it is finite and a fixed point of the method ceil or, equivalently, a
fixed point of the method floor. A value is a fixed point of a one-argument method
if and only if the result of applying the method to the value is equal to the value.
round
Returns the closest int to the argument. The result is rounded to a real by adding 1/2,
taking the floor of the result and casting the result to type int. That is, round is
equivalent to
floor(num + 0.5).
| Arguments |
- Number
- numeric value to be rounded
|
| Returns |
Real or Decimal value of the argument rounded to the nearest whole number. If num is Real
or Int, the function returns a Real. If num is Decimal, a Decimal is
returned |
The following special cases apply to this function:
- If the argument is NaN, the result is 0.
- If the argument is negative infinity or any value less than or equal to the value of
Real.MIN_VALUE
, the result is equal to the value of
Real.MIN_VALUE
.
- If the argument is positive infinity or any value greater than or equal to the value of
Real.MAX_VALUE
, the result is equal to the value of
Real.MAX_VALUE
.
sin
Returns the trigonometric sine of an angle.
| Arguments |
Real - an angle, in radians. |
| Returns |
Real - the sine of the argument. |
The following special cases apply to this function:
- If the argument is NaN or an infinity, the result is NaN.
- If the argument is zero, the result is a zero with the same sign as the argument.
sqrt
Returns the correctly rounded positive square root of a Real value.
| Arguments |
Real - a value. |
| Returns |
Real - the positive square root of argument. If the argument is NaN or less than zero, the
result is NaN. |
The following special cases apply to this function:
- If the argument is NaN or less than zero, the result is NaN.
- If the argument is positive infinity, the result is positive infinity.
- If the argument is positive zero or negative zero, the result is the same as the argument.
- Otherwise, the result is the real value closest to the true mathematical square root of
the argument value.
tan
Returns the trigonometric tangent of an angle
| Arguments |
Real - an angle, in radians. |
| Returns |
Real - the tangent of the argument. |
The following special cases apply to this function:
- If the argument is NaN or an infinity, the result is NaN.
- If the argument is zero, the result is a zero with the same sign as the argument.