Skip to content
r.

Fraction.js

rawify/Fraction.js · Public GitHub repository

The RAW rational numbers library written in JavaScript

Open project in RepoShelf

Open the project to try its demo, view the repository, or save it to your collection. Repository and demo actions use RepoShelf’s sign-in flow.

Fraction.js live demo screenshot
Captured from the live demo · 2026-11-03

About this project

Author-written excerpt from the project README.

Do you find the limitations of floating-point arithmetic frustrating, especially when rational and irrational numbers like π or √2 are stored within the same finite precision? This can lead to avoidable inaccuracies such as:

For applications requiring higher precision or where working with fractions is preferable, consider incorporating Fraction.js into your project.

The library effectively addresses precision issues, as demonstrated below:

Requirements and intended audience

Do you find the limitations of floating-point arithmetic frustrating, especially when rational and irrational numbers like π or √2 are stored within the same finite precision? This can lead to avoidable inaccuracies such as:

Not recorded: external api key, paid service, self-hosting. Missing information does not mean there are no requirements.

Statements extracted from the author’s documentation · Checked 2026-10-21. Source: https://github.com/rawify/Fraction.js/blob/main/README.md

Recorded maintenance information

Last recorded source update: 2025-09-26. A published release has not been recorded. These dates do not guarantee ongoing maintenance.

Technologies
JavaScript
Licence
MIT. Generally permits modification and commercial use, subject to the licence’s notices and conditions.
Demo check
A public page loaded on 2026-11-23. This does not test every feature.

Browse related categories