[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-patch-tracker] [patch #9549] Improve expint handled of signed ze
From: |
Rik |
Subject: |
[Octave-patch-tracker] [patch #9549] Improve expint handled of signed zero |
Date: |
Tue, 11 Dec 2018 11:47:13 -0500 (EST) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 Edge/15.15063 |
Follow-up Comment #4, patch #9549 (project octave):
So currently Matlab and Octave are compatible. Is it more useful to be
mathematically correct, or compatible? Here is a bit of testing I did in
Octave
octave:1> expint (-0)
ans = Inf
octave:2> expint (-1e-6)
ans = 13.2383 - 3.1416i
octave:3> expint (-1e-8)
ans = 17.8435 - 3.1416i
octave:4> expint (-1e-9)
ans = 20.1461 - 3.1416i
octave:5> expint (-1e-10)
ans = 22.4486 - 3.1416i
octave:6> expint (1e-10)
ans = 22.449
octave:7> expint (1e-11)
ans = 24.751
octave:8> expint (-1e-11)
ans = 24.7512 - 3.1416i
If the expint function is continuous then as you approach 0 from the negative
direction it does seem like the value should converge to complex (Inf, -pi) as
the first changeset does. But, you know there are a bunch of Matlab folks who
will whine if the result is not exactly the same.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/patch/?9549>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/