mathjs
Version:
Math.js is an extensive math library for JavaScript and Node.js. It features a flexible expression parser and offers an integrated solution to work with numbers, big numbers, complex numbers, units, and matrices.
47 lines (30 loc) • 981 B
Markdown
Create a fraction convert a value to a fraction.
```js
math.fraction(numerator, denominator)
math.fraction({n: numerator, d: denominator})
math.fraction(matrix: Array | Matrix) Turn all matrix entries
into fractions
```
Parameter | Type | Description
--------- | ---- | -----------
`args` | number &
Type | Description
---- | -----------
fraction &
```js
math.fraction(1, 3);
math.fraction('2/3');
math.fraction({n: 2, d: 3});
math.fraction([0.2, 0.25, 1.25]);
```
[](bignumber.md),
[](number.md),
[](string.md),
[](unit.md)
<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->