pub fn forward_diff_vec<F>( x: &Vec<F>, f: &'_ dyn Fn(&Vec<F>) -> Result<F, Error>, ) -> Result<Vec<F>, Error>where F: Float,