I remember a program for a S5 100u where the positions for a turbo compressors variable inlet and outlet guide vanes where calculated from a 3d data map stored in a datablock by interpolation.
It was using the heron method to calculate the square root. But with floating point numbers done in software, retriggering the cycle so that the S5 doesn't got in stop mode during calculation - which took about 5 seconds...