Skip to content

Commit

Permalink
fix 455353534536453534563454353<[34]>
Browse files Browse the repository at this point in the history
  • Loading branch information
dankogai committed Jan 11, 2016
1 parent ece2218 commit f884279
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions S32-num/power.t
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,22 @@ is(4 ** 0, 1, "4 ** 0 == 1");
is(4 ** 1, 4, "4 ** 1 == 4");
is(4 ** 2, 16, "4 ** 2 == 16");

is 0 ** 4553535345364535345634543534, 0, "0 ** 4553535345364535345634543534 == 0";
is 1 ** 4553535345364535345634543534, 1, "1 ** 4553535345364535345634543534 == 1";
is 1e0 ** 4553535345364535345634543534, 1, "1e0 ** 4553535345364535345634543534 == 1";
isa-ok 1e0 ** 4553535345364535345634543534, Num, "1e0 ** 4553535345364535345634543534 is a Num";
my $big-e = 4553535345364535345634543534;
my $big-o = 4553535345364535345634543533;

is 0 ** $big-e, 0, "0 ** $big-e == 0";
is 1 ** $big-e, 1, "1 ** $big-e == 1";
is 1e0 ** $big-e, 1, "1e0 ** $big-e == 1";
isa-ok 1e0 ** $big-e, Num, "1e0 ** $big-e is a Num";
#?rakudo.moar skip 'big exponents RT #124798: passes on OSX, fails on Linux'
is (-1) ** 4553535345364535345634543534, 1, "-1 ** 4553535345364535345634543534 == 1";
is (-1) ** $big-e, 1, "-1 ** $big-e == 1";
#?rakudo.moar 4 todo 'big exponents RT #124798'
is (-1) ** 4553535345364535345634543533, -1, "-1 ** 4553535345364535345634543534 == -1";
is (-1) ** $big-o, -1, "-1 ** $big-o == -1";
#?niecza skip "Slow and wrong"
is 2 ** 4553535345364535345634543534, Inf, "2 ** 4553535345364535345634543534 == Inf";
is 2 ** $big-e, Inf, "2 ** $big-e == Inf";
#?niecza 2 skip "Slow and wrong"
is (-2) ** 4553535345364535345634543534, Inf, "-2 ** 4553535345364535345634543534 == Inf";
is (-2) ** 4553535345364535345634543533, -Inf, "-2 ** 4553535345364535345634543534 == -Inf";
is (-2) ** $big-e, Inf, "-2 ** $big-e == Inf";
is (-2) ** $big-o, -Inf, "-2 ** $big-o == -Inf";

is(4 ** 0.5, 2, "4 ** .5 == 2");
is(4 ** (1/2), 2, "4 ** (1/2) == 2 ");
Expand Down

0 comments on commit f884279

Please sign in to comment.