Re: Sin & Cos speed worries



On Mon, 31 Jul 2006 20:18:34 UTC, rgootee@xxxxxxxxx wrote:

I have recently started work on a project that is VERY focused the
execution time of the algorithms. The lead programmer on said project
has said to minimize "sin,cos,and square-roots" to keep the execution
time low.

How much inaccuracy are you willing to accept for the faster version?

You might be surprised at how inaccurate many of the math libraries
are that ship with compilers. A "C" program to test sin(355.) and the
results can be found in tsin.c on the web page in my signature.
I would be interested in results people get that are not already listed.
---
Fred J. Tydeman Tydeman Consulting
tydeman@xxxxxxxxx Testing, numerics, programming
+1 (775) 358-9748 Vice-chair of J11 (ANSI "C")
Sample C99+FPCE tests: http://www.tybor.com
Savers sleep well, investors eat well, spenders work forever.
.



Relevant Pages

  • Re: Aspiring highest-order programmer
    ... >>algorithms already suck. ... >>able to tell, from a practical program's graph of execution time, the ... The MIS programmer doesn't control n, perhaps, as much as the ... In a biological computing model, let us say, where microorganisms do ...
    (comp.programming)
  • Re: Narrow To Wide To Narrow String Conversion With reinterpret_cast
    ... | Reinterpret_cast is a compile time cast (the resulting code will be fast ... | when executed but trusts the programmer to know what they are doing. ... | dynamic_cast is at execution time and usually achieves its purpose by ...
    (alt.comp.lang.learn.c-cpp)

Loading