Skip to content

Commit 4cdb222

Browse files
fix: fix NaNMath.pow(::Num, ::Integer) ambiguity
1 parent 1ea3df5 commit 4cdb222

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/Symbolics.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ import SymbolicLimits
4747

4848
using ADTypes: ADTypes
4949

50+
using NaNMath
51+
5052
@reexport using SymbolicUtils
5153
RuntimeGeneratedFunctions.init(@__MODULE__)
5254

@@ -108,7 +110,7 @@ include("variable.jl")
108110
function slog end; function ssqrt end; function scbrt end
109111
include("linearity.jl")
110112

111-
using DiffRules, SpecialFunctions, NaNMath
113+
using DiffRules, SpecialFunctions
112114

113115
using SparseArrays
114116

src/num.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ SymbolicUtils.@number_methods(
2525
Num(f(value(a), value(b))),
2626
[conj, real, transpose]
2727
)
28+
29+
NaNMath.pow(x::Num, y::Integer) = wrap(NaNMath.pow(unwrap(x), y))
2830
Base.conj(x::Num) = x
2931
Base.transpose(x::Num) = x
3032

0 commit comments

Comments
 (0)