Functions > Numerical Manipulations and Number Theory

The following functions are described in this section

01. abs | 02. ceil | 03. fib | 04. fibs | 05. floor |

06. isprime | 07. prime | 08. primesto | 09. primes | 10. rand |

11. randlist | 12. round | 13. truncate |

Gets the absolute value(s) of the given value(s), array or matrix using one of the following forms:

- abs(
*value_1, value_2, ..., value_n*) - abs(
*array*|*matrix*)

**Note:** The pipe (|) symbol shows that any one of the provided types are allowed to be passed as parameter.

Gets the ceiling value(s) of the given value(s), array or matrix using one of the following forms:

- ceil(
*value_1, value_2, ..., value_n*) - ceil(
*array*|*matrix*)

**Note:** The pipe (|) symbol shows that any one of the provided types are allowed to be passed as parameter.

Gets the Fibonacci number at the given zero based index. The format of this function is:

fib(*index*)

Gets the first **N** Fibonacci numbers. Its format is:

fibs(*count*), where *count* specifies the number of items in the returned Fibonacci sequence.

Gets the floor value(s) of the given value(s), array or matrix using one of the following forms:

- floor(
*value_1, value_2, ..., value_n*) - floor(
*array*|*matrix*)

**Note:** The pipe (|) symbol shows that any one of the provided types are allowed to be passed as parameter.

Checks whether the given number is prime or not. Returns true if it is prime. Otherwise returns false.

Returns the prime number at the specified zero based index.

Returns the prime numbers from the sequence of positive integers upto and including the number specified as parameter. This function perfoms faster than the primes() function described next.

Returns the first **N** (specified as parameter) numbers from the sequence of prime numbers.

Generates a random number. It has the following format

rand([*seed*])

*seed* is an optional number to provide an initial seed to the Random Number Generator.

Generates a list of random numbers. It has the following format

randlist(*count*, [*seed*])

*count* is the size of the resulting array containing random numbers. *seed* is an optional number to provide an initial seed to the Random Number Generator.

Rounds its argument(s) (values, array or matrix) to the nearest integer or specified number of decimal places using one of the following forms

- round(
*value*|*array*|*matrix*): Rounds to the nearest integer. - round(
*value*|*array*|*matrix*,*digits*): Rounds to the specified number of fractional*digits*

**Note:** The pipe (|) symbol shows that any one of the provided types are allowed to be passed as parameter.

Gets the integral part of the specifed argument(s). The function has the following two forms:

- truncate(
*value_1, value_2, ..., value_n*) - truncate(
*array*|*matrix*)

**Note:** The pipe (|) symbol shows that any one of the provided types are allowed to be passed as parameter.

Spirograph (desktop) ** v-1.0.2.1** was released on April 23, 2015. Improvements include:

- Fill colors (with transparency)
- Two fill modes
- High resolution export for designers