Ticket #5722 (closed defect: fixed)
[with patch, positive review] fast callable pow
| Reported by: | robertwb | Owned by: | somebody |
|---|---|---|---|
| Priority: | critical | Milestone: | sage-3.4.1 |
| Component: | basic arithmetic | Keywords: | |
| Cc: | cwitty | Work issues: | |
| Report Upstream: | Reviewers: | ||
| Authors: | Merged in: | ||
| Dependencies: | Stopgaps: |
Description
pow(double, double) inconsistent for bad input. See extensive documentation in floatobject.c
Attachments
Change History
comment:1 Changed 4 years ago by robertwb
- Summary changed from fast callable pow to [with patch, needs review] fast callable pow
comment:2 Changed 4 years ago by mabshoff
Oops, I spoke too soon in person. There are two doctest failures that need fixing:
sage -t -long "devel/sage/sage/ext/fast_callable.pyx"
**********************************************************************
File "/scratch/mabshoff/sage-3.4.1.rc2/devel/sage/sage/ext/fast_callable.pyx", line 2213:
sage: fast_callable(sin(x)/x, vars=[x], domain=RDF).get_orig_args()
Expected:
{'domain': Real Double Field, 'code': [0, 0, 16, 0, 0, 7, 2], 'py_constants': [], 'args': 1, 'stack': 2, 'constants': []}
Got:
{'domain': Real Double Field, 'code': [0, 0, 16, 0, 0, 8, 2], 'py_constants': [], 'args': 1, 'stack': 2, 'constants': []}
**********************************************************************
1 items had failures:
And
sage -t -long "devel/sage/sage/ext/gen_interpreters.py"
**********************************************************************
File "/scratch/mabshoff/sage-3.4.1.rc2/devel/sage/sage/ext/gen_interpreters.py", line 2772:
sage: print buff.getvalue()
Expected:
case 7: /* div */
{
double i1 = *--stack;
double i0 = *--stack;
double o0;
o0 = i0 / i1;
*stack++ = o0;
}
break;
<BLANKLINE>
Got:
case 8: /* div */
{
double i1 = *--stack;
double i0 = *--stack;
double o0;
o0 = i0 / i1;
*stack++ = o0;
}
break;
<BLANKLINE>
<SNIP>
I think that just the doctests need to be updated, but I will leave this to you :)
Cheers,
Michael
comment:4 Changed 4 years ago by mabshoff
Hi Robert,
there are actually two more doctest failure that I cut off since the failure message is quite long:
File "/scratch/mabshoff/sage-3.4.1.rc2/devel/sage-main/sage/ext/gen_interpreters.py", line 3592: File "/scratch/mabshoff/sage-3.4.1.rc2/devel/sage-main/sage/ext/gen_interpreters.py", line 3608:
Sorry for causing confusion ;)
But the other doctest failures are fixed.
Cheers,
Michael
Note: See
TracTickets for help on using
tickets.

