pub fn nrt_num_vec(x: f64, n: &[f64]) -> Vec<f64>
Expand description
§nrt_num_vec(x, n)
Operation Function
The nrt_num_vec
function calculates the n-th
root of x
for each power in the given vector n
,
and returns the results as a vector of floating-point numbers.
§Examples
use mathlab::math::{nrt, nrt_num_vec};
assert_eq!(nrt(27.0, 3.0), 3.0);
assert_eq!(nrt_num_vec(81.0, &[1.0, 2.0, 4.0]), [81.0, 9.0, 3.0]);
End Fun Doc