Skip to content
Prev 61198 / 63424 Next

Bug in optim for specific orders of magnitude

Collin,

It is interesting that you get such strange results when passing denormal
values to optim().  Several possibilities for this spring to mind.

A better question though might be, "What kind of results are you expecting
when you pass such small values to optim()?"  In general, you shouldn't
have a strong expectation that you'll get good results back when you have
small coefficients like 1e-317 (or 1e-17) in your objective function.  The
algorithms behind optim() are not designed or implemented to do their best
work with coefficients of magnitude far from 1.  You can hope.  You can get
lucky.  But I would not advise you to have strong expectations.

-Steve

On Fri, Dec 23, 2022 at 1:20 PM Collin Erickson <collinberickson at gmail.com>
wrote: