simple-squiggle

A restricted subset of Squiggle
Log | Files | Refs | README

arithmetic.js (567B)


      1 var signature1 = 'BigNumber';
      2 var signature2 = 'BigNumber, BigNumber';
      3 export function absBigNumber(a) {
      4   return a.abs();
      5 }
      6 absBigNumber.signature = signature1;
      7 export function addBigNumber(a, b) {
      8   return a.add(b);
      9 }
     10 addBigNumber.signature = signature2;
     11 export function subtractBigNumber(a, b) {
     12   return a.sub(b);
     13 }
     14 subtractBigNumber.signature = signature2;
     15 export function multiplyBigNumber(a, b) {
     16   return a.mul(b);
     17 }
     18 multiplyBigNumber.signature = signature2;
     19 export function divideBigNumber(a, b) {
     20   return a.div(b);
     21 }
     22 divideBigNumber.signature = signature2;