# i need function for POWER and LOGRITHM of base N

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® is a registered trademark of EXPERTS EXCHANGE®
Quid, Me Anxius Sum?  Illegitimi non carborundum.

Commented:
Turbo Pascal

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

eg
var
y : real;

y := exp(3.1234);
Quid, 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.
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.
Quid, Me Anxius Sum?  Illegitimi non carborundum.

Commented:
Yep, but the questioner has run away.

Commented:
williams1981: