log should not contain bias, c is an unneccesary constant, fixad an error in zeropadding.