MCPcopy Create free account
hub / github.com/IntegralPilot/rustc_codegen_jvm / derivative

Function derivative

tests/binary/fn_pointers/src/main.rs:65–67  ·  view source on GitHub ↗
(f: fn(f64) -> f64, x: f64, h: f64)

Source from the content-addressed store, hash-verified

63}
64
65fn derivative(f: fn(f64) -> f64, x: f64, h: f64) -> f64 {
66 (f(x + h) - f(x)) / h
67}
68
69fn apply_twice(f: fn(f64) -> f64, x: f64) -> f64 {
70 f(f(x))

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected