diff --git a/src/Symbolics.jl b/src/Symbolics.jl index 55b98be20..1a70c7da2 100644 --- a/src/Symbolics.jl +++ b/src/Symbolics.jl @@ -47,6 +47,8 @@ import SymbolicLimits using ADTypes: ADTypes +using NaNMath + @reexport using SymbolicUtils RuntimeGeneratedFunctions.init(@__MODULE__) @@ -108,7 +110,7 @@ include("variable.jl") function slog end; function ssqrt end; function scbrt end include("linearity.jl") -using DiffRules, SpecialFunctions, NaNMath +using DiffRules, SpecialFunctions using SparseArrays diff --git a/src/num.jl b/src/num.jl index c3d3101e8..3b03d4880 100644 --- a/src/num.jl +++ b/src/num.jl @@ -25,6 +25,8 @@ SymbolicUtils.@number_methods( Num(f(value(a), value(b))), [conj, real, transpose] ) + +NaNMath.pow(x::Num, y::Integer) = wrap(NaNMath.pow(unwrap(x), y)) Base.conj(x::Num) = x Base.transpose(x::Num) = x