Skip to content

Floor (integer) division of reals and rationals #15260

@nathanncohen

Description

@nathanncohen

As reported in [1] and [2]

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'
sage: QQ(7) // QQ(3)
7/3

[1] https://groups.google.com/d/topic/sage-support/xE_S3WbFHzA/discussion
[2] https://groups.google.com/d/msg/sage-devel/nQDAMtqnEsY/HfpIdvc9AwAJ

Depends on #2034

CC: @williamstein @sagetrac-tmonteil @zimmermann6

Component: basic arithmetic

Author: Jan Keitel, Jeroen Demeyer

Branch/Commit: u/jdemeyer/ticket/15260 @ 616f88c

Reviewer: Jeroen Demeyer, Thierry Monteil

Issue created by migration from https://trac.sagemath.org/ticket/15260

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions