Simplify a fraction
Reduce a fraction to lowest terms and describe it: numerator/denominator (denominator normalized positive), sign, whether it is an integer, and a mixed-number form when improper. A zero denominator is a clean 400.
- Category
- Developer tools
- Starting price
- $0.002
- Paid calls · 30 days
- 6
- Unique payers · 30 days
- 6
Paid endpoints
4 endpoints, sorted by usage. Prices are per request.
- POST/v1/simplify
Reduce a fraction to lowest terms and describe it: numerator/denominator (denominator normalized positive), sign, whether it is an integer, and a mixed-number form when improper. A zero denominator is a clean 400.
$0.002Base3calls / 30d - POST/v1/arithmetic
Add, subtract, multiply or divide two fractions and return the exact, fully-reduced result. All computation is done in BigInt so there is no floating-point error. Dividing by a zero fraction is a clean 400.
$0.002Base1calls / 30d - POST/v1/to-decimal
Expand a fraction to its decimal form by exact long division, detecting a repeating cycle and rendering it in parenthesis notation (e.g. 1/6 → '0.1(6)', 1/7 → '0.(142857)'). maxDigits caps a non-repeating expansion. A zero denominator is a clean 400.
$0.002Base1calls / 30d - POST/v1/from-decimal
Convert a decimal string to an exact reduced fraction. For a repeating decimal, set repeat to the number of trailing fractional digits that repeat (e.g. value='0.1666', repeat=1 → 1/6; value='0.3', repeat=1 → 1/3). A non-numeric value is a clean 400.
$0.002Base1calls / 30d