Path: utzoo!utgpu!water!watmath!clyde!rutgers!umd5!brl-adm!adm!V4039%TEMPLEVM.BITNET@CUNYVM.CUNY.EDU From: V4039%TEMPLEVM.BITNET@CUNYVM.CUNY.EDU (Stan Horwitz) Newsgroups: comp.lang.c Subject: Re: power operator Message-ID: <11182@brl-adm.ARPA> Date: 8 Jan 88 15:44:01 GMT Sender: news@brl-adm.ARPA Lines: 32 Gus Baird suggest's that C might not have been given a power operator so as to make the point (to programming students) that some operators such as the power operator require some overhead. Yes I know that many computer processor chips have multiplication built right in. In any case, I very much doubt that C's lack of a power operator stems from a desire to prove a point to computer science students. As I am reading output from this group, the purpose of C is not to teach programmers programming as was Pascal, but to get the job done. Many suggestions have been offered as to how to use math.h functions for power operations, but a strange thing has occurred. There seems to be a difference of opinion on the subject. How can this be? The fact of the matter is, if C's purpose is to get the job done, then inclusion of a power operator is a reasonable expectation. I am not a systems programmer nor do I ever plan to be one. Systems programming is not my cup of tea. I am interested in applying C to writing statistical applications software. As such a power operator would be very nice. Since I am not a compiler writer, I don't really care what the ramifications involving the inclusion of a power operator are as long as there is one available for my use. Just as with the + and * operators for addition and subtraction, I really don't care all that much how they are implemented as long as they work to my expectations. The same goes for the power operator. My suggestion is to make the symbol for the power operator *^ which in a way tells what it does. If some of you out there prefer a language which illustrates programming techniques and idealism for teaching purposes, I suggest you use Pascal which was designed for the purpose of teaching students of programming how to program. That is why := is used and probably why the language is so verbose. As I am sure many people will agree, C is not a language one uses to teach introductory programming. It is meant for production not education and I hope this will continue to be true of C. Thanks for listening ... Stan Horwitz V4039 AT TEMPLEVM over in snow covered Philadelphia.