3 ms·
Ugh I had to implement all the transcendental functions a while ago. It was miserable, especially dealing with intermediate rounding, etc I don’t recommend it.
by olliej 6y ago
Ugh I had to implement all the transcendental functions a while ago. It was miserable, especially dealing with intermediate rounding, etc
I don’t recommend it.
That said I liked that there’s a specific exp-1 function (otherwise you drop most precision).
- mjcohen 6y agoTo go with that, you need ln(1+x). HP calculators had both.
- jjgreen 6y agoAs has C (since C99) http://www.cplusplus.com/reference/cmath/log1p/ http://www.cplusplus.com/reference/cmath/log1p/
- olliej 6y agoI believe that they're all part of the IEEE 754 spec, but some of these functions are just recommended. x87 has pretty much all of them, including two remainder implementations \o/
- olliej 6y agoI did implement that, and sqrt, etc. With integer math because the misery of needing more precision :D (or is that :( ? )