Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Change test for 'NaN ** 0'
... fixes RT #124450
  • Loading branch information
usev6 committed May 21, 2015
1 parent b4149a2 commit a30ffc1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
7 changes: 2 additions & 5 deletions S02-types/nan.t
Expand Up @@ -11,11 +11,8 @@ plan 21;
is 0 * Inf , NaN, "0 * Inf";
is Inf / Inf, NaN, "Inf / Inf";
is Inf - Inf, NaN, "Inf - Inf";
# if we say that 0**0 and Inf**0 both give 1 (sse below), then for which
# number or limit whould $number ** 0 be different from 1? so maybe just say
# that NaN ** 0 == 1?
#?rakudo skip 'unspecced and inconsistent RT #124450'
is NaN ** 0, NaN, "NaN ** 0";
# RT #124450
is NaN ** 0, 1, "NaN ** 0";

is 0**0 , 1, "0**0 is 1, _not_ NaN";
is Inf**0 , 1, "Inf**0 is 1, _not_ NaN";
Expand Down
7 changes: 4 additions & 3 deletions S32-num/power.t
Expand Up @@ -40,13 +40,14 @@ is(NaN ** 2, NaN, "NaN propagates with integer powers");
is(NaN ** 3.14, NaN, "NaN propagates with numeric powers");
is(0 ** NaN, NaN, "0**NaN=NaN");

# Not at all sure the next three cases are correct!
# Not at all sure the next two cases are correct!

#?niecza 2 todo 'complex NaN stringy'
#?rakudo 3 todo 'wrong results for "NaN" used with "**" RT #124800'
#?rakudo 2 todo 'wrong results for "NaN" used with "**" RT #124800'
is(NaN ** 1i, NaN, "NaN**1i=NaN");
is(1i ** NaN, NaN, "1i**NaN=NaN");
is(NaN ** 0, NaN, "NaN**0=NaN");
# RT #124450
is(NaN ** 0, 1, "NaN**0=1");

is(NaN ** NaN, NaN, "NaN**NaN=NaN");
is(Inf ** NaN, NaN, "Inf**NaN=NaN");
Expand Down

0 comments on commit a30ffc1

Please sign in to comment.