diff --git a/S32-num/power.t b/S32-num/power.t index 3136cd0026..b8278e4461 100644 --- a/S32-num/power.t +++ b/S32-num/power.t @@ -2,7 +2,7 @@ use v6; use Test; -plan 43; +plan 50; # Real ** is(0 ** 0, 1, "0 ** 0 == 1"); @@ -12,6 +12,16 @@ 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"; +#?rakudo 2 todo "Simple bigint optimizations NYI" +is (-1) ** 4553535345364535345634543534, 1, "-1 ** 4553535345364535345634543534 == 1"; +is (-1) ** 4553535345364535345634543533, -1, "-1 ** 4553535345364535345634543534 == -1"; +is 2 ** 4553535345364535345634543534, Inf, "2 ** 4553535345364535345634543534 == Inf"; +#?rakudo todo "Simple bigint optimizations NYI" +is (-2) ** 4553535345364535345634543534, Inf, "-2 ** 4553535345364535345634543534 == Inf"; +is (-2) ** 4553535345364535345634543533, -Inf, "-2 ** 4553535345364535345634543534 == -Inf"; + is(4 ** 0.5, 2, "4 ** .5 == 2"); is(4 ** (1/2), 2, "4 ** (1/2) == 2 "); is(4 ** (-1/2), 0.5, "4 ** (-1/2) == 1/2 ");