Opened 4 years ago
Closed 3 years ago
#14778 closed defect (fixed)
Fix numerical_approx with algorithm keyword
Reported by:  kcrisman  Owned by:  burcin 

Priority:  major  Milestone:  sage6.2 
Component:  symbolics  Keywords:  algorithm 
Cc:  eviatarbach  Merged in:  
Authors:  Eviatar Bach  Reviewers:  Ralf Stephan 
Report Upstream:  N/A  Work issues:  
Branch:  f9d60c8 (Commits)  Commit:  f9d60c844c01d4153fe96705cdfd7a5b5dbdebbf 
Dependencies:  #12289  Stopgaps: 
Description
This is not currently an issue since we haven't implemented it, but we should make it work. See #12289.
sage: erf(1).n(algorithm='foo') 0.842700792949715 sage: erf(0) 0 sage: parent(erf(0)) Integer Ring sage: erf(0).n(algorithm='foo')  TypeError Traceback (most recent call last) /Users/mcneil/sagedev/sage5.1.beta0b/sage5.1.beta0/devel/sagehack2/sage/<ipython console> in <module>() /Users/mcneil/sagedev/sage5.1.beta0b/sage5.1.beta0/local/lib/python2.7/sitepackages/sage/structure/element.so in sage.structure.element.Element.numerical_approx (sage/structure/element.c:4988)() TypeError: numerical_approx() got an unexpected keyword argument 'algorithm'
Attachments (1)
Change History (12)
comment:1 Changed 4 years ago by
 Cc eviatarbach added
comment:2 Changed 4 years ago by
 Milestone changed from sage5.11 to sage5.12
comment:3 Changed 4 years ago by
 Dependencies set to #12289
Changed 4 years ago by
comment:4 Changed 4 years ago by
 Status changed from new to needs_review
comment:5 Changed 4 years ago by
comment:6 Changed 4 years ago by
I just searched the source for _numerical_approx
methods, which is what gets called when the numerical_approx
function is called on an object, which is what Element
uses for the numerical approximation method as well.
comment:7 Changed 3 years ago by
 Milestone changed from sage6.1 to sage6.2
comment:8 Changed 3 years ago by
 Branch set to u/rws/ticket/14778
 Created changed from 06/19/13 20:58:16 to 06/19/13 20:58:16
 Modified changed from 01/30/14 21:20:52 to 01/30/14 21:20:52
comment:9 Changed 3 years ago by
 Commit set to f9d60c844c01d4153fe96705cdfd7a5b5dbdebbf
 Keywords algorithm added
 Reviewers set to Ralf Stephan
 Status changed from needs_review to positive_review
Rebased on 6.2.beta2. Everything builds and tests OK. Easy patch, positive. Hope it's OK to copy the author name from the patch.
New commits:
f9d60c8  Trac #14778: Fix numerical_approx with algorithm keyword

comment:10 Changed 3 years ago by
Thanks so much for reviewing!
comment:11 Changed 3 years ago by
 Branch changed from u/rws/ticket/14778 to f9d60c844c01d4153fe96705cdfd7a5b5dbdebbf
 Resolution set to fixed
 Status changed from positive_review to closed
Note: See
TracTickets for help on using
tickets.
I don't see any obvious problems with this. How did you check whether you found all possible places where numerical approximation would potentially get this keyword? Otherwise it looks good and ready to test, though patchbot hasn't gotten around to it. Not sure what the story is on that.