diff --git a/src/distPlus/expressionTree/MathjsWrapper.js b/src/distPlus/expressionTree/MathjsWrapper.js new file mode 100644 index 00000000..3546ba42 --- /dev/null +++ b/src/distPlus/expressionTree/MathjsWrapper.js @@ -0,0 +1,9 @@ +const math = require("mathjs"); + +function parseMath(f) { + return JSON.parse(JSON.stringify(math.parse(f))) +}; + +module.exports = { + parseMath, +}; \ No newline at end of file diff --git a/src/distPlus/expressionTree/Operation.re b/src/distPlus/expressionTree/Operation.re index 112ca17e..b2214c1e 100644 --- a/src/distPlus/expressionTree/Operation.re +++ b/src/distPlus/expressionTree/Operation.re @@ -58,9 +58,9 @@ module Scale = { let format = (operation: t, value, scaleBy) => switch (operation) { - | `Multiply => {j|scaleMultiply($value, $scaleBy) |j} - | `Exponentiate => {j|ScaleExponentiate($value, $scaleBy) |j} - | `Log => {j|ScaleLog($value, $scaleBy) |j} + | `Multiply => {j|verticalMultiply($value, $scaleBy) |j} + | `Exponentiate => {j|verticalExponentiate($value, $scaleBy) |j} + | `Log => {j|verticalLog($value, $scaleBy) |j} }; let toKnownIntegralSumFn =