Skip to content

bugs in comparisons between constants, wrapped pyobjects, infinity #12967

Closed
@dkrenn

Description

@dkrenn

We have

sage: bool(pi<Infinity)
False
sage: bool(pi>Infinity)
True

which is obviously wrong. It seems that the problem only occurs with pi, because the following give correct results

sage: bool(pi<2*pi)
True
sage: bool(2*pi<Infinity)
True
sage: bool(e<Infinity)  
True
sage: bool(e<pi)
True

This was reported on sage-support by Robert Samal.

See the discussion at https://groups.google.com/forum/?hl=en#!topic/sage-devel/Oip2hzvjFZQ

pynac/pynac#69


Previously proposed patch: attachment: trac_12967-symbolic_ring-review.patch.

CC: @kcrisman

Component: symbolics

Keywords: compare pi infinity bool

Author: Travis Scrimshaw, Ralf Stephan

Reviewer: Karl-Dieter Crisman, Daniel Krenn

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions