Return GSL_NAN instead of NAN when a callback fails