Skip to main content

math_audio_test_functions/functions/
de_jong_step2.rs

1//! De Jong Step2 test function
2
3use ndarray::Array1;
4
5/// De Jong step function (variant)
6pub fn de_jong_step2(x: &Array1<f64>) -> f64 {
7    x.iter().map(|&xi| (xi + 0.5).floor().powi(2)).sum()
8}