16 lines
499 B
Plaintext

Timing for 10000000 complex.h cexp: 2864133ns
Timing for 10000000 approximations: 1321049ns
Approximation faster, speedup: 1543084ns (2.17x)
Squared error in cosines (100000 runs):
Average: 0.000051 (0.713743% error)
Largest: 0.000174 (1.320551% error)
Input: 0.729202
Value: -0.659428
Approximation: -0.672634
Squared error in sines (100000 runs):
Average: 0.000070 (0.835334% error)
Largest: 0.000288 (1.698413% error)
Input: 0.842206
Value: 0.475669
Approximation: 0.458685