Thanks for the quick reply.

I tried to use this code now:

$x = (- log(1) - log(0.06/100))*100*673356;

The value of $x is 499534596.235

However the value of $x should be 4645225.

U sure log() in PHP does the same as ln()?

Wim

"Philip Ronan" <in*****@invalid.invalid> schreef in bericht

news:BE7C1758.2E294%in*****@invalid.invalid...

Wim Smit wrote:

I am trying to put the following math formula in php, but I know to

little

of math to do it I guess, maybe somebody can help me out.

This is the formula:

x = (-ln(1) - ln(y/100))*100*z

The values for y and z will be submitted via a form.

Any help is greatly apreciated.

Wim

The PHP function for natural logarithms is log(), not ln(). Variable names

start with a $ symbol, e.g.:

$x = $_GET['x'];

$y = $_GET['y'];

Fix that, put a semicolon at the end and it should work.

BTW, ln(1) is equal to zero, so you can delete it from your equation.

--

phil [dot] ronan @ virgin [dot] net

http://vzone.virgin.net/phil.ronan/