Merge pull request #2 from josdejong/develop#1173
Conversation
2 new simplification rules and small changes in rationalize. New test set in rationalize.test
LINT corrections
|
My local test in
I've researched in Internet and they say that |
lint corrections
lint corrections
small bug fixes
small corrections
Number type error
small fixes (Travis)
small lint fixes
2 small fixes (Travis)
|
Now everything is OK. The only complain is that I don't get run Mocha in my local environment, so I should to rewrite |
|
Thanks a lot for the fixes and improvements Paulo, looks good! I don't fully understand
Sorry for the inconvenience. One month ago we released v5.0.0 where we changed the code from ES5 to ES6+, and set up build scripts to compile modern JS (in Or simply run |
Yes, you are right, @josdejong. I'll make the changes accordingly. |
Add a new option parameter in simplify as an object with property exactFractions
small fixes
lint fixes
lint fixes
lint fixes
small fixes
small fix II
small fix III
more fixes
very small fix
|
Done! Your suggestion was much better than mine, but I had to change the parameter profile in Now there is a new parameter in
I've added some calls to |
| * Syntax: | ||
| * | ||
| * simplify(expr) | ||
| * simplify(expr)n |
There was a problem hiding this comment.
I think the added character n is a typo?
|
Thanks @paulobuchsbaum , looks good like this, extending I'm not sure if you know this already, but you can run the linter locally via Here a few feedback points:
|
small changes
|
I try to change the code to make the I had changed and added 31 lines (> 21 lines that I said above). I've realized that using In the end, many new errors have arisen and I've got so confused, that I've reverted all changes to previous state. I give in! However, I think that it is very unlikely that new options will be necessary in Another day, I will transfer the rules from |
|
If all the auxiliary functions ( |
|
Thanks for giving it a try refactoring the
In mathjs we have that this situation for example with the dependency injection mechanism which passes |
|
I've refactored
I actually do like the transparency that I see after the refactoring: before, you had no clue that I guess it's partly personal preference and I guess we simply have different opinions here, which is ok. Thanks for the constructive discussion and your flexibility. |
|
Great! I've got the meaning of your refactoring. I've commit an error in |
|
Nice work here 👍 These changes look great, I agree that parsing options around will make this code much easier for others to read and will make maintainance much smoother going forwards 😄 |
|
@paulmasson your fixes and improvements are now available in v5.1.0. Thanks again for all your effort! |
|
You’d be welcome, but I think you mean @paulobuchsbaum |
|
whoops 😳, sorry Paul. I mean @paulobuchsbaum instead |
|
|
Fix of bug fixes in
rationalize.js, also changingsimplify.jsandsimplifyConstant.jsand more 2 bugs insimplify.jsandsimplifyconstant.jsin order to be possible passing inTravistest.Bugs in
simplifyConstant.jsandsimplify.jssimplifyConstant.js- I've changednew ConstantNode(stringNumber, 'number')tonew ConstantNode(number)simplify.js- Due to problems with a number node with string type, I've added!isNaN(node.value)))in number type test conditionBugs in
rationalize.jssimplify.jsandsimplifyConstant.js(next topic)New feature in
simplify.jsandsimplifyConstant.jslistCommStringsnew variable. The only string rule accepted so far is to turn off exact fraction conversion insimplifyConstant.js