rational.js: tools and libraries using rational numbers.

npm install bigrat
12 downloads in the last week
24 downloads in the last month


javascript tools and libraries based around rational numbers.

heavily inspired by glMatrix (, a high performance matrix and vector library.

Example usage in Node.js:

var rational = require('bigrat').rational;
var a = new rational(4, 5); // 4/5 
var b = rational.fromDecimal(123.456789);
var c = a.times(b);
console.log('result: ' + c);


Releases: (only contains rat{} and rational{}) (includes bigrat{}, etc.)

npm loves you