Bernhard R. Link wrote:

Sorry, but sin and cos are mathematical functions.

The mathematical functions sin and cos are mathematical
functions in mathematics but almost never in GCC's world,
"almost never" in the mathematical sense:
They can almost never be computed by programs translated using
GCC, i.e. they can be computed for only finitely many inputs.
You can use gcc for translating functions typically named
"sin" and "cos", this naming doesn't make them equal to the
mathematical functions of the same name. The choice of names
"sin" and "cos" seems to be less than helpful, this thread
demonstrates, but of course correcting them is too late, and
off topic. Knuth *has* chosen different names for metapost, BTW.

Programmers write calls to functions named "sin" and "cos" for
reaons of getting a result that is near what the mathematical
model (involving the same names sin and cos) would suggest.
Question is, how and when should GCC enable a programmer to
trigger either library procedures, or procedures built
into the processor. There is no full mathematical trigonometry
inside the processor, and probably not in any T(n) < infty
library function. But there is reason to use either of them
depending on your application. Scott explains.

I do not want to offend methematicians, but see, you say that this
and that is obvious when it isn't even obviously the best choice
in 2D and 3D programs that depend heavily on "sin" and "cos".


-- Georg

Reply via email to