Performing a quadratic mapping using 3 points: how can we make sure that the function will be monotonous?
The algorithm is implemented in function Findabc() of “CsoundMaths.c”.
When three pairs of input/output values are supplied, BP2 attempts to define a quadratic mapping from the input (x) to output (y).
This is an example of a successful mapping:
BP2 expects the mapping function to be monotonous, i.e. the three values (x1, x2, x3) supplied as the input and the ones supplied as the output (y1, y2, y3) must be strictly ordered. Even in this case a proper quadratic mapping may not be possible. See for instance:
Here the quadratic function is not monotonous even though the input values are ordered properly. In this case, BP2 replaces the incorrect part (the one containing an extremum) with a linear function, and changes the other part to make the curve tangent to the linear part. This yields the graph shown below: