Implementing the exponential function
- Posted by CChris <christian.cuvier at ag?icultur?.gouv.fr> Sep 12, 2007
- 580 views
Do all supported C compilers know about double ldexp(double x,int pw2), which multiplies a real by a power of 2? If not, then exp() can properly be implemented call()ing machine code. But the overhead of call() could be an issue. power(E,x) is not as acurate as can be, so an alternate form is desirable, even though this definition is mathematically correct. CChris