Skip to main content

rk4

Function rk4 

Source
pub fn rk4<F>(
    f: F,
    t0: &ExactNum,
    y0: &ExactNum,
    t1: &ExactNum,
    n_steps: usize,
    p: usize,
    rm: RoundingMode,
    cc: &mut Consts,
) -> Option<(ExactNumArray, ExactNumArray)>
Expand description

Classical RK4 for y' = f(t, y) on [t0, t1] with n_steps equal steps.

Returns row arrays (t, y) of length n_steps+1. None if n_steps is 0 or greater than ODE_MAX_STEPS, t1 ≤ t0, or a value is non-finite.