Skip to main content

grow

Function grow 

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

Writes the expansion of e + b.

Capacity: e.len() + 1. Requirements: e is a valid expansion (see the module documentation) and b has magnitude below 2^1020 (debug builds panic if b is not finite). Guarantee: the result is a valid expansion.

ยงExamples

use implicit_predicates_core::expansion;

let mut out = [0.0; 3];
let len = expansion::grow(&[1e-20, 1.0], 1e20, &mut out);
assert_eq!(&out[..len], &[1e-20, 1.0, 1e20]);