PUZZLE IBM-260
Approximating absolute value
IBM Research · Ponder This · 2019-12
IBM Ponder This #260 · December 2019
Approximating absolute value.
Find an expression with no more than 15 operations (+, -, *, /) that approximates the absolute value function on the interval [-1,1] with an MSE (mean squared error) of no more than 0.0001.
For example, (x+1)/2 can be computed with only two operations and has an MSE of 1/6.
Bonus '*' for the best approximation (currently 1.803E-7).
Solution
Best opened after a real attemptTo be added.