Skip to content

make-github-pseudonymous-again/js-rational-field

Repository files navigation

Number systems
User:Mortalmoth / Public Domain

Rational field for JavaScript (ℚ). Based on @aureooms/js-rational and @aureooms/js-integer. See docs. Parent is @aureooms/js-algorithms.

Try it on RunKit!

⚠️ The code needs a ES2015+ polyfill to run (regeneratorRuntime), for instance @babel/polyfill.

QQ.from('0.1').add(QQ.from('0.2')).toFixed(); // 0.3
QQ.from(355,113).toFixed(); // 3.|1415929203539823008849557522123893805309734513274336283185840707964601769911504424778761061946902654867256637168

License Version Build Dependencies Dev dependencies GitHub issues Downloads

Code issues Code maintainability Code coverage (cov) Code technical debt Documentation Package size