Skip to content

Commit 9ba270b

Browse files
authored
Merge pull request #557 from contradict/nanmath-pow
NaNMath.pow fix
2 parents 52b62f1 + fac570d commit 9ba270b

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/methods.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const monadic = [deg2rad, rad2deg, transpose, asind, log1p, acsch,
2020

2121
const diadic = [max, min, hypot, atan, NaNMath.atanh, mod, rem, copysign,
2222
besselj, bessely, besseli, besselk, hankelh1, hankelh2,
23-
polygamma, beta, logbeta]
23+
polygamma, beta, logbeta, NaNMath.pow]
2424
const previously_declared_for = Set([])
2525

2626
const basic_monadic = [-, +]

test/code.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ nanmath_st.rewrites[:nanmath] = true
8686
end)
8787
@test toexpr(SetArray(true, a, [x(t), AtIndex(9, b), c])).head == :macrocall
8888

89+
90+
@test toexpr(NaNMath.pow(a, b)) == :($(NaNMath.pow)(a, b))
91+
8992
f = GlobalRef(NaNMath, :sin)
9093
test_repr(toexpr(LiteralExpr(:(let x=1, y=2
9194
$(sin(a+b))

0 commit comments

Comments
 (0)