This is really nicely done! Great work. I fell in love with just how efficient these can be and it explained a lot about why many of the trig and other mathematical functions implemented in 8-bit computers are they way they are.
Here's a rather wonderful original document from the BBC Research Department (I had no idea that was a thing) back in 1969 going over just what makes them so great (https://downloads.bbc.co.uk/rd/pubs/reports/1969-10.pdf).
If all you've come across are Taylor approximations, these things can seem a little like magic at first.
Here's a rather wonderful original document from the BBC Research Department (I had no idea that was a thing) back in 1969 going over just what makes them so great (https://downloads.bbc.co.uk/rd/pubs/reports/1969-10.pdf).
If all you've come across are Taylor approximations, these things can seem a little like magic at first.
Doesn't handle divide by zero very well though i.e. f(x)=1/x. Should probably consider that as undefined rather than a bad expression.