C language hacking

Andrew Klossner andrew at orca.UUCP
Thu Nov 15 06:32:51 AEST 1984


	"It would also be nice if sin( x ) and cos( x ) could be
	computed simultaneously with reduced cost.  I doubt if this is
	possible but would like to know if it is."

Sure:

	sine = sin(x);
	cosine = sqrt(1.0 - sine*sine);

Sqrt() is lots cheaper than cos().

:-)

  -- Andrew Klossner   (decvax!tektronix!orca!andrew)       [UUCP]
                       (orca!andrew.tektronix at csnet-relay)  [ARPA]



More information about the Comp.lang.c mailing list