C vs. FORTRAN (was: What should be added to C)

Doug Gwyn gwyn at brl-smoke.ARPA
Sun Jun 15 15:59:12 AEST 1986


In article <1253 at brl-smoke.ARPA> rgh%inmet.uucp at BRL.Arpa writes:
-GVGVGVGVGVGVGVGVGVGVGVGVGVGVGVGVGVGVGVGVGVGVGVGVGV
-From: Root Boy Jim <rbj at ICST-CMR.ARPA>
-Doug, I am surprised that you ignored DMR's rationale for not putting
-exponentiation into C, or were you merely requesting a library function.
-Yes, I know you didn't write this but I'm responding to you here anyway.

What in the world does the last sentence mean??  And who wrote it???
This has passed over the borderline separating reality from fantasy..

In any case, the reason for not including exponentiation in the language
directly is that it would obscure the otherwise evident fact that this
is an expensive operation.  There is nothing preventing an implementor
from recognizing lpow(a,b) (or, better, _lpow(a,b)) as a special case
and generating in-line code if he has hardware that directly implements
integer exponentiation.  I don't know of any machines like that, though.
The implementor should of course also provide a portable C source for
lpow()/_lpow() so that applications can be ported to other machines.
I hope to get around to writing and posting a portable lpow() soon.



More information about the Comp.lang.c mailing list