Skip to content

Unusual behaviour of the built-in complex numbers #1680

@sagetrac-ljpk

Description

@sagetrac-ljpk

SAGE has a built-in copy of the complex numbers, so it knows what I is. However, one gets slightly odd behaviour from this:

sage: (1+I)^2 - 2*I

(1+I)^2 - 2*I

and one has to use the .expand() command to get the correct answer 2*I. This is not the behaviour of a user-defined quadratic field, which automatically evaluates such things. I think that the computation should resolve to 0 without having to be expanded.

CC: @mwhansen @sagetrac-mvngu

Component: commutative algebra

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions