Numerical C

tgg at hou5e.UUCP tgg at hou5e.UUCP
Wed Apr 25 01:53:28 AEST 1984


I'll be brash (i.e., not look in K&R) and say that '!', used as a dyodic
operation, could be used as expnentiation. It even looks nice and it's better
than a function because the compiler can cast as needed to mix types. Note
that the expedient
	#define	power(a,b)	pow( (double) (a), (double) (b) )
will promote lessors to doubles, it won't recognise situations that don't
require promotion.
	Tom Gulvin	AT&T ISL - soon to be Silicon Valley.



More information about the Comp.lang.c mailing list