From 492e715f005baf7bb9509fad9363b9a8d9d2760c Mon Sep 17 00:00:00 2001 From: Ad5001 Date: Wed, 12 Jan 2022 14:52:00 +0100 Subject: [PATCH] Fixing bug for formulas of type (x + y) / z simplifications. --- LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/utils.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/utils.js index ecd38fb..2ac90a6 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/utils.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/utils.js @@ -134,7 +134,7 @@ function simplifyExpression(str) { ], [ // Decomposition way 2 /(^.?|[+-] |\()\((([-.\d\w] [*/] )?[-\d\w.]+) ([+\-]) (([-.\d\w] [*/] )?[\d\w.+]+)\) ([*/]) ([-.\d\w]+)(.?$| [+-]|\))/g, - "$1$8 $7 $2 $4 $8 $7 $5$9" + "$1$2 $7 $8 $4 $5 $7 $8$9" ], [ // Factorisation of π elements. /(([-\d\w.]+ [*/] )*)(pi|π)(( [/*] [-\d\w.]+)*) ([+-]) (([-\d\w.]+ [*/] )*)(pi|π)(( [/*] [-\d\w.]+)*)?/g,