Skip to content

Commit 435c0a0

Browse files
Merge pull request #92 from shahriariravanian/main
nanmath set to false
2 parents 7a42349 + aa0ddbb commit 435c0a0

File tree

3 files changed

+5
-27
lines changed

3 files changed

+5
-27
lines changed

Project.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
name = "SymbolicNumericIntegration"
22
uuid = "78aadeae-fbc0-11eb-17b6-c7ec0477ba9e"
33
authors = ["Shahriar Iravanian <siravan@svtsim.com>"]
4-
version = "1.3.4"
4+
version = "1.3.5"
55

66
[deps]
77
DataDrivenDiffEq = "2445eb08-9709-466a-b3fc-47e12bd697a2"
88
DataDrivenSparse = "5b588203-7d8b-4fab-a537-c31a7f73f46b"
99
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
1010
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
11-
NaNMath = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3"
1211
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
1312
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
1413
SymbolicUtils = "d1185830-fcd6-423d-90d6-eec64667417b"

src/cache.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,24 @@ end
2424

2525
function fun!(c::ExprCache, xs...)
2626
if c.f == nothing
27-
c.f = build_function(expr(c), xs...; expression = false)
27+
c.f = build_function(expr(c), xs...; expression = false, nanmath = false)
2828
end
2929
return c.f
3030
end
3131

3232
function fun!(c, xs...)
33-
return build_function(c, xs...; expression = false)
33+
return build_function(c, xs...; expression = false, nanmath = false)
3434
end
3535

3636
function deriv_fun!(c::ExprCache, xs...)
3737
if c.δf == nothing
38-
c.δf = build_function(deriv!(c, xs...), xs...; expression = false)
38+
c.δf = build_function(deriv!(c, xs...), xs...; expression = false, nanmath = false)
3939
end
4040
return c.δf
4141
end
4242

4343
function deriv_fun!(c, xs...)
44-
return build_function(deriv!(c, xs...), xs...; expression = false)
44+
return build_function(deriv!(c, xs...), xs...; expression = false, nanmath = false)
4545
end
4646

4747
Base.show(io::IO, c::ExprCache) = show(expr(c))

src/sparse.jl

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -250,24 +250,3 @@ function best_hints(eq, x, basis; plan = default_plan(), num_trials = 10)
250250
_, idx = findmin(L)
251251
return H[idx]
252252
end
253-
254-
############################################################################
255-
256-
# Fixing missing NaNMath complex functions.
257-
# Note: this is a temporary hack until upstream (NaNMath or SymbolicUtils) is fixed.
258-
259-
using NaNMath
260-
261-
NaNMath.sqrt(x::Complex) = sqrt(x)
262-
NaNMath.sin(x::Complex) = sin(x)
263-
NaNMath.cos(x::Complex) = cos(x)
264-
NaNMath.tan(x::Complex) = tan(x)
265-
NaNMath.asin(x::Complex) = asin(x)
266-
NaNMath.acos(x::Complex) = acos(x)
267-
NaNMath.acosh(x::Complex) = acosh(x)
268-
NaNMath.atanh(x::Complex) = atanh(x)
269-
NaNMath.log(x::Complex) = log(x)
270-
NaNMath.log2(x::Complex) = log2(x)
271-
NaNMath.log10(x::Complex) = log10(x)
272-
NaNMath.lgamma(x::Complex) = lgamma(x)
273-
NaNMath.log1p(x::Complex) = log1p(x)

0 commit comments

Comments
 (0)