You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You might need some fixes with README 😄
Related issues #40#52 : float(pi) could fix this:
julia>using Calculus
julia> h1 =second_derivative(sin)
#6 (generic function with 1 method)
julia>h1(0.0)
0.0
julia>h1(1.0)
-0.841471649579559
julia>h1(pi)
ERROR: MethodError: no method matching eps(::Type{Irrational{:π}})
Closest candidates are:eps(::Dates.Time) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Dates\src\types.jl:387eps(::Dates.Date) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Dates\src\types.jl:386eps(::Dates.DateTime) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Dates\src\types.jl:385...
Stacktrace:
[1] finite_difference(::Calculus.var"#1#3"{typeof(sin),Symbol}, ::Irrational{:π}, ::Symbol) at C:\Users\islent\.julia\packages\Calculus\mbqhh\src\finite_difference.jl:27lus\mbqhh\src\finite_difference.jl:27
[2] finite_difference_hessian(::Function, ::Function, ::Irrational{:π}, ::Symbol) at C:\Users\islent\.julia\packages\Calculus\mbqhh\ckages\Calculus\mbqhh\src\derivative.jl:27src\finite_difference.jl:224
[3] (::Calculus.var"#6#8"{typeof(sin),Calculus.var"#1#3"{typeof(sin),Symbol},Symbol})(::Irrational{:π}) at C:\Users\islent\.julia\packages\Calculus\mbqhh\src\derivative.jl:27
[4] top-level scope at REPL[5]:1
julia>h1(float(pi))
-1.3553766145945872e-7
julia> g2 = Calculus.gradient(x ->sin(x[1]) +cos(x[2]))
#2 (generic function with 1 method)
julia>g2([0.0, 0.0])
2-element Array{Float64,1}:0.99999999998688540.0
julia>g2([1.0, 1.0])
2-element Array{Float64,1}:0.5403023058631036-0.8414709847974693
julia>g2([pi, pi])
ERROR: MethodError: no method matching Irrational{:π}(::Int64)
Closest candidates are:Irrational{:π}(::T) where T<:Number at boot.jl:718Irrational{:π}() where sym at irrationals.jl:18Irrational{:π}(::Complex) where T<:Real at complex.jl:37...
Stacktrace:
[1] convert(::Type{Irrational{:π}}, ::Int64) at .\number.jl:7
[2] zero(::Type{Irrational{:π}}) at .\number.jl:266
[3] float(::Array{Irrational{:π},1}) at .\float.jl:896
[4] (::Calculus.var"#2#4"{var"#3#4",Symbol})(::Array{Irrational{:π},1}) at C:\Users\islent\.julia\packages\Calculus\mbqhh\src\derivative.jl:5
[5] top-level scope at REPL[9]:1
julia> h2 =hessian(x ->sin(x[1]) +cos(x[2]))
#7 (generic function with 1 method)
julia>h2([0.0, 0.0])
2×2 Array{Float64,2}:-7.5693e-70.00.0-0.999999
julia>h2([1.0, 1.0])
2×2 Array{Float64,2}:-0.8414720.00.0-0.540303
julia>h2([pi, pi])
ERROR: MethodError: no method matching Irrational{:π}(::Int64)
Closest candidates are:Irrational{:π}(::T) where T<:Number at boot.jl:718Irrational{:π}() where sym at irrationals.jl:18Irrational{:π}(::Complex) where T<:Real at complex.jl:37...
Stacktrace:
[1] convert(::Type{Irrational{:π}}, ::Int64) at .\number.jl:7
[2] zero(::Type{Irrational{:π}}) at .\number.jl:266
[3] float(::Array{Irrational{:π},1}) at .\float.jl:896
[4] (::Calculus.var"#2#4"{var"#5#6",Symbol})(::Array{Irrational{:π},1}) at C:\Users\islent\.julia\packages\Calculus\mbqhh\src\derivative.jl:5
[5] finite_difference_jacobian(::Calculus.var"#2#4"{var"#5#6",Symbol}, ::Array{Irrational{:π},1}, ::Symbol) at C:\Users\islent\.julia\packages\Calculus\mbqhh\src\finite_difference.jl:197
[6] finite_difference_hessian(::Function, ::Function, ::Array{Irrational{:π},1}, ::Symbol) at C:\Users\islent\.julia\packages\Calculus\mbqhh\src\finite_difference.jl:284
[7] (::Calculus.var"#7#9"{var"#5#6",Calculus.var"#2#4"{var"#5#6",Symbol},Symbol})(::Array{Irrational{:π},1}) at C:\Users\islent\.julia\packages\Calculus\mbqhh\src\derivative.jl:29
[8] top-level scope at REPL[15]:1
The text was updated successfully, but these errors were encountered:
You might need some fixes with README 😄
Related issues #40 #52 :
float(pi)
could fix this:The text was updated successfully, but these errors were encountered: