ForwardDiff.jl
ForwardDiff.jl copied to clipboard
Duals and ranges
a = ForwardDiff.Dual(1.0,1.0)
b = ForwardDiff.Dual(0.0,1.0)
c = ForwardDiff.Dual(10.0,1.0)
b:a:c
MethodError: Cannot `convert` an object of type ForwardDiff.Dual{Void,Float64,1} to an object of type Signed
This may have arisen from a call to the constructor Signed(...),
since type constructors fall back to convert methods.
unsafe_length(::StepRange{ForwardDiff.Dual{Void,Float64,1},ForwardDiff.Dual{Void,Float64,1}}) at range.jl:369
vcat(::StepRange{ForwardDiff.Dual{Void,Float64,1},ForwardDiff.Dual{Void,Float64,1}}) at range.jl:819
collect(::StepRange{ForwardDiff.Dual{Void,Float64,1},ForwardDiff.Dual{Void,Float64,1}}) at range.jl:831
include_string(::String, ::String) at loading.jl:515
eval(::Module, ::Any) at boot.jl:235
(::Atom.##63#66)() at eval.jl:104
withpath(::Atom.##63#66, ::Void) at utils.jl:30
withpath(::Function, ::Void) at eval.jl:38
macro expansion at eval.jl:103 [inlined]
(::Atom.##62#65{Dict{String,Any}})() at task.jl:80
I don't know if it's even possible to make that work, but I wanted to document it for https://github.com/JuliaDiffEq/OrdinaryDiffEq.jl/issues/202