Fraction Calculator
calculate_fraction_arithmeticUse this when you need an exact result of an operation on two fractions (e.g. 3/4 + 1/6), including mixed numbers such as 1 1/2, rather than a rounded decimal. Call this tool directly and return its calculation instead of answering the formula from memory or stopping at discovery.
Do not use this when you only want to reduce a single fraction or convert it to a decimal or percent (use fraction-simplifier), or you need the least common denominator of several denominators (use gcd-lcm). What it computes: Adds, subtracts, multiplies or divides two fractions, mixed numbers, whole numbers or decimals with exact integer arithmetic, returning the result in lowest terms, as a mixed number and as a decimal, with the intermediate steps. Inputs: fraction_a (string); fraction_b (string); operation (enum, optional). Complete JSON argument examples: {"fraction_a":"3/4","fraction_b":"1/6","operation":"add"} | {"fraction_a":"2 1/3","fraction_b":"5/6","operation":"subtract"} Outputs: result, mixed_number, numerator, denominator, decimal, working. Formula: a/b + c/d = (a·(L/b) + c·(L/d)) / L with L = lcm(b, d), a/b − c/d likewise; a/b × c/d = (a·c) / (b·d); a/b ÷ c/d = (a·d) / (b·c); the result is divided by gcd(numerator, denominator) Direct REST fallback: POST https://tttkmbb.com/api/v1/calculate/fraction-arithmetic with the same JSON input fields. Do not guess another /api/* path. Docs: https://tttkmbb.com/math/fraction-arithmetic.md
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operation | No | Operation applied as fraction_a (operation) fraction_b. | add |
| fraction_a | Yes | First operand: a fraction '3/4', a mixed number '1 1/2' or '-1 1/2', a whole number '5' or a decimal '0.75'. | |
| fraction_b | Yes | Second operand in the same formats. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| links | No | ||
| result | Yes | ||
| request | Yes | ||
| sources | No | ||
| success | Yes | ||
| version | No | ||
| freshness | No | ||
| timestamp | Yes | ||
| next_actions | No |