Opened 5 years ago

Last modified 4 months ago

#22027 new defect

Simplifying 0**x gives 0, with no assumptions on x

Reported by: pelegm Owned by:
Priority: major Milestone: sage-7.5
Component: symbolics Keywords: simplify
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges


Check this:

sage: simplify(0**x)


sage: 0**0

Change History (3)

comment:1 Changed 4 years ago by rws

That is a Maxima bug.

comment:2 Changed 3 years ago by pelegm

Are we ok with sage returning 1 for 00? This is the case in Python, but in Maxima is it undefined.

Is maxima under active development? Should we report that issue there?

Note that sympy handles this properly:

In [6]: sympy.simplify(0**x)
Out[6]: 0**x

comment:3 Changed 4 months ago by gh-DaveWitteMorris

Singular says 0^n = 0 (where n must be an integer):

power ( const CanonicalForm & f, int n )
  ASSERT( n >= 0, "illegal exponent" );

  if ( f.isZero() )
    return CanonicalForm(0L);

I would say this is clearly wrong: x^0 needs to be 1 for all x if the exponent is an integer variable.

Note: See TracTickets for help on using tickets.