#1983: [with patch; positive review] change 0^0, for 0 a Sage integer, to
evaluate
to 1 for consistency with Python, PARI, Magma, Maple, MPFR, GMP, etc.
------------------------------------+---------------------------
Reporter: was | Owner: somebody
Type: defect | Status: closed
Priority: major | Milestone: sage-2.10.1
Component: basic arithmetic | Resolution: fixed
Keywords: | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
------------------------------------+---------------------------
Changes (by chapoton):
* upstream: => N/A
Old description:
> As justification that this is for *consistency*, everybody defines 0^0^
> to be 1, except Mathematica:
>
> {{{
>
> sage: gp('0^0')
> 1
> sage: magma('0^0')
> 1
> sage: mathematica('0^0')
> ...
> Mathematica ERROR:
> 0
> Power::indet: Indeterminate expression 0 encountered.
> sage: maple('0^0')
> 1
> sage: int(0)^int(0)
> 1
> sage: float(0)^float(0)
> 1.0
> sage: 0.0^0.0
> 1.00000000000000
> }}}
New description:
As justification that this is for *consistency*, everybody defines 0^0^ to
be 1, except Mathematica:
{{{
sage: gp('0^0')
1
sage: magma('0^0')
1
sage: mathematica('0^0')
...
Mathematica ERROR:
Power::indet: Indeterminate expression 0 encountered.
sage: maple('0^0')
1
sage: int(0)^int(0)
1
sage: float(0)^float(0)
1.0
sage: 0.0^0.0
1.00000000000000
}}}
--
--
Ticket URL: <http://trac.sagemath.org/ticket/1983#comment:5>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.