Mathematical functions let you perform math operations on data, including rounding, trigonometry, logging and exponentiation, and random number generation (among other operations).
|Usage and description|
Returns the absolute value of X.
Returns the arc cosine of X, that is, the value whose cosine is X. Returns NULL if X is not in the range -1 to 1.
Returns the arc sine of X, that is, the value whose sine is X. Returns NULL if X is not in the range -1 to 1.
Returns the arc tangent of X, that is, the value whose tangent is X.
|Arc Tangent Ratio||
Returns the arc tangent of X1 divided by X2.
Returns the cube root of a number X.
Usage: CEILING(X) or CEIL(X)
Returns the smallest integer value not less than X. In other words, it rounds up to the next whole number.
Returns the cosine of X, where X is given in radians.
Returns the cotangent of X.
Returns the argument X, converted from radians to degrees.
Returns the value of e (the base of natural logarithms) raised to the power of X. The inverse of this function is LN().
Returns the largest integer value not greater than X. For exact-value numeric arguments, the return value has an exact-value numeric type. For string or floating-point arguments, the return value has a floating-point type.
Returns the natural logarithm of X; that is, the base-e logarithm of X. If X is less than or equal to 0, then an error is returned. This function is the inverse of the EXP function.
This function returns the base 10 logarithm of the number X.
Usage: MOD(N,M), N % M, N MOD M
Modulo operation. Returns the remainder of N divided by M. The number M cannot be 0, or an error will be returned. MOD() also works on values that have a fractional part and returns the exact remainder after division.
Returns the value of pi.
Usage: POWER(X,Y) or POW(X,Y)
Returns the value of X raised to the power of Y.
Returns the argument X, converted from degrees to radians. (Note that pi radians equals 180 degrees.)
Returns a random floating-point value v in the range 0 <= v < 1.0.
Usage: ROUND(X), ROUND(X,D)
Rounds the argument X to D decimal places. The rounding algorithm depends on the data type of X. D defaults to 0 if not specified. D can be negative to cause D digits left of the decimal point of the value X to become zero.
The return type is the same type as that of the first argument (assuming that it is integer, double, or decimal). This means that for an integer argument, the result is an integer (no decimal places).
Returns the sign of the argument as -1, 0, or 1, depending on whether X is negative, zero, or positive.
Returns the sine of X, where X is given in radians.
Returns the square root of a nonnegative number X.
Returns the tangent of X, where X is given in radians.
Returns the number X, truncated to D decimal places. If D is 0, the result has no decimal point or fractional part. D can be negative to cause D digits left of the decimal point of the value X to become zero.
All numbers are rounded toward zero.
Returns the smallest (minimum) of the values provided. NULL will be returned if all inputs are NULL.
Returns the largest (maximum) of the values provided. NULL will be returned if all inputs are NULL.