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
@tpapp Might the issue be that the f(1) and f(-1) are not finite?
julia>functionf(x::Real)
A = L =1.0
x2 =abs2(x)
@show x, x2
@assert x2 ≤1if x2 ==1
y =oftype(A + L + x, Inf)
x <0?-y : y
else
A + L * x /√(1- x2)
endend
f (generic function with 1 method)
julia>f(1)
(x, x2) = (1, 1)
Inf
julia>f(-1)
(x, x2) = (-1, 1)
-Inf
Thanks, it is user error then. Is there a way to catch this in the finite differencing method though? Eg check that internal arguments remain isfinite.
Adapted one-sided differences gives a
NaN
input while receiving finite values from the function.The text was updated successfully, but these errors were encountered: