This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Sine and Cosine Accuracy


* Georg Bauhaus <bauhaus@futureapps.de> [050530 19:34]:
> 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.

As I stated in my earlier mail, I'm not opposed against some
limitation of arguments (2^60 is a large number for me, when it is
correctly documented). What I'm arguing against is an argument
telling only [0,2\pi] is in any sense of the word 'correct'
range for those functions, or in any way sensible range for
computations of those. Code like 
"if( x+y < 2*pi) return sin(x+y); else return(x+y-2*pi);" would
really be useable to make me run around screaming, but
naming any range smaller than some [-50pi,100pi] "valid" could
really make me crazy...

	Bernhard R. Link


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]