TIP: Click on subject to list as thread! ANSI
echo: delphi
to: DEREK BENNER
from: RYAN POTTS
date: 1996-05-15 09:52:00
subject: Powers and Logs

Derek Benner wrote in a message to Justin Marquez:
JM>    If only DELPHI had a built-in operator which did what FORTRAN's 
JM> "**" operator does!  It would make engineering and scientific DELPHI 
JM> programming easier and faster!
JM> (pssst! Anyone listening at Borland?)
 DB> If I remember correctly the '**' operator raises the number
 DB> to the power of the second number, 2 to the 3rd power =
 DB> '2**3' and 10 to the 5th power equals '10**5', am I right? 
Also pascal doesn't have a Log base 10 function either.  Here are a couple 
simple functions that I have written.
function log(number : real):real;
begin
  log:=ln(number) / ln(10);
end;
function power( Man : Real; Pwr : Real ) : Real;
begin
  Power := Exp( Ln( Man ) * Pwr );
end;
Use them in good health.
Thanks,
           Ryan 
---
---------------
* Origin: Midnight Express, Fairlawn Ohio (1:157/110)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.