parameters that should be doubles are doubles now; both the linear and
nonlinear parts seem to be doing something useful at last