Skip to main content

scale

Function scale 

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

Writes the expansion of e * b.

Capacity: 2 * e.len(). Requirements: e is a valid expansion (see the module documentation), and each of its components and b lie in the product domain (see eft::in_product_domain); debug builds panic if they do not. Guarantee: the result is a valid expansion.

ยงExamples

use implicit_predicates_core::expansion;

let mut out = [0.0; 4];
let len = expansion::scale(&[0.25, 4.0], 3.0, &mut out);
assert_eq!(&out[..len], &[12.75]);