octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #43344] specfun: Jacobian elliptic dn() precis


From: Hartmut Henkel
Subject: [Octave-bug-tracker] [bug #43344] specfun: Jacobian elliptic dn() precision loss
Date: Wed, 01 Oct 2014 21:26:01 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20140924 Firefox/24.0 Iceweasel/24.8.1

URL:
  <http://savannah.gnu.org/bugs/?43344>

                 Summary: specfun: Jacobian elliptic dn() precision loss
                 Project: GNU Octave
            Submitted by: hhenkel
            Submitted on: Mi 01 Okt 2014 21:26:01 GMT
                Category: Octave Forge Package
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: Hartmut Henkel
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: other
        Operating System: GNU/Linux

    _______________________________________________________

Details:

Bug in specfun-1.1.0.tar.gz, file ellipj.cc, function sncndn() in line 116:
dn(K(m),m) gives wrong result. Error demonstration:


octave:3> [s,c,d]=ellipj(ellipke(0.5),0.5)
s =  1
c =  6.1230e-17
d =  0.99997 <------ WRONG
octave:4> [s,c,d]=ellipj(ellipke(0.5)+1e-12,0.5)
s =  1
c = -7.0715e-13
d =  0.70697
octave:5> [s,c,d]=ellipj(ellipke(0.5)+1e-3,0.5)
s =  1.00000
c = -7.0711e-04
d =  0.70711


Bug is known already since approx. 2001, see e. g.,
http://bugs.alglib.net/view.php?id=573

sn() and cn() are not affected. Fix is straight-forward: Use dn() definition
from A&S 16.1.5. Patch is attached.




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Mi 01 Okt 2014 21:26:01 GMT  Name: ellipj.cc.patch  Size: 268B   By:
hhenkel
Patch file,1 line to be changed.
<http://savannah.gnu.org/bugs/download.php?file_id=32208>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?43344>

_______________________________________________
  Nachricht gesendet von/durch Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]