Jump to content

php give calculating mistake?


invictor

Recommended Posts

$test1 = exp(-((-4.00)^2)/2)/(sqrt(2*pi(1)));
//prints 1.08443755142
echo $test1;

 

I need advise with this math formula, it prints 1.08443755142 but THIS IS WRONG! it should be:

0.0001338302 (which i both confirmed via excel, wolframalpha, matlab, google)

 

 

Any idea? I getting grey hair!

 

 

Best regards

Invictor

Link to comment
https://forums.phpfreaks.com/topic/247462-php-give-calculating-mistake/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.