Add a New Comment (Rich Markup)
Comment Type & Canned Response: None None > Multiple Canned Responses Fixed in development Crash with no stack trace Already fixed in newer version Fixed in stable Bad description Bad description and crash Bad stack trace Obsolete version Duplicate and not fixed Duplicate and needs more info Duplicate and fixed Need info and old
Fixes from GSOC2018 special function project were incorporated during OctConf 2018. Closing report.
Scipy appears to use a combination of the amos library and the cephes bessel functions (http://www.netlib.org/cephes/).
Changing status to confirmed, and adding some details from the mailing list (http://thread.gmane.org/gmane.comp.gnu.octave.maintainers/46617).
The bessel functions come from the amos library (http://netlib.org/amos/) which is embedded in liboctave, so any numerical problems are inherited from that implementation.
Octave gives "besselj(1, 1e10)" as "NaN + NaNI".
Octave:
>> O = besselj(1, 10.^[5:12]') O = 0.00184675756288257 + 0i -0.000725968356813763 + 0i 0.000236899240312058 + 0i 7.30639118155185e-05 + 0i -5.21042264155388e-06 + 0i NaN + NaNi NaN + NaNi NaN + NaNi
Symbolic pkg, converted to double:
>> S = double(besselj(1, sym(10).^[5:12]')) S = 0.00184675756288257 -0.000725968356813763 0.000236899240312058 7.30639118155185e-05 -5.21042264155388e-06 -7.67650817568416e-06 9.95266266795786e-07 -7.91380268385044e-07
The relative accuracy is fine before blow-up:
>> abs(O-S)./abs(S) ans = 1.17416838493212e-16 1.49345651543824e-16 1.14415961302507e-16 0 1.62565113336314e-16 NaN NaN NaN
(Ironically, I found this when I went looking for a function with good relative error behaviour even though it decays to zero! viz., #48307)
(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)
Attach Files: Comment:
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Only project members can vote.
Please enter the title of George Orwell's famous dystopian book (it's a date):
Follow 5 latest changes.
Copyright © 2022 Free Software Foundation, Inc. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. The Levitating, Meditating, Flute-playing Gnu logo is a GNU GPL'ed image provided by the Nevrax Design Team. Source Code
Powered by Savane 3.9