Fix GBM Boolean optimization

Needed Math.exp(d0)+Math.exp(-d0) -- had minus sign in wrong place, also
was reading results before writing.  Also minor OOBEE counting bug crept
in at the last optimization.