How not to write a loop, revisited

Richard A. O'Keefe ok at quintus.uucp
Tue Jul 19 08:09:57 AEST 1988


In article <10477 at stb.UUCP> michael at stb.UUCP (Michael Gersten) writes:
>Hmm, when I've written exponentiation routines I do it with logs and exp().

That's the obvious way to do it, but according to Cody & Waite in their
classic "Software Manual for the Elementary Functions" it is _not_ a good
idea.  There are enough gotchas in the elementary functions that you really
need to be able to rely on them as part of the language, and even then if
you care about the results it is worth testing them.  [Which is not to say
that the elementary functions need special syntactic forms!]



More information about the Comp.lang.c mailing list