Divendo / math-dragon

An Android app that features an intuitive drag&drop interface for solving mathematical problems
GNU Lesser General Public License v3.0
15 stars 10 forks source link

deriviatives crash on substitution #145

Closed TimdeJonge closed 10 years ago

TimdeJonge commented 10 years ago

Try differentiating sin(x) after you've substituted x = 0. Expected behaviour: return cos(0), I.e. 1. Actual behaviour: return 0, I.e. dsin(0)/d0

Divendo commented 10 years ago

Marked as invalid, substitutions are done before evaluating. Variables that are substituted should be considered constant values.

TimdeJonge commented 10 years ago

I, too, can see that's what's happening. What I'm trying to say is that's not how it should be - there now is no way to evaluate a deriviative at a certain point, and as such, the only way to calculate f'(x) for given x is to first calculate f'(x), then recreate that formula in the home screen, then substitute x for it. Seems like a rather inconvenient procedure. I'm fine with it being a "wontfix", or if there's a more compelling argument than "it just doesn't work that way", that'd be great, too.

Divendo commented 10 years ago

Didn't look on it that way, local fix ready.