Opened 5 years ago

Last modified 3 years ago

#13050 new enhancement

allow different algorithms for evaluating erf

Reported by: benjaminfjones Owned by: burcin
Priority: minor Milestone: sage-6.4
Component: symbolics Keywords: sd40.5 mpmath pari erf
Cc: dsm, kcrisman Merged in:
Authors: Benjamin Jones Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: #12289 Stopgaps:

Description (last modified by kcrisman)

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.

It would even be useful to see where Pari is faster.

Attachments (1)

trac_13050_erf_mpmath_eval.patch (5.1 KB) - added by benjaminfjones 5 years ago.
add mpmath evaluation to erf

Download all attachments as: .zip

Change History (10)

Changed 5 years ago by benjaminfjones

add mpmath evaluation to erf

comment:1 Changed 5 years ago by benjaminfjones

  • Dependencies changed from 12289 to #12289

comment:2 Changed 5 years ago by kcrisman

See comments at #11948 for why we probably want to do this or #1173 as soon as possible.

comment:3 follow-up: Changed 5 years ago by jdemeyer

This looks like a duplicate of #1173 to me.

comment:4 in reply to: ↑ 3 Changed 5 years ago by kcrisman

This looks like a duplicate of #1173 to me.

I think that the point of this ticket was to do some of the things at #1173 more quickly, or using a different infrastructure, or something. Ben, what was the rationale exactly?

comment:5 Changed 4 years ago by kcrisman

  • Description modified (diff)
  • Summary changed from change default numerical evaluation of `erf` to use mpmath to allow different algorithms for evaluating erf

I think that we can repurpose this ticket to adding the algorithm keyword here. Some good examples from #1173 (most were added in #13001):

Verify we're returning the appropriate zero:: 

            sage: erf(0) 
            0 
            sage: erf(0.0) 
            0.000000000000000 
            sage: erf(RealField(100)(0)) 
            0.00000000000000000000000000000 
set(erf(45*10**i).n() for i in range(10)) 
sage: CC(erf(ComplexField(1000)(2+3j))) 

comment:6 Changed 4 years ago by jdemeyer

  • Milestone changed from sage-5.11 to sage-5.12

comment:7 Changed 3 years ago by vbraun_spam

  • Milestone changed from sage-6.1 to sage-6.2

comment:8 Changed 3 years ago by vbraun_spam

  • Milestone changed from sage-6.2 to sage-6.3

comment:9 Changed 3 years ago by vbraun_spam

  • Milestone changed from sage-6.3 to sage-6.4
Note: See TracTickets for help on using tickets.