math_audio_test_functions/functions/holder_table.rs
1//! Holder Table test function
2
3use ndarray::Array1;
4
5/// Holder table function - 2D multimodal
6/// Global minimum: f(x) = -19.2085 at x = (±8.05502, ±9.66459)
7/// Bounds: x_i in [-10, 10]
8pub fn holder_table(x: &Array1<f64>) -> f64 {
9 let x1 = x[0];
10 let x2 = x[1];
11 let exp_term = (1.0 - (x1.powi(2) + x2.powi(2)).sqrt() / std::f64::consts::PI).abs();
12 -(x1.sin() * x2.cos()).abs() * exp_term.exp()
13}