We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 995794d commit 3beb81aCopy full SHA for 3beb81a
big-num/omeganum.lua
@@ -662,11 +662,16 @@ function Big:pow(other)
662
end
663
664
if (self.number < 0) then
665
+ -- talisman-specific behavior
666
+ local p = self:abs():pow(other)
667
+ return other.number % 2 < 1 and p:neg() or p
668
+
669
+ --[[
670
local mod = other.number % 2
671
if mod ~= 0 and mod ~= 1 then return B.NaN end
-
672
local p = self:abs():pow(other)
673
return mod == 1 and p:neg() or p
674
+ ]]
675
676
if (self.number == 0) then
677
return B.ZERO
0 commit comments