Fixing bug for formulas of type (x + y) / z simplifications.
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Adsooi 2022-01-12 14:52:00 +01:00
parent ffe09a2b3d
commit 492e715f00
Signed by: Ad5001
GPG key ID: EF45F9C6AFE20160

View file

@ -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,