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
I'd like to compute up to third-order derivatives with respect to a scalar (non-measurement) of a measurement-valued function. Something along the lines of this demo:
julia>using Measurements
julia> c, w = π/4, 0.1# could alternatively be AbstractVectors
(0.7853981633974483, 0.1)
julia> f = sin # could be anything
sin (generic function with 15 methods)
julia>ϕ(t) =f(c ± (1+ t)*w) # evaluates f over a Measurement
ϕ (generic function with 1 method)
julia>ϕ(0.1)
0.707±0.078
julia> ForwardDiff.derivative(ϕ, 0.0)
ERROR: StackOverflowError:
Stacktrace:
[1] measurement(val::ForwardDiff.Dual{…}, err::ForwardDiff.Dual{…}) (repeats 79984 times)
@ Measurements ~/.julia/packages/Measurements/hcRfF/src/Measurements.jl:93
Some type information was truncated. Use `show(err)` to see complete types.
This is with Measurements 2.10.0, ForwardDiff 0.10.36, and ForwardDiffOverMeasurements 0.1.0. Might the difference from the examples you show is that the variable I'm differentiating is a mapping Float64 -> Measurement{Float64} rather than a Measurement{Float64} -> Measurement{Float64}?
I'd like to compute up to third-order derivatives with respect to a scalar (non-measurement) of a measurement-valued function. Something along the lines of this demo:
I've tried ForwardDiff (I saw #100):
and TaylorDiff:
and TaylorSeries:
I haven't yet tried Diffractor (the docs are not fully fleshed out).
The text was updated successfully, but these errors were encountered: