This, from discourse, looks like a bug:
julia> p(s) = exp(1im*(2π*s - π/2));
julia> p′(s) = ForwardDiff.derivative(p, s);
julia> p″(s) = ForwardDiff.derivative(p′, s);
julia> p″(0.2499999999999)
-39.47841760435743 + 2.4807694081270598e-11im
julia> p″(0.25)
0.0 + 0.0im
I don't think mere floating-point error can explain why p″(0.25) is suddenly zero — looks like a misplaced conditional or something. Note that the correct answer for p″(0.25) is exactly -(2π)² ≈ -39.47841760435743.
(The first derivative p′ looks okay.)