#2619 Function inverse_erf - error in numerical evaluation

None
closed
nobody
5
2013-08-28
2013-08-04
No

For some specific numerical values of the argument, on following system

version="5.30.0",timestamp="2013−06−06 13:08:24",
host="x86_64−unknown−linux−gnu",lisp_name="SBCL",lisp_version="1.1.8"

I get error message like this

bfnewton: failed to converge after 1001 iterations: 
delta = 2.031685591236162e16,  x = 0.8515204685911937
 -- an error. To debug this try: debugmode(true);

For example

(%i2) inverse_erf(0.7715);
bfnewton: failed to converge after 1001 iterations:
delta = 2.031685591236162e16,  x = 0.8515204685911937
 -- an error. To debug this try: debugmode(true);

When I looked into gamma.lisp I saw, that there are two routines to evaluate inverse function by finding roots: float-newton and bfloat-newton. So why do I get the error message form bfloat-newton when argument is float?

Discussion

  • Raymond Toy

    Raymond Toy - 2013-08-05

    This error is caused by a too small threshold (epsilon) value.

    For the record, bf-inverse-erf is the routine to compute the values of inverse_erf, and it's used for both float and bfloat values. And bf-inverse-erf calls bf-newton, which is different from bfloat-newton.
    (The latter wants a symbolic function that will be differentiated.)

     
  • Kwisatz Haderach

    Thank you very much for your response. I will try to modify this value and compile modified Maxima. Although, I don't know anything about Lisp and therefore I have very low chances of success;) What is interesting in Maxima 5.28 on Windows 7 32-bit I don't have this problem.

    Regards,
    Kwisatz

     
  • Raymond Toy

    Raymond Toy - 2013-08-05

    If you want to fix this yourself, near line 2758, change

    (cl:real (* 2 maxima::flonum-epsilon))
    

    to

    (cl:real (* 3 maxima::flonum-epsilon))
    

    This doesn't happen on 5.28 because it's very likely this code didn't exist in that version.

     
  • Raymond Toy

    Raymond Toy - 2013-08-06
    • labels: --> Lisp Core - Floating point
    • status: open --> closed
     
  • Kwisatz Haderach

    Thanks. That solved the problem. Almost:) There is still minor issue. On newest version from git, compiled on same machine with sbcl, when I plot inverse_erf, still I get 2 error mesages. Nevertheless, quad_qags has no problem with numerical integration of functions that involve the inverse_erf. That was most important for me.

    Again thank you very much for such quick response. You don't get such support for commercial software;)

     
  • Raymond Toy

    Raymond Toy - 2013-08-06

    Please tell me what error message you get or how I can run the same plot. It can't be fixed if we don't know what the issue is. :-)

     
  • Raymond Toy

    Raymond Toy - 2013-08-06

    Uh, preferably in a new bug since this is closed now.

     
  • Kwisatz Haderach

    0k. I will post new bug with all details. I will do it in next week, since I will be away for few days. I will also run some scripts I wrote and see if there is anything else interesting related to "inverse_erf". Cheers;)

     
  • Kwisatz Haderach

    Sorry for late response. I've downloaded latest source code from GIT and discussed problem no longer appears. Again thank you for all.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks