Wilang Documentation1.0.0+4

fraction#

Create a fraction from a number or from integer numerator and denominator.

Available in: math cells, REPL.

Syntax#

fraction(num)
fraction(matrix)
fraction(num,den)
fraction({n: num, d: den})

Arguments and behavior#

Arguments must match one of the syntax forms above. Use the example as a starting point; arrays and numeric types are accepted only by compatible overloads. The example returns scalar (fraction).

Example#

Edit the inputs, then use Run or Reset. Changes stay in this example.

Example
fraction(0.125)

Expected result: 1/8.

See also#

bignumber · boolean · complex · index · matrix · string · unit

All functions · Math guides