iriscouch / bigdecimal.js

Arbitrary-precision Javascript BigInteger and BigDecimal real numbers
Apache License 2.0
243 stars 25 forks source link

Operations on BigInt and BigDec? #13

Open trusktr opened 11 years ago

trusktr commented 11 years ago

Can we combine ints and decs in calculations?

for example, the following.

var a = b.BigDecimal('123456.123456789012345678901234567890');
var b = b.BigInteger(123456123456789012345678901234567890);

var result = a.multiply(b);

Is that allowed? Can you add instructions for browser usage?

thallium205 commented 11 years ago

No, you can't. Review the documentation: http://docs.oracle.com/javase/1.5.0/docs/api/java/math/BigDecimal.html#multiply(java.math.BigDecimal)