pub type MultiResultBox = (f64, Box<DynGradFn>);
Result type containing value and gradient function (Box-wrapped)