jiggzson / nerdamer

a symbolic math expression evaluator for javascript
http://www.nerdamer.com
MIT License
517 stars 82 forks source link

Fix bug #442 #444

Closed selairi closed 5 years ago

selairi commented 5 years ago

This a simple fix to #442 bug. It only changes the code from:

` if(m) retval = _.multiply(m, retval);

if(img) retval = _.multiply(img, retval); //put back the sign that was removed earlier

if(sign < 0) retval.power.negate();`

to

` if(sign < 0) retval.power.negate();

if(m) retval = _.multiply(m, retval);

if(img) retval = _.multiply(img, retval); //put back the sign that was removed earlier ` in line 5974.

jiggzson commented 5 years ago

@selairi thanks. Can you add a test for this fix as well?