Closed tom7 closed 1 year ago
Thank you for reporting the bug, I've just re-run all tests and released an update - should be okay now in this aspect.
Note that this bug mainly affected NMSOpt which is a sub-optimizer. BiteOpt itself is based on wrapParam() which works correctly.
In
wrapParamReal
, is the linesupposed to be
? This would mirror the symmetric case for when
v
<minv
. In any case, the current code can return a parameter value outside the range. In my test case I haveminv
: -1000,maxv
: 1000, sodv
= 2000. The incoming sample is 1039.54, which reaches line 1802, giving1000 - rnd.get() * (1039.54 - 2000)
. Sincernd.get()
is in [0,1] and the parenthetical is negative, we get a resulting sample greater than 1000, the supposed maximum.Thanks for biteopt! :)