Skip to content

Commit

Permalink
FIX: Zero to the power of zero is 1 instead of 0
Browse files Browse the repository at this point in the history
  • Loading branch information
Oldes committed Jun 20, 2018
1 parent 5fa2db1 commit 045fff8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/t-decimal.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,11 +293,11 @@ REBOOL almost_equal(REBDEC a, REBDEC b, REBCNT max_diff) {
goto setDec;

case A_POWER:
if (d1 == 0) goto setDec;
if (d2 == 0) {
d1 = 1.0;
goto setDec;
}
if (d1 == 0) goto setDec;
//if (d1 < 0 && d2 < 1 && d2 != -1)
// Trap0(RE_POSITIVE);
d1 = pow(d1, d2);
Expand Down

0 comments on commit 045fff8

Please sign in to comment.