# 7.02 Numeric Functions

## Abs

Description:

Returns the absolute value of an expression.

Syntax:

abs(expr)

where:

expr
The expression to be evaluated.

Example:

```put abs(1)       // 1
put abs(-1)      // 1```

## Min/Max/AbsMin/AbsMax

Description:

Returns the Maximum/Minimum value of parameters. Parameters can be arrays, integers or real numbers.

AbsMin/AbsMax returns the absolute min/max value.

Syntax:

max(expr, …)
absmax(expr, …)
min(expr, …)
absmin(expr, …)

Example:

```put max(3,4,8,-10)     // 8
put absmax(3,4,8,-10)  // 10
put min({0,-1},2,3)    // -1
put absmin({0,-1},2,3) // 0```

## Pow

Description:

Returns x raised to power of y

Syntax:

pow(x, y)

Example:

```put pow(10, 2)      // 100
put pow(10, 2.5)    // 316.227766017
put pow(10.5, 2.5)  // 357.250831```

## Sqr

Description:

Returns square root of x.

Syntax:

sqr(x)

Example:

```put sqr(2)    // 1.414213562
put sqr(3)    // 1.732050808
put sqr(0)    // 0```

## Sgn

Description:

Returns sign of x (+1 for positive, -1 for negative and 0 for zero).

Syntax:

sgn(x)

Example:

```put sgn(2)    // 1
put sgn(0)    // 0
put sgn(-2)   // -1```