Skip Headers
Oracle® Business Intelligence Enterprise Edition Help
11g Release 1 (11.1.1)
  Go To Table Of Contents
Contents

Math Functions

The math functions perform mathematical operations. Functions include:

ABS

This function calculates the absolute value of a numeric expression.

Syntax 

ABS(numExpr)

Where:

numExpr is any expression that evaluates to a numeric value.

ACOS

This function calculates the arc cosine of a numeric expression.

Syntax 

ACOS(numExpr)

Where:

numExpr is any expression that evaluates to a numeric value.

ASIN

This function calculates the arc sine of a numeric expression.

Syntax 

ASIN(numExpr)

Where:

numExpr is any expression that evaluates to a numeric value.

ATAN

This function calculates the arc tangent of a numeric expression.

Syntax 

ATAN(numExpr)

Where:

numExpr is any expression that evaluates to a numeric value.

ATAN2

This function calculates the arc tangent of y/x, where y is the first numeric expression and x is the second numeric expression.

Syntax 

ATAN2(numExpr1, numExpr2)

Where:

numExpr is any expression that evaluates to a numeric value.

CEILING

This function rounds a noninteger numeric expression to the next highest integer. If the numeric expression evaluates to an integer, the CEILING function returns that integer.

Syntax 

CEILING(numExpr)

Where:

numExpr is any expression that evaluates to a numeric value.

COS

This function calculates the cosine of a numeric expression.

Syntax 

COS(numExpr)

Where:

numExpr is any expression that evaluates to a numeric value.

COT

This function calculates the cotangent of a numeric expression.

Syntax 

COT(numExpr)

Where:

numExpr is any expression that evaluates to a numeric value.

DEGREES

This function converts an expression from radians to degrees.

Syntax 

DEGREES(numExpr)

Where:

numExpr is any expression that evaluates to a numeric value.

EXP

This function sends the value to the power specified.

Syntax 

EXP(numExpr)

Where:

numExpr is any expression that evaluates to a numeric value.

EXTRACTBIT

This function retrieves a bit at a particular position in an integer. It returns an integer of either 0 or 1 corresponding to the position of the bit. The primary use case for this function is to extract 'cell status' in the Hyperion Financial Management cube source. The EXTRACTBIT function cannot be pushed into any database, and is always internally executed (in the Oracle BI Server).

Syntax

Int ExtractBit(Arg1, Arg2)

Where:

Arg1 is an expression of the following types: INT, SMALLINT, UNIT, SMALLUNIT, TINYINT, TINYUNIT. If Arg1 is of double type, it is necessary to cast the column to an INT first.

Arg2 is an expression of type integer. The value should range from 1 to length_of_Arg1. 1 retrieves the Least Significant Bit. If the Arg2 is beyond the length of the integer, then 0 is returned. An error message is triggered when the Arg2 is less than 1.

FLOOR

This function rounds a noninteger numeric expression to the next lowest integer. If the numeric expression evaluates to an integer, the FLOOR function returns that integer.

Syntax 

FLOOR(numExpr)

Where:

numExpr is any expression that evaluates to a numeric value.

LOG

This function calculates the natural logarithm of an expression.

Syntax 

LOG(numExpr)

Where:

numExpr is any expression that evaluates to a numeric value.

LOG10

This function calculates the base 10 logarithm of an expression.

Syntax 

LOG10(numExpr)

Where:

numExpr is any expression that evaluates to a numeric value.

MOD

This function divides the first numeric expression by the second numeric expression and returns the remainder portion of the quotient.

Syntax 

MOD(numExpr1, numExpr2)

Where:

numExpr is any expression that evaluates to a numeric value.

Examples 

This example request returns a value of 0:

MOD(9, 3)

This example request returns a value of 1:

MOD(10, 3)

PI

This function returns the constant value of pi (the circumference of a circle divided by its diameter).

Syntax 

PI()

POWER

This function takes the first numeric expression and raises it to the power specified in the second numeric expression.

Syntax 

POWER(numExpr1, numExpr2)

Where:

numExpr1 is any expression that evaluates to a numeric value.

RADIANs

This function converts an expression from degrees to radians.

Syntax 

RADIANS(numExpr)

Where:

numExpr is any expression that evaluates to a numeric value.

RAND

Returns a pseudo-random number between 0 and 1.

Syntax 

RAND()

RANDFROMSEED

Returns a pseudo-random number based on a seed value. For a given seed value, the same set of random numbers are generated.

Syntax 

RAND(numExpr)

Where:

numExpr is any expression that evaluates to a numeric value.

ROUND

This function rounds a numeric expression to n digits of precision.

Syntax 

ROUND(numExpr, integer)

Where:

numExpr is any expression that evaluates to a numeric value.

integer is any positive integer that represents the number of digits of precision.

Example 

This example returns 2.17 as the result.

ROUND(2.166000, 2)

SIGN

This function returns the following:

  • A value of 1 if the numeric expression argument evaluates to a positive number.

  • A value of -1 if the numeric expression argument evaluates to a negative number.

  • 0 (zero) if the numeric expression argument evaluates to zero.

Syntax 

SIGN(numExpr)

Where:

numExpr is any expression that evaluates to a numeric value.

SIN

This function calculates the sine of a numeric expression.

Syntax 

SIN(numExpr)

Where:

numExpr is any expression that evaluates to a numeric value.

SQRT

This function calculates the square root of the numeric expression argument. The numeric expression must evaluate to a nonnegative number.

Syntax 

SQRT(numExpr)

Where:

numExpr is any expression that evaluates to a nonnegative numeric value.

TAN

This function calculates the tangent of a numeric expression.

Syntax 

TAN(numExpr)

Where:

numExpr is any expression that evaluates to a numeric value.

TRUNCATE

This function truncates a decimal number to return a specified number of places from the decimal point.

Syntax 

TRUNCATE(numExpr, integer)

Where:

numExpr is any expression that evaluates to a numeric value.

integer is any positive integer that represents the number of characters to the right of the decimal place to return.

Examples 

This example returns 45.12:

TRUNCATE(45.12345, 2)

This example returns 25.12:

TRUNCATE(25.126, 2)