Does anyone know what math methods are implemnted by the hardware of the processor for .net? For example, I have an algorithm that makes a lot of use of atan. I can easily write a lookup table for this, but if math.net implements this using an fpu or other hardware extensions, it's not going to be worth it.
Whether or not the methods are implemented using the x87 hardware instructions isn't the issue, because the hardware transcendental function instructions are slow.
The "Intel 64 and IA-32 Architectures Optimization Reference Manual" (download here) lists fpatan
as having a latency of 150-300 cycles on recent hardware. A well written software implementation can deliver a full accuracy double-precision result in substantially less time -- indeed, high-quality math libraries do just that.