This function computes the global minimum and maximum of the absolute error
between the target function f and its piecewise linear (PWL) approximation
across each linear segment.
find_global_optima(PWL, f, tol = 1e-06)A matrix with 4 columns: x_min (location of min error), min_error, x_max (location of max error), max_error.
A matrix with 4 columns: slope, intercept, lower bound, upper bound.
The original function to approximate.
Tolerance for optimizer convergence.