#15260: Integer division of reals and rationals
-------------------------------------+-------------------------------------
Reporter: ncohen | Owner:
Type: defect | Status: needs_work
Priority: major | Milestone: sage-6.4
Component: basic arithmetic | Resolution:
Keywords: | Merged in:
Authors: Jan Keitel, | Reviewers: Jeroen Demeyer
Jeroen Demeyer | Work issues:
Report Upstream: N/A | Commit:
Branch: | b49487a1e046a1185d30d2a5694549c60493f951
u/jdemeyer/ticket/15260 | Stopgaps:
Dependencies: |
-------------------------------------+-------------------------------------
Changes (by jdemeyer):
* status: needs_info => needs_work
* component: numerical => basic arithmetic
Old description:
> As reported there [1]
>
> {{{
> sage: x = 1/2
> sage: x
> 1/2
> sage: x//2
> 1/4
> }}}
>
> Though I have no idea how this kind of things is to be fixed `^^;`
>
> Nathann
>
> [1] https://groups.google.com/d/topic/sage-support/xE_S3WbFHzA/discussion
New description:
As reported there [1]
{{{
sage: x = 1/2
sage: x//2
1/4
sage: RDF(5) // 2
2.5
sage: RIF(5) // 2
TypeError: unsupported operand type(s) for //:
'sage.rings.real_mpfi.RealIntervalFieldElement' and
'sage.rings.real_mpfi.RealIntervalFieldElement'
}}}
This ticket will fix floor division for these types, see also #2034 for
implementing a generic `__floordiv__`.
[1] https://groups.google.com/d/topic/sage-support/xE_S3WbFHzA/discussion
--
--
Ticket URL: <http://trac.sagemath.org/ticket/15260#comment:15>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.