I'm working with multiplying (and exponents) of very small numbers, and keep getting too low and hitting "NAN". Is there any way to extend the precision so I don't bottom out?
Have a look here which I found in the manual, by looking for precision
Looks like the solution. Except now I'm working with these gigantic numbers (in the thousands of digits), and having to do e(thousands of digits), which is taking way too long =P
use (float)$var
or visit
http://us2.php.net/language.types.float
Floats aren't long enough unfortunately... Only e302 for them, need more digits... I think bcmath is the only way to go... Thanks guys =P
Originally posted by impactdni I'm working with multiplying (and exponents) of very small numbers, and keep getting too low and hitting "NAN". Is there any way to extend the precision so I don't bottom out?
Of course, if you're multiplying them, you could take their logarithms and add....
Hmmm? My math must be getting rusty...
xyz = log(x)+log(y)+log(z)?
yes.
1000*100 =
103 * 102 = 105
log(103) = 3 log(102) = 2 log(105) = 5
J.
Indeedy. that looks like it might be the way to go. Thanks a ton =P
Sure enough, exactly what I wanted =P Thanks a ton for suggesting logs =P