Changes between Initial Version and Version 5 of Ticket #13050
 Timestamp:
 06/19/13 06:19:14 (7 years ago)
Legend:
 Unmodified
 Added
 Removed
 Modified

Ticket #13050

Property
Dependencies
changed from
12289
to#12289

Property
Summary
changed from
change default numerical evaluation of `erf` to use mpmath
toallow different algorithms for evaluating erf

Property
Dependencies
changed from

Ticket #13050 – Description
initial v5 1 In #1173 an mpmath numerical evaluator for `erf` was written by Douglas !McNeil. This ticket proposes to save that code, incorporate it with the ability to pass an `algorithm` parameter to `numerical_approx` from #12289 and solve #13003 all in one go.1 In #1173 an mpmath numerical evaluator for `erf` was written by Douglas !McNeil. This ticket proposes to save that code, incorporate it with the ability to pass an `algorithm` parameter to `numerical_approx` from #12289. We could support Pari, mpmath, and Maxima. 2 2 3 The mpmath evaluator is more robust than PARI, e.g. at large inputs. This is a good reason to switch the default numerical evaluation of `erf` to use mpmath like most of the rest of the new symbolic functions in Sage. 4 5 In PARIs favor, it is faster for some inputs: 6 {{{ 7 sage: timeit('erf(2).n()') 8 625 loops, best of 3: 153 µs per loop 9 sage: timeit("erf(2).n(algorithm='pari')") 10 625 loops, best of 3: 135 µs per loop 11 }}} 12 but not always: 13 {{{ 14 sage: timeit('erf(10^7).n()') 15 625 loops, best of 3: 118 µs per loop 16 sage: timeit('erf(10^7).n(algorithm="pari")') 17 625 loops, best of 3: 132 µs per loop 18 }}} 3 It would even be useful to see where Pari is faster.