> >I have a question. How would you move the decimal left or right,
> depending on if the
> >number a user enters is negative or not, and then move it that many
> spaces? If
> >needed, it would add zeros.
> Hmm. Trying to remember what grade I learned this in. You multiply by 10
> to move it right, divide by 10 to move it left.
The way we were just now taught (I'm in 7th grade Pre-Algebra) was using
exponets. To move it to the right, we take 10 to the so and so power. To the
left we do 10 to the negative power of so and so. So...I just answered my
own question... Im go to assume that will work as well. But one part is
> >One other question. How would I find the first 0 of a repeating zero.
> Like 204,000.
> >How would you find the 0 in the 4th column.
> Treat it as a string and look for the first set of double zeros.
Yes... I could do this... But what if the number is 2.5000435000 or
What I need to do is this. The user specifies a number, let's say 0.0046.
What the script needs to do, is take that number, and print it out in
scientific notation. So the answer for 0.0046 would be 4.6 x 10 ^-3. From my
notes it says:
All numbers expressed in scientific notation are given as the product of
a number between 1 and 10 and a power of 10.
Hope this helps and you can answer my question!
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php