Skip to content

Categories for QQ, CC, RR and friends #8576

@nthiery

Description

@nthiery

After this patch, QQ,ZZ,... inherit properly from categories:

sage: QQ.category()
Category of fields
sage: TestSuite(QQ).run()

This patch also documents the following effect discovered by TestSuite:

    sage: CDF = ComplexDoubleField()
    sage: x = CDF.an_element()
    sage: x
    1.0*I
    sage: x*x, x**2, x*x == x**2
    (-1.0, -1.0 + 1.22460635382e-16*I, False)

This effect won't be touched by this patch. Should anyone consider this as a bug, please open a new ticket.

CC: @sagetrac-sage-combinat

Component: algebra

Keywords: real fields

Author: Nicolas M. Thiéry

Reviewer: John Cremona

Merged: sage-4.4.alpha0

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions