Page 1 of 1
how to write this in PHP???
Posted: Tue Mar 02, 2004 8:55 am
by apek
i dont know how to write this in PHP..
and i dont know how to write this here because its a mathematical equation....with power,negative and exponen...
pls help..how to write this here???
Posted: Tue Mar 02, 2004 9:00 am
by pelegk2
what are utalking about
give numbers example
Posted: Tue Mar 02, 2004 9:01 am
by apek
but i try to write this as clear as i can..
e (with power by negative i*t)
with i and t is a variable...
and e is exponent...
Posted: Tue Mar 02, 2004 9:10 am
by scorphus
Code: Select all
<?php
$i = 1;
$t = 2;
echo exp(-$i * $t);
?>
Posted: Tue Mar 02, 2004 9:10 am
by markl999
Posted: Tue Mar 02, 2004 9:14 am
by apek
if pow(2,8) means a i want to raise the two with the power 8..
how to raise the exponen with the power -i*t??
is this true??
Posted: Tue Mar 02, 2004 9:17 am
by scorphus
Please read my post a bit above... thanks.
Scorphus.
Posted: Tue Mar 02, 2004 9:18 am
by apek
i read it..
but theres no pow is written there..
in my equation,theres power involve...
Posted: Tue Mar 02, 2004 9:21 am
by scorphus
scorphus@Kilauea:/tmp$ cat tmp.php
Code: Select all
<?php
$i = 1;
$t = 2;
echo exp(-$i * $t) . "\n";
echo exp(0) . "\n";
echo exp(1) . "\n";
echo exp(2) . "\n";
?>
scorphus@Kilauea:/tmp$ php tmp.php
Code: Select all
0.135335283237
1
2.71828182846
7.38905609893
scorphus@Kilauea:/tmp$