home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!newsflash.concordia.ca!nstn.ns.ca!ac.dal.ca!chip
- From: chip@ac.dal.ca
- Newsgroups: comp.lang.pascal
- Subject: Re: powers in TURBO pascal
- Message-ID: <1993Jan1.004310.9816@ac.dal.ca>
- Date: 1 Jan 93 00:43:10 -0400
- References: <30DEC92.02825818.0033@music.mus.polymtl.ca> <dmurdoch.262.725736007@mast.queensu.ca> <1992Dec30.174246.2523@news.uni-stuttgart.de> <1992Dec31.122326.7404@qiclab.scn.rain.com>
- Organization: Dalhousie University, Halifax, Nova Scotia, Canada
- Lines: 21
-
- >
- > Function Power(a,b:real):real;
- > begin
- > {messy code goes here!}
- > end;
-
- NOTE:
- y y * LN(x)
- x = e
-
- Therefore:
-
- FUNCTION Power(Base, Power) : REAL;
- BEGIN
- EXP(Power * LN(Base));
- END;
-
- That's the messy code....
-
- Season's Greetings....Mark Klaamas
- chip@ac.dal.ca
-