Fortran computes cosine 300 times faster than C (on Sun3)

Doug Gwyn gwyn at smoke.BRL.MIL
Thu Mar 9 07:11:22 AEST 1989


In article <16279 at mimsy.UUCP> chris at mimsy.UUCP (Chris Torek) writes:
>`COS' is an intrisinc function in Fortran.  ...

Three other contributions to the difference in running time are:
	(a) C's cos() computes a double-precision value.
	(b) The C code required conversion from double to
		single precision for the assignment.
	(c) C's semantics required that the multiplications
		be performed in double precision.



More information about the Comp.lang.c mailing list