modus

The module math

A module of commands (property 19). It is not a program: it has no entry. The console loads it and calls its exports with the call form (docs/MODULE_CONTRACT.md, section 4). The tool makes the description of each export from this source: the name, the parameters, the result, and the first sentence of the comment (tools/kerneltool/describe.odin).

FactValue
Sourcemodules/math
Boot imagein the boot image; the image is not built, so its size is not known
Importsnone
Imported bynone

Exports

ExportWhat it does
gcd(first: Integer, second: Integer) -> Integergives the greatest common divisor
power(base: Integer, exponent: Integer) -> Integergives an integer to a power
fibonacci(index: Integer) -> Integergives the Fibonacci number of an index
next_prime(from: Integer) -> Integergives the first prime from an integer
number(text: Text) -> Integergives the integer that a text holds
square_root(value: Integer) -> Integergives the largest integer whose square is not above a value, or -1 with an error record: the error kind Too_Small, when the value is negative
roman(number: Integer) -> Textgives an integer in Roman numerals
reverse(text: Text) -> Textgives the bytes of a text, last first

Read from the source of the module, as the build reads it to describe the exports (tools/kerneltool/describe.odin).