i need function for POWER and LOGRITHM of base N

williams1981
williams1981 used Ask the Experts™
on
Thanks for ur post.
   At this moment I will accept any suggestions about   any Power FUNCTION
(i.e. I want to find the power of 2 million to the power -0.35…. that is .. (2000000) to the power -0.035)
 
   One other thing, I want a program for the logarithm of base N  (i.e. log
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
dbruntonQuid, Me Anxius Sum?  Illegitimi non carborundum.

Commented:
Turbo Pascal

Exp(x : real);
Ln(x : real);

eg
 var
   y : real;

y := exp(3.1234);
dbruntonQuid, Me Anxius Sum?  Illegitimi non carborundum.

Commented:
And Stockton's page has all you want

http://www.merlyn.demon.co.uk/pas-math.htm
Top Expert 2008

Commented:
huh longtime ago we've created (we means me and math students from Katowice) nice Power function i'll see if I can find somewhere around.
ziolko.
Fundamentals of JavaScript

Learn the fundamentals of the popular programming language JavaScript so that you can explore the realm of web development.

Commented:
okay, 2000000^-0,35 is also Exp(Ln(2000000^-0,35)) = Exp(-0,35 * Ln(2000000)) so you'll end up needing an extended Exp() function able to handle large numbers and also negative arguments (which the standard "low-class" definition doesn't allow)

You're lucky, I have one 8-)

Interface

{$E+}     { ‚mulation active           }
{$N+}     { 80x87 pr‚sent ou ‚mul‚     }

Function  ExpReal ( a, x : Extended ) : Extended;

Implementation

Function ExpReal;
 Var j     : Byte;
     cons1 : Extended;
     c2    : Extended;

Begin
  cons1:=(x*Ln(a));
  If (cons1<1419) { avec 8087 } { correction de 1425 … 1419 le 25/09/94 }
   Then cons1:=Exp(cons1) { au lieu de re-calculer x*ln(a)) le 29/10/94 }
   Else Begin
          cons1:=1.0; { correction de 1 … 1.0 le 25/09/94 }
          c2:=ExpReal(a,100); { par tranches de 100 : par exemple... } { corr. 28/09/94 }
          For j:=1 to Trunc(x/100) Do cons1:=cons1*c2; { on ‚vite ainsi [x/100]-1 calculs }
          For j:=1 to Trunc(x-100*Trunc(x/100)) Do cons1:=cons1*a;
        End;
  ExpReal:=cons1;
End; { ExpReal Extended Function }
Top Expert 2008

Commented:
Is this Q still open?
ziolko.
dbruntonQuid, Me Anxius Sum?  Illegitimi non carborundum.

Commented:
Yep, but the questioner has run away.
williams1981:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
dbruntonQuid, Me Anxius Sum?  Illegitimi non carborundum.

Commented:
Points to VGR
VGR

Commented:
(always agrees with dbrunton)

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial