exp() returns NaN stuff

tmnet

New Member
Ok, I'm stuck. I have this PHP code:\[code\] echo exp(12), '<br/>'; echo exp(4.2);\[/code\]just like on the PHP.net page. And what I have on the screen:\[code\] NAN 298.86740096706\[/code\]but then there comes the weirdest thing ever. I thought that maybe there's some PHP.ini problem with numbers like 2.67e8 and so (I mean with the 'e' inside) or something. But then, when I changed the above code into:\[code\] echo (2.67e8), '<br/>'; echo exp(4.2);\[/code\]suddenly I saw this whatever:\[code\] 267000000 NAN\[/code\]It's kind of WTF especially because of the last NAN, when first it was a quite normal, calm float 298.86740096706 but then just with no reason it went to hell replaced by NAN. Do you have any ideas? Please?
 
Back
Top