Page 1 of 1

[SOLVED]Output scientific notation

Posted: Mon May 16, 2005 5:52 am
by rubberjohn
can anyone help me with this, i have a string that contains very small numbers. This is it:

Code: Select all

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7.84929356358E-05, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.304709576138, 0, 0, 0, 0.0489795918367, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.205808477237, 0, 0, 0, 0.0541601255887, 0.0369701726845, 0, 0, 0, 0.087284144427, 0.196546310832, 0.0654631083203,
how can i output these numbers, specifically "7.84929356358E-05" so that i can perform calculations on the string, basically i dont want the output to be scientific notation. Or will i be able to perfrom caluculations on this array as it is??

thanks

Posted: Mon May 16, 2005 6:35 am
by John Cartwright
I believe you have reached the maximum value PHP can handle. To compensate it converts your values to scientific. I don't think you should have a problem, just treat it as if it were a normal number, which in fact it is.

ok

Posted: Mon May 16, 2005 7:09 am
by rubberjohn
ah ok i thought i better check this now before i tried to work with the array
thanks