OptimKit.jl
OptimKit.jl copied to clipboard
Use safe_sqrt for norms
This is a patch-fix for the encounter of (small) negative norms, in order to stabilize the algorithms.
In particular, whenever this happens and the norm of a small negative number is requested, instead of a DomainError, an error will be printed (not thrown!) and we'll return eps.