fabs(x) vs. (x) < 0 ? -(x) : (x)

Doug Gwyn gwyn at brl-smoke.ARPA
Thu Jan 8 07:41:54 AEST 1987


In article <4477 at ut-ngp.UUCP> jjr at ngp.UUCP (Jeff Rodriguez) writes:
>I.e., why isn't fabs() implemented as a macro?

Because if evaluation of its parameter produces side effects,
the macro won't work right.



More information about the Comp.lang.c mailing list