Oracle9i OLAP Services Developer's Guide to the Oracle OLAP APIRelease 1 (9.0.1)Part Number A88756-01

Performing Calculations, 4 of 7

## Working with Standard Numerical Functions

### How do the standard numerical functions work?

The OLAP API has many methods that represent standard numerical functions. When you use these functions with a `NumberSource`, they return a new `NumberSource` that has the same structure as the original `NumberSource` and whose elements have the values of the original `NumberSource` modified according to the function. For example, the `abs()` method returns a new `NumberSource` each of whose elements has the absolute value of the value of the corresponding element in the original `NumberSource`.

You can also write your own functions as described in "Creating Your own Numerical Functions".

### List of methods that represent standard functions

The OLAP API methods that represent standard functions include those listed in the following table.

Method

Description

`abs()`

Calculates the absolute value of each element of the `NumberSource`

`arccos()`

Calculates the angle value (in radians) of the value (interpreted as a cosine) of each element of the `NumberSource`

`arcsin()`

Calculates the angle value (in radians) of the value (interpreted as a sine) of each element of the `NumberSource`

`arctan()`

Calculates the angle value (in radians) of the value (interpreted as a tangent) of each element of the `NumberSource`

`cos()`

Calculates the cosine of the value (interpreted as an angle value in radians) of each element of the `NumberSource`

`cosh()`

Calculates the hyperbolic cosine of the value (interpreted as an angle value in radians) of each element of the `NumberSource`

`log()`

Calculates the natural logarithm of the value of each element of the `NumberSource`

`pow(rhs)`

Raises the value of each element of the `NumberSource` to the specified value.

`round(multiple)`

Rounds the value of each element of the `NumberSource` to the nearest multiple of the specified value.

`sin()`

Calculates the sine of the value (interpreted as an angle) of each element of the `NumberSource`

`sinh()`

Calculates the hyperbolic sine of the value (interpreted as an angle) of each element of the `NumberSource`

`sqrt()`

Calculates the square root of each element of the `NumberSource`

`tan()`

Calculates the tangent of the value (interpreted as an angle) of each element of the `NumberSource`

`tanh()`

Calculates the hyperbolic tangent of the value (interpreted as an angle) of each element of the `NumberSource`

For a more complete explanation of these methods, see Oracle OLAP API Reference.