math

ceil(x: int, decimals: int) int

Return the ceiling of x given the amount of decimals. This is the smallest integer >= x.

Parameters
  • x (int) – any integer number

  • decimals (int) – number of decimals

Returns

the ceiling of x

Return type

int

Raises

Exception – raised when decimals is negative.

floor(x: int, decimals: int) int

Return the floor of x given the amount of decimals. This is the largest integer <= x.

Parameters
  • x (int) – any integer number

  • decimals (int) – number of decimals

Returns

the floor of x

Return type

int

Raises

Exception – raised when decimals is negative.

sqrt(x: int) int

Gets the square root of a number.

Parameters

x (int) – a non-negative number

Returns

the square root of a number

Return type

int

Raises

Exception – raised when number is negative.