tweaked neg, exp, and sigmoid inside MatrixUtils