Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Source code for pow function?

Status
Not open for further replies.

hoangnc

Newbie level 4
Joined
May 10, 2004
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
57
pow source code

I have to write a function like pow (double pow(double x, double y)). Anyone has this source code?
 

pow function

pow is math function! In the standard library, there are his prototype!
 

pow function code

If You realy need ... You can use this fact:

X^Y <=> e^(ln(X^Y)) <=> e^(Y*ln(X))

PASCAL/DELPHI:

function Pow(aBasis: longint; aExponent: byte): longint;
begin Pow:=Trunc(Exp(aExponent*Ln(aBasis))); end;

Tihi 8)
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top