[Scilab-users] How to fix the round off error of "intg"

fujimoto2005 fujimoto2005 at gmail.com
Mon Nov 18 17:54:59 CET 2019


Dear Samuel
Thank you for your reply.

Inside the function f(x),I added "disp" to display the value of x and error
flag "ierr" after "intg" line .

The "fsolve" and "numderivative" called f many times for many x around the
correct solution x, and the values of x and ierr were displayed for many
calls.
I couldn't find regularity because ierr = 2 occurs for x very close to x
with ierr = 0. I couldn't find the cause of the rounding error.
I couldn't proceed further since the inside of "intg" could not be
monitored.

However, when "ierr" is output, it turns out that the code did not stop even
if the rounding error occurs. As a result, fsolve could find the correct x.

I adopted this ad-hoc solution. Since the inside of g (x, z) have not been
improved so that rounding errors do not occur reliably, similar problems may
occur in the future, but I decided to satisfy this ad-hoc solution.

Best regards,
Masahiro Fujimoto




--
Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html



More information about the users mailing list