RATIOKIND / 04 — Decimal to fraction
Decimal to fraction.
Convert a finite decimal string exactly, without binary floating-point rounding.
Decimal to fraction
Convert a finite decimal string exactly, without binary floating-point rounding.
Loading your local workspace…
THE METHOD
From input to answer.
- 01
Open the example and replace its values with your own inputs. Use the stated units and limits.
- 02
Use the decimal digits as an integer over 10 to the number of decimal places, then reduce.
- 03
Review the live result. Download CSV, export the available SVG schematic, or print from your browser.
A worked example
0.125 becomes 1/8 exactly.
A FEW USEFUL ANSWERS
Good to know.
Are my inputs uploaded?
No. Calculations and exports run on your device. The host receives normal requests for pages and assets.
How can I keep my work?
Valid edits autosave in this browser. Back up as JSON before changing devices or clearing site data. Imports are validated and ask for confirmation before replacing work.
Can I use both languages?
Yes. Both languages use the same logic and browser storage. English is at /; Chinese is at /zh/.