# Mathematical Functions¶

## ABS¶

Returns the absolute value by discarting sign of a numeric expression. Results are >= 0.

Syntax:

```ABS(<numeric expression>)
```

For example:

```ABS(1) // 1
ABS(-1) // 1

ABS(0.0) // 0.0
ABS(-1.2) // 1.2
```

Attention

ABS currently not implemented.

## ACOS¶

Arcosine, returns the angle in radians which cosine is specified by the value

Syntax:

```ACOS(<double expression>)
```

For example:

```ACOS(0) // Pi/2 ~= 1.57079632679
ACOS(1) // 0.0
ACOS(0.5) // Pi/3 ~= 1.0471975512
```

## ASIN¶

Arsine, returns the angle in radians which sine is specified by the value

Syntax:

```ASIN(<double expression>)
```

For example:

```ASIN(0) // 0.0
ASIN(1) // Pi/2 ~= 1.57079632679
ASIN(0.5) //  Pi/6 ~= 0.52359877559
```

## ATAN¶

Arctangent, returns the angle in radians which tangent is specified by the value.

Syntax:

```ATAN(<double expression>)
```

For example:

```ATAN(0) // 0.0
ATAN(1) // Pi/4 ~= 0.78539816339
ATAN(-1) // -Pi/4 ~= -0.78539816339
```

## ATN2¶

Returns the angle in radians of the vector (x, y).

Syntax:

```ATN2(<numeric expression>, <numeric expression>)
```

For example:

```ATN2(1, 0) // Pi/2 ~= 1.57079632679
ATN2(0, 1) // 0.0
ATN2(1, 1) // Pi/4 ~= 0.78539816339
```

## CEILING¶

Returns the smallest integer greater or equal to the specified value.

Syntax:

```CEILING(<numeric expression>)
```

For example:

```CEILING(1.1) // 2
CEILING(1.0) // 1
```

## COS¶

Returns the cosine specified by the value in radians.

Syntax:

```COS(<double expression>)
```

For example:

```COS(0.0) // 1.0
COS(pi()/3)// 0.5
```

## COT¶

Returns the cotangent specified by the value in radians.

Syntax:

```COT(<double expression>)
```

For example:

```COT(pi()/4) // 1.0
COT(pi()/2)// 0.0
```

## DEGREES¶

Converts an angle from radians to degrees.

Syntax:

```DEGREES(<double expression>)
```

For example:

```DEGREES(pi()) // 180.0
DEGREES(pi()/3) // 60.0
```

## EXP¶

Return the exponential of the specified value.

Syntax:

```EXP(<double expression>)
```

For example:

```EXP(0.0) // 1.0
EXP(1) // ~= 2.71828182845905 (Euler's number)
```

## FLOOR¶

Returns the biggest integer smaller or equal to the specified value.

Syntax:

```FLOOR( <numeric expression>)
```

For example:

```FLOOR(1.1) // 1
FLOOR(1.0) // 1
```

## LOG¶

Returns the logarithm base e specified by the value.

Syntax:

```LOG(<double expression>)
```

For example:

```LOG(1) // 0.0
LOG(2.71828182845905) // ~= 1.0
```

## LOG10¶

Returns the logarithm base 10 specified by the value.

Syntax:

```LOG10(<double expression>)
```

For example:

```LOG10(1) // 0.0
LOG10(10) // 1.0
```

## PI¶

Returns the constant Pi.

Syntax:

```PI()
```

For example:

```PI() // 3.141592653589793
```

## POWER¶

Returns the first value to the power of the second value.

Syntax:

```POWER(<double expression>, <double expression>)
```

For example:

```POWER(2, 3) // 8
POWER(4, 0.5) // 2
```

Converts an angle from degrees to radians.

Syntax:

```RADIANS(<double expression>)
```

For example:

```RADIANS(180) // Pi ~= 3.141592653589793
```

## RAND¶

Pseudo random number generator, returns a double between 0.0 and 1.0.

Syntax:

```RAND()
```

## ROUND¶

Returns a numeric value, rounded to the specified decimal precision.

Syntax:

```ROUND(<double expression>, <int precision>)
```

For example:

```ROUND(1.423, 2) // 1.42
ROUND(1.425, 2) // 1.43
```

## SIGN¶

Returns the sign, 1, -1 or 0 for the specified value.

Syntax:

```SIGN(<numeric expression>)
```

For example:

```SIGN(2) // 1
SIGN(-2) // -1
SIGN(0) // 0
```

## SQRT¶

Returns the square root of the specified value.

Syntax:

```SQRT(<double expression>,)
```

For example:

```SQRT(4) // 2
SQRT(2) // 1.41421356237
```

## TAN¶

Returns the tangent specified by the value in radians.

Syntax:

```TAN(<double expression>)
```

For example:

```TAN(0.0) // 0.0
TAN(pi()/4) // 1.0
```