[SOLVED]Output scientific notation

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
rubberjohn
Forum Contributor
Posts: 193
Joined: Fri Feb 25, 2005 4:03 am

[SOLVED]Output scientific notation

Post 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
Last edited by rubberjohn on Mon May 16, 2005 7:09 am, edited 1 time in total.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post 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.
rubberjohn
Forum Contributor
Posts: 193
Joined: Fri Feb 25, 2005 4:03 am

ok

Post by rubberjohn »

ah ok i thought i better check this now before i tried to work with the array
thanks
Post Reply