Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doctest: Incorrect zero test of complex symbolic expressions #15571

Closed
mezzarobba opened this issue Dec 23, 2013 · 9 comments
Closed

Doctest: Incorrect zero test of complex symbolic expressions #15571

mezzarobba opened this issue Dec 23, 2013 · 9 comments

Comments

@mezzarobba
Copy link
Member

This is fixed but needs a doctest:

Yet another example where symbolic expressions are abusively considered equivalent, even though simplify() has become a bit more careful.

sage: var('a,x')
(a, x)
sage: assume(a, 'complex')
sage: assume(x, 'complex')
sage: expr = a^(4*x) - (a^4)^x
sage: expr.is_zero()
True
sage: expr(a=I, x=1/2)
-2

Component: symbolics

Author: Ralf Stephan

Branch/Commit: 9974eef

Reviewer: Karl-Dieter Crisman

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

@mezzarobba mezzarobba added this to the sage-6.1 milestone Dec 23, 2013
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.1, sage-6.2 Jan 30, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.2, sage-6.3 May 6, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.3, sage-6.4 Aug 10, 2014
@rwst
Copy link

rwst commented Jan 31, 2015

comment:4

Appears to having been fixed and also already included in Sage.

@rwst rwst removed this from the sage-6.4 milestone Jan 31, 2015
@rwst

This comment has been minimized.

@rwst rwst changed the title Incorrect zero test of complex symbolic expressions Doctest: Incorrect zero test of complex symbolic expressions Jan 31, 2015
@rwst rwst added this to the sage-6.5 milestone Jan 31, 2015
@rwst
Copy link

rwst commented Feb 2, 2015

@rwst
Copy link

rwst commented Feb 2, 2015

Commit: 9974eef

@rwst
Copy link

rwst commented Feb 2, 2015

New commits:

9974eef15571: add doctest

@rwst
Copy link

rwst commented Feb 2, 2015

Author: Ralf Stephan

@kcrisman
Copy link
Member

kcrisman commented Feb 3, 2015

Reviewer: Karl-Dieter Crisman

@kcrisman
Copy link
Member

kcrisman commented Feb 3, 2015

comment:8

Indeed, one doesn't have to do any assumption at all to get the 'false' now.

sage: sage: var('a,x')
(a, x)
sage: (a, x)
(a, x)
sage: sage: expr = a^(4*x) - (a^4)^x
sage: sage: expr.is_zero()
False

If you want to remove the second

+            sage: assume(a, 'complex')
+            sage: assume(x, 'complex')

and then the forget() which I think is all superfluous, that would be great, but it's fine this way too.

@vbraun
Copy link
Member

vbraun commented Feb 17, 2015

@vbraun vbraun closed this as completed in 7eea81a Feb 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants