{"uid":"cap_fD7qV1Uo1w663rlnDiBT1","slug":"fraction-to-decimal-converter-repeating-cycle-detection-1601191e","name":"Fraction to Decimal Converter (Repeating Cycle Detection)","description":"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.","url":"https://fraction.openverbs.com/v1/to-decimal","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","required":["numerator"],"properties":{"maxDigits":{"type":"integer","maximum":10000,"minimum":1,"description":"Max fractional digits before truncating. Default 100."},"numerator":{"type":"integer","description":"The numerator."},"denominator":{"type":"integer","description":"The denominator. Default 1."}},"additionalProperties":false},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_eveZjtPg1j0XjnAgxPySA","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts a fraction (numerator/denominator) to its exact decimal representation, detecting repeating cycles and rendering them in parenthesis notation (e.g. 1/7 → '0.(142857)').","exampleAgentPrompt":"What's the exact decimal expansion of 1 divided by 7, showing any repeating cycle in parentheses?","exampleUseCases":[{"title":"Repeating decimal display for education","prompt":"Can you show me the full decimal form of 1 divided by 6 with the repeating part clearly marked in parentheses?"},{"title":"High-precision fraction expansion","prompt":"Expand 355 divided by 113 to its decimal, up to 200 digits, and highlight any repeating cycle."},{"title":"Verify fraction arithmetic result","prompt":"I got 5/12 as my answer to a problem — what's that as a decimal, with repeating digits shown?"}],"resultDescription":"Returns the decimal string representation of the fraction, with any repeating cycle enclosed in parentheses (e.g. '0.1(6)' for 1/6, '0.(142857)' for 1/7). Non-repeating expansions are capped by maxDigits (default 100). A zero denominator returns a clean 400 error.","failureModes":["Zero denominator returns HTTP 400 with a clean error message","maxDigits out of range (below 1 or above 10000) may cause validation error","Non-integer numerator or denominator will fail schema validation","Missing required numerator field returns a 400 validation error"],"whenToPreferThis":"Choose this endpoint when you need the exact decimal representation of a fraction with explicit repeating-cycle detection rendered in parenthesis notation, rather than a floating-point approximation. It is ideal for mathematical education tools, number theory applications, or any workflow requiring precise rational number display. Prefer it over generic division APIs when the repeating/non-repeating structure of the decimal expansion is semantically important.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:30:24.541Z","isFirstParty":false}