{"id":"rational-subtract","version":"1.0.0","description":"Subtract one rational number from another, given as numerator/denominator integer strings, and return the reduced difference.","supported_operations":["rational subtract","subtract two rational numbers","subtract fractions as rationals","difference of two rationals"],"unsupported_operations":["rational add","decimal subtract","float subtraction","mixed numbers","continued fractions","IEEE-754 arithmetic"],"semantics":["Each operand is an object with canonical integer-string numerator and denominator fields.","The denominator must be a positive canonical integer; zero and negative denominators are rejected.","Inputs may use -0, which is canonicalized to 0; every other integer must match 0 or -?[1-9][0-9]*.","The result is a - b, computed as (a.numerator * b.denominator - b.numerator * a.denominator) / (a.denominator * b.denominator).","The result is reduced by gcd, with the sign only on the numerator; 0 is numerator 0 over denominator 1.","Input, intermediate, and output numerators and denominators may have at most 1000 digits excluding sign."],"limits":{"max_digits":1000},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["a","b"],"properties":{"a":{"type":"object","additionalProperties":false,"required":["numerator","denominator"],"properties":{"numerator":{"type":"string","maxLength":1001},"denominator":{"type":"string","maxLength":1001}}},"b":{"type":"object","additionalProperties":false,"required":["numerator","denominator"],"properties":{"numerator":{"type":"string","maxLength":1001},"denominator":{"type":"string","maxLength":1001}}}}},"output_schema":{"type":"object","additionalProperties":false,"required":["numerator","denominator"],"properties":{"numerator":{"type":"string"},"denominator":{"type":"string"}}},"examples":[{"input":{"a":{"numerator":"1","denominator":"2"},"b":{"numerator":"1","denominator":"3"}},"output":{"numerator":"1","denominator":"6"}}],"execute_url":"/v1/tools/rational-subtract/versions/1.0.0/execute"}