Removing unneeded and buggy simplifications.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
ddb5156396
commit
de1be925b0
1 changed files with 8 additions and 8 deletions
|
@ -128,14 +128,14 @@ function textsub(text) {
|
|||
function simplifyExpression(str) {
|
||||
var replacements = [
|
||||
// Operations not done by parser.
|
||||
[// Decomposition way 2
|
||||
/(^|[+-] |\()([-.\d\w]+) ([*/]) \((([-.\d\w] [*/] )?[-\d\w.]+) ([+\-]) (([-.\d\w] [*/] )?[\d\w.+]+)\)($| [+-]|\))/g,
|
||||
"$1$2 $3 $4 $6 $2 $3 $7$9"
|
||||
],
|
||||
[ // Decomposition way 2
|
||||
/(^|[+-] |\()\((([-.\d\w] [*/] )?[-\d\w.]+) ([+\-]) (([-.\d\w] [*/] )?[\d\w.+]+)\) ([*/]) ([-.\d\w]+)($| [+-]|\))/g,
|
||||
"$1$2 $7 $8 $4 $5 $7 $8$9"
|
||||
],
|
||||
// [// Decomposition way 2
|
||||
// /(^|[+-] |\()([-.\d\w]+) ([*/]) \((([-.\d\w] [*/] )?[-\d\w.]+) ([+\-]) (([-.\d\w] [*/] )?[\d\w.+]+)\)($| [+-]|\))/g,
|
||||
// "$1$2 $3 $4 $6 $2 $3 $7$9"
|
||||
// ],
|
||||
// [ // Decomposition way 2
|
||||
// /(^|[+-] |\()\((([-.\d\w] [*/] )?[-\d\w.]+) ([+\-]) (([-.\d\w] [*/] )?[\d\w.+]+)\) ([*/]) ([-.\d\w]+)($| [+-]|\))/g,
|
||||
// "$1$2 $7 $8 $4 $5 $7 $8$9"
|
||||
// ],
|
||||
[ // Factorisation of π elements.
|
||||
/(([-\d\w.]+ [*/] )*)(pi|π)(( [/*] [-\d\w.]+)*) ([+-]) (([-\d\w.]+ [*/] )*)(pi|π)(( [/*] [-\d\w.]+)*)?/g,
|
||||
function(match, m1, n1, pi1, m2, ope2, n2, opeM, m3, n3, pi2, m4, ope4, n4) {
|
||||
|
|
Loading…
Reference in a new issue