josdejong / josdejong/mathjs

math.rationalize() made some mistakes

Open
#2,080 5 comments 0 reactions 0 assignees View on GitHub
feature help wanted
Dominant language
JavaScript
Stars
15.1k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

So I'm extremely happy with math.js, but I've had some problems with the following. Does anyone have a fix, I'm not sure what to do.

`(a - b) + (a + 2b)` was solved as `a - b + a + 2 b` and it should be `2a + b`

`2y + (3 - 4x) * 2 - 7x` was solved as `2 y - 8 * x - 7 * x + 6` and it should be `-15x + 2y + 6`

`2y + (3 + 4x) * 3 - 8x` was solved as `2 y - 8 * x + 9 + 12 * x` and it should be `4x + 2y + 9`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.