jkrebs -- fixing the floating point arithmetic error"