Opened 12 years ago
Closed 12 years ago
#5199 closed defect (fixed)
[with patch, positive review] new symbolics can treat floats as integers inappropriately
Reported by: | cwitty | Owned by: | burcin |
---|---|---|---|
Priority: | major | Milestone: | sage-3.3 |
Component: | calculus | Keywords: | |
Cc: | burcin | Merged in: | |
Authors: | Reviewers: | ||
Report Upstream: | Work issues: | ||
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
Consider the following, in 3.3.alpha5:
sage: from sage.symbolic.ring import NSR sage: NSR(10.0).gamma() 362880
We have produced an exact integral result of .gamma() on a floating-point number.
After #2898, this behavior makes doctests fail; but the above happens even before #2898.
I don't know if this is the "right" patch, but it does make all doctests pass after #2898.
Attachments (1)
Change History (3)
Changed 12 years ago by
comment:1 Changed 12 years ago by
- Summary changed from [with patch, needs review] new symbolics can treat floats as integers inappropriately to [with patch, positive review] new symbolics can treat floats as integers inappropriately
comment:2 Changed 12 years ago by
- Resolution set to fixed
- Status changed from new to closed
Merged in Sage 3.3.rc0.
Cheers,
Michael
Note: See
TracTickets for help on using
tickets.
The patch looks good.
We might think about optimizing this function for speed later. Specialcasing Integer and Rational, and using the _parent attribute should help here.