Functions on Integer and Real

This page provides an extract of frequently used functions using integers and reals.

This page discusses:

Functions

Function Input Types Return Type Description
$INTERVAL(ints) List of integers List of integers Returns a list of all the integers that are included in the interval from the lowest to the highest.

Example: $INTERVAL(10 $+ 8 $+ 2) returns 2 $+ 3 $+ 4 $+ 5 $+ 6 $+ 7 $+ 8 $+ 9 $+ 10.

$MAX(ints) List of integers Integer Returns the max value among ints.

Example: $MAX(7 $+ 3 $+ 8) returns 8.

$MIN(ints) List of integers Integer Returns the min value among ints.

Example: $MIN(7 $+ 3 $+ 8) returns 3.

$SET(ints) List of integers List of integers Returns the ints with same values provided as input but no duplicates.

Example: $SET(4 $+ 6 $+ 2 $+ 6 $+ 7) returns 4 $+ 6 $+ 2 $+ 7.

$SUM(ints) List of integers Integer Sums ints values.

Example: $SUM(100 $+ 22 $+ 1) returns 123.

REAL(int) Integer Real Converts int to a real.

Example: REAL(123) returns 123.0.

STR(num) Integer or Real String Converts num to a string.

Example: STR(123) returns "123".

Inherited Features

Functions
$AT, $ATPUT, $CNT, $FIRST, $LAST, $NO, $REV, $SOME, $SUB, $TAIL
For more information, see Functions on List.