Skip to content

implement round for number field elements with real embedding #21935

@videlec

Description

@videlec

Real embedded element has a floor and ceil but no round (= nearest integer)

sage: a = QuadraticField(2).gen()
sage: a.floor()
1
sage: a.ceil()
2
sage: a.round()
Traceback (most recent call last):
...
AttributeError: 'sage.rings.number_field.number_field_element_quadratic.NumberFieldElement_quadratic' object has no attribute 'round'

Depends on #22095

CC: @mkoeppe @seblabbe

Component: number fields

Keywords: days79

Author: Vincent Delecroix

Branch/Commit: 720f040

Reviewer: Jean-Philippe Labbé, Sébastien Labbé

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions