From 9f30b6d75c006d97301fdd18d2cf2cb621f246e7 Mon Sep 17 00:00:00 2001 From: Ozzie Gooen Date: Thu, 2 Jul 2020 18:29:04 +0100 Subject: [PATCH] Added back MathjsWrapper, which I accidentally lost --- src/distPlus/expressionTree/MathjsWrapper.js | 9 +++++++++ src/distPlus/expressionTree/Operation.re | 6 +++--- 2 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 src/distPlus/expressionTree/MathjsWrapper.js 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 =