Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including TPA with all npm packages installed. Try it out:

var Tpa=require('TPA'); // Create 3 new Tpa numbers var n1=new Tpa('123 43/57'); var n2=new Tpa('-5.57[13]'); var n3=new Tpa(12.6); // Multiply them together into a new Tpa starting at 1 var product=Tpa(1,false); // 'false' means NOT an integer - i.e. can hold fractional part product.multiply(n1).multiply(n2).multiply(n3).simplify(); // et voila... '['+n1.toFraction()+'] * ['+n2.toFraction()+'] * ['+n3.toFraction()+'] equals ['+product.toFraction()+'] ('+product.toDecimal()+')';

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

TPA v1.0.14

Total Precision Arithmetic

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free