Ticket #6171 (closed defect: fixed)
[with patch, positive review] make 'prec' work with sqrt more of the time
| Reported by: | jhpalmieri | Owned by: | jhpalmieri |
|---|---|---|---|
| Priority: | minor | Milestone: | sage-4.0.1 |
| Component: | algebra | Keywords: | |
| Cc: | Work issues: | ||
| Report Upstream: | Reviewers: | Mike Hansen | |
| Authors: | John Palmieri | Merged in: | 4.0.1.alpha0 |
| Dependencies: | Stopgaps: |
Description
Before this patch:
sage: sqrt(10.1, prec=100) ... TypeError: sqrt() got an unexpected keyword argument 'prec'
This is despite the fact that the docstring for sqrt lists as one of its inputs
- ``prec`` - integer (default: None): if None, returns
an exact square root; otherwise returns a numerical square root if
necessary, to the given bits of precision.
After this patch:
sage: sqrt(10.1, prec=100) 3.1780497164141406804582045589 sage: sqrt(10.1, prec=200) 3.1780497164141406804582045589354800553656236461562686475080
Attachments
Change History
comment:1 Changed 4 years ago by was
- Summary changed from [with patch, needs review] make 'prec' work with sqrt more of the time to [with patch, needs work] make 'prec' work with sqrt more of the time
comment:2 Changed 4 years ago by jhpalmieri
- Summary changed from [with patch, needs work] make 'prec' work with sqrt more of the time to [with patch, needs review] make 'prec' work with sqrt more of the time
Please add doctests to the patch illustrating that it fixes the bug.
Yes, sorry about that. I was just sitting down to produce a new patch when I saw this comment. Here's a new patch.
comment:3 Changed 4 years ago by mhansen
- Status changed from new to closed
- Resolution set to fixed
- Summary changed from [with patch, needs review] make 'prec' work with sqrt more of the time to [with patch, positive review] make 'prec' work with sqrt more of the time
Looks good to me.
Merged in 4.0.1.alpha0.
Note: See
TracTickets for help on using
tickets.


Please add doctests to the patch illustrating that it fixes the bug.