Issues with printing deriv function output