The reason for this is because I recently discovered that i2x=cos(x*pi)+i*sin(x*pi), and I want to know if the current means of calculating sin and cos are faster than powers of i.
If you're on any UNIX system you could do $ time /path/to/binary
for example: $ time find / -name "*"
would tell you how long it takes to list every file in your filesystem (probably quite a while).
Edit: Took mine 2m 47s.
Well, Taylor sucks for distant values (near pi). One way could be using sin(x) = cos(x-pi/2)
Another, using knows values interpolate a polynomial. Like (0,0); (pi/6,0.5); (pi/4, sqrt(2)/2); (pi/2, 1)
(there is the Gauss quadrature that ask for specific evaluation points)
It seems that the sin calculation is performed using a look-up table and interpolation.
The pow could use xy = z -> y ln(x) = ln(z)
So it will be binary search against logarithm and exponentiation.