[−][src]Function reikna::derivative::slope_at
pub fn slope_at(f: &Function, x: f64) -> f64
Estimate the value of the derivative of f
at x
This function works by applying the limit definition of
the derivative at x
in the same way that nth_derivative()
does. See the documentation for nth_derivative()
for more
information.
Examples
#[macro_use] extern crate reikna; use reikna::derivative::*; let f = func![|x| (x + 4.0) * (x + 4.0)]; println!("f'(-4.0) = {}", slope_at(&f, -4.0));
Outputs:
f'(-4.0) = 0.000001000000000279556