Skip to content

Commit

Permalink
switch power_neg to exponent. translation is close enough imo?
Browse files Browse the repository at this point in the history
  • Loading branch information
SamsTheNerd committed Aug 2, 2024
1 parent f670ad5 commit ffcc37d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ object DoubleArithmetic : Arithmetic {
MUL -> make2 { a, b -> a * b }
DIV -> make2 { a, b -> if (b == 0.0) throw MishapDivideByZero.of(a, b) else a / b }
ABS -> make1 { a -> abs(a) }
POW -> make2 { a, b -> if (a < 0 && !DoubleIota.tolerates(floor(b), b)) throw MishapDivideByZero.of(a, b, "power_neg") else a.pow(b) }
POW -> make2 { a, b -> if (a < 0 && !DoubleIota.tolerates(floor(b), b)) throw MishapDivideByZero.of(a, b, "exponent") else a.pow(b) }
FLOOR -> make1 { a -> floor(a) }
CEIL -> make1 { a -> ceil(a) }
SIN -> make1 { a -> sin(a) }
Expand Down

0 comments on commit ffcc37d

Please sign in to comment.