Apr 3, 2013 at 1:19am UTC
That's not what I need to do... :'(
I only need a way to insert whatever user input in variable "funcion", after the return in the f function...
Apr 3, 2013 at 1:36am UTC
All you have to do is change the value of fVal and evaluate the expression again, over and over, and it will be like plugging in an testing each point as you want.
Apr 3, 2013 at 1:40am UTC
That's the problem...
The expression and the values will change with every user. I will test x*x*x-x-2 with 1 and 2, but another user will test (x-1)(x-2) with -3 and 3, another user will test it with whatever crazy formula he thinks...
Apr 3, 2013 at 1:42am UTC
I don't see the problem here. A different user can just type in a different formula in when they run your program.
Apr 3, 2013 at 3:12am UTC
Is there integer rounding involved?
Apr 3, 2013 at 3:30am UTC
I'm not doing any kind of rounding. I don't know if muparser is, I don't think so...
Apr 3, 2013 at 3:31am UTC
Are you dealing with integers anywhere, then?
Apr 3, 2013 at 3:47am UTC
Yes, Maxiter and numiter are both integers, but they play a role only in stopping the bisection method, they are not involved in any calculation.