Newton solver in Stan

A bit more on mxnewstep, the maximum allowable scaled length of the Newton step. According to the manual, the default value is 1000 ||u_0||_D, where u_0 is the initial guess. The problem is I pass a vector of 0 as my initial guess (a reasonable guess), hence mxnewstep = 0. If I pass in 1000||u||_D, where u is the solution I obtained from another solver, the kinsol solver produces the right value. So the default needs to be adjusted when the initial guess has norm 0, though I’m not sure what an optimal default might be.