Open kriukov opened 9 years ago
What do you mean by "changing the midpoint helps"? What would the implementation be?
If we grow one of the ends of the original interval once by a tiny amount (like in the Newton algorithm), the midpoint will change by half of that amount and will no longer cause a problem.
On Mon, Oct 6, 2014 at 6:01 PM, kriukov notifications@github.com wrote:
If we grow one of the ends of the original interval once by a tiny amount (like in the Newton algorithm), the midpoint will change by half of that amount and will no longer cause a problem.
I do not like that solution. I think you can just check if the mid-point is zero, and choose a different point if it is. I don't think the user should have to fiddle with the interval they want to use if the algorithm throws a random, strange error.
— Reply to this email directly or view it on GitHub https://github.com/kriukov/interval-methods/issues/5#issuecomment-58113599 .
http://sistemas.fciencias.unam.mx/~dsanders
Cubículo / office: #414, 4o. piso del Depto. de Física
Tel.: +52 55 5622 4965
I implemented the check and if the midpoint is zero, it takes a different value. It passes the tests.
David Sanders wrote:
On Mon, Oct 6, 2014 at 6:01 PM, kriukov notifications@github.com wrote:
If we grow one of the ends of the original interval once by a tiny amount (like in the Newton algorithm), the midpoint will change by half of that amount and will no longer cause a problem.
I do not like that solution. I think you can just check if the mid-point is zero, and choose a different point if it is. I don't think the user should have to fiddle with the interval they want to use if the algorithm throws a random, strange error.
— Reply to this email directly or view it on GitHub
https://github.com/kriukov/interval-methods/issues/5#issuecomment-58113599
.
http://sistemas.fciencias.unam.mx/~dsanders
Cubículo / office: #414, 4o. piso del Depto. de Física
Tel.: +52 55 5622 4965
— Reply to this email directly or view it on GitHub https://github.com/kriukov/interval-methods/issues/5#issuecomment-58114018.
Example:
f(x) = -2.001 + 3x - x^3 a = Interval(-4, 2)
Changing the midpoint helps. Needs implementation.