home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / pascal / 7786 < prev    next >
Encoding:
Internet Message Format  |  1993-01-01  |  763 b 

  1. Path: sparky!uunet!newsflash.concordia.ca!nstn.ns.ca!ac.dal.ca!chip
  2. From: chip@ac.dal.ca
  3. Newsgroups: comp.lang.pascal
  4. Subject: Re: powers in TURBO pascal
  5. Message-ID: <1993Jan1.004310.9816@ac.dal.ca>
  6. Date: 1 Jan 93 00:43:10 -0400
  7. 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>
  8. Organization: Dalhousie University, Halifax, Nova Scotia, Canada
  9. Lines: 21
  10.  
  11. > Function Power(a,b:real):real;
  12. > begin
  13. > {messy code goes here!}
  14. > end;
  15.  
  16. NOTE:
  17.  y    y * LN(x)
  18. x  = e
  19.  
  20. Therefore:
  21.  
  22. FUNCTION Power(Base, Power) : REAL;
  23. BEGIN
  24.   EXP(Power * LN(Base));
  25. END;
  26.  
  27. That's the messy code....
  28.  
  29. Season's Greetings....Mark Klaamas
  30. chip@ac.dal.ca
  31.