Skip to main content

diff

Function diff 

Source
pub fn diff(e: &[f64], f: &[f64], out: &mut [f64]) -> usize
Expand description

Writes the expansion of e - f, reading f without copying or modifying it.

Capacity: e.len() + f.len(). Requirement: e and f are valid expansions (see the module documentation). Guarantee: the result is a valid expansion. The algorithm is that of sum.

ยงExamples

use implicit_predicates_core::expansion;

let mut out = [0.0; 4];
let len = expansion::diff(&[1e-20, 1.0], &[1e-20, 2.0], &mut out);
assert_eq!(&out[..len], &[-1.0]);