jiggzson / nerdamer

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

Wrong result in limit #537

Closed FredericMrozinski closed 4 years ago

FredericMrozinski commented 4 years ago

Entering limit((4x^2-x)/(3x^2+x),x,∞) returns 1/3. However, the correct answer is 4/3. Also, entering limit(x/abs(x),x,0) returns 0, instead it should return [-1,1].

jiggzson commented 4 years ago

Plus limit((4x^2-x)/(3x^2+x),x,∞) takes an awfully long time to compute. Thanks for reporting. I'll take a look at it.

jiggzson commented 4 years ago

@FredericMrozinski, fixed.

FredericMrozinski commented 4 years ago

Dear Martin, thank you for getting back to the bug so quickly! I just tried the new version and I found results that still seemed to be wrong which are entering limit((7x^3+4x^2+x)/(12x^3+6x^2-2x),x,∞) returns 7/4 instead of 7/12 and limit((15*x^2+x)/(18*x^2-2*x),x,∞) returns 5/3 instead of 5/6. Hope that helps! Cheers, Frederic

jiggzson commented 4 years ago

Moving to #155

jiggzson commented 4 years ago

@FredericMrozinski, It's fixed but I suspect it might have been due to an issue with simplify. I'll investigate when I get some time.