How to use exponential function?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
aldonakamura
Forum Newbie
Posts: 3
Joined: Tue Aug 31, 2004 8:51 am
Location: Sao Paulo, Brasil

How to use exponential function?

Post by aldonakamura »

Hi there to all!
I was looking to this forum and didnt find a solution for my simple problem. Hope to get success writing here.

I need to do a simple math exponential function like this:

a = 4
b = 2
c = a ^ b ... c = 16 (4 * 4), but using PHP, this math calc returns me 8!

Does anybody help me? Thanx a lot!
My best regards, Aldo
peni
Forum Commoner
Posts: 34
Joined: Thu Nov 18, 2004 1:15 pm

Post by peni »

$c = pow($a, $b);
aldonakamura
Forum Newbie
Posts: 3
Joined: Tue Aug 31, 2004 8:51 am
Location: Sao Paulo, Brasil

Post by aldonakamura »

Wow! It works!
Thanx so much for the HELP!
Best Regards!
Post Reply