pub fn rem_vec_vec(x: &[f64], y: &[f64]) -> Vec<f64>
Expand description
§rem_vec_vec(x, y)
Operation Function
The rem_vec_vec
function takes in two slices of floating-point numbers x
and y
and generates
a new vector of remainders by applying the remainder operator rem to their corresponding elements.
§Examples
use mathlab::math::{rem, rem_vec_vec, is_nan_f64, INF_F64};
assert!(is_nan_f64(rem(0.0, 0.0)));
assert!(is_nan_f64(rem(1.0, 0.0)));
assert!(is_nan_f64(rem(INF_F64, 0.0)));
assert!(is_nan_f64(rem(INF_F64, 2.0)));
assert!(is_nan_f64(rem(INF_F64, INF_F64)));
assert!(is_nan_f64(rem(INF_F64, INF_F64)));
assert_eq!(rem_vec_vec(&[1.0, 2.0, 3.0, 4.0], &[4.0, 3.0, 2.0, 1.0]), [1.0, 2.0, 1.0, 0.0]);
End Fun Doc