HAMA-765: Apply DoubleFunction and DoubleDoubleFunction to MLP