Skip to content

Doctest: x.is_negative() when assuming x < 0 #21973

@pelegm

Description

@pelegm

I understand the is_negative flag is still experimental. I just document it here, and mention that is_positive does work as expected when assuming x > 0.
Here's an example:

sage: var('x,y')
sage: assume(x>0)
sage: assume(y<0)
sage: x.is_positive()
True
sage: y.is_negative()
False

Tested on 7.5.beta4.

Depends on #23325

Component: symbolics

Keywords: is_negative

Author: Ralf Stephan

Branch/Commit: 5db378f

Reviewer: Jeroen Demeyer

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions