Opened 15 years ago
Closed 15 years ago
#2537 closed defect (invalid)
[with patch, needs review] a.frac() should return x-x.floor()
Reported by: | Rishikesh | Owned by: | Rishikesh |
---|---|---|---|
Priority: | major | Milestone: | sage-duplicate/invalid/wontfix |
Component: | basic arithmetic | Keywords: | |
Cc: | Merged in: | ||
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
frac(-2.9) should be .1
Attachments (1)
Change History (3)
Changed 15 years ago by
Attachment: | real.patch added |
---|
comment:1 Changed 15 years ago by
Summary: | a.frac() should return x-x.floor() → [with patch, needs review] a.frac() should return x-x.floor() |
---|
comment:2 Changed 15 years ago by
Milestone: | sage-2.10.4 → sage-duplicate/invalid |
---|---|
Resolution: | → invalid |
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
There is apparently no consensus on the meaning of frac() (see http://mathworld.wolfram.com/FractionalPart.html for some discussion of the issues and the different definitions). Since Sage's RR is mostly a wrapper for MPFR, I would prefer to stay with the current definition (which also matches my intuition for what "fractional part" should mean); this is also the definition used by the majority of a statistically meaningless sampling from a google search.
If you feel strongly about the issue, I suggest taking it to sage-devel to get a broader sampling of opinions on the question.