File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -154,8 +154,24 @@ julia> using ForwardDiff, Preferences
154154julia> set_preferences! (ForwardDiff, " nansafe_mode" => true )
155155```
156156
157+ Note that Julia has to be restarted and ForwardDiff has to be reloaded after changing
158+ this preference.
159+
160+ Alternatively, you can set the preference before loading ForwardDiff, for example via:
161+
162+ ``` julia
163+ julia> using Preferences, UUIDs
164+
165+ julia> set_preferences! (UUID (" f6369f11-7733-5829-9624-2563aa707210" ), " nansafe_mode" => true )
166+
167+ julia> using ForwardDiff
168+
169+ julia> log (ForwardDiff. Dual {:tag} (0.0 , 0.0 ))
170+ Dual {:tag} (- Inf ,0.0 )
171+ ```
172+
157173In the future, we plan on allowing users and downstream library authors to dynamically
158- enable [ NaN` -safe mode via the ` AbstractConfig`
174+ enable [ ` NaN ` -safe mode via the ` AbstractConfig `
159175API] ( https://github.com/JuliaDiff/ForwardDiff.jl/issues/181 ) .
160176
161177## Hessian of a vector-valued function
You can’t perform that action at this time.
0 commit comments