MDLD/differentiable function (R)