Problem Using Large Numbers

This program is ment to calculate how long it would take for an object to fall to the center of a planet, however, 5.9742*10^24 kg (the mass of earth) is too large for Java, and bigDecimal is making things far too complicated. Is there a simple way to do this?

class Acceleration

{

publicstaticvoid main(String arguments[])

{

// kg // m // s //

double mass = 5974200000000000000000000;

double distance = 6378100;

double gravity = mass / (distance * distance) * 0.00000000006673;

double traveled = 0;

double speed = 0;

double time = 0;

while(traveled<1)

{

speed += gravity;

traveled += speed;

time++;

}

System.out.println("Traveled: " + traveled +" m");

System.out.println("Time: " + time +" s");

System.out.println("Final Speed: " + speed +" m/s");

}

}

Also, I know the program is incomplete, but I'd like to resolve this problem before finishing it.

[1704 byte] By [robertdigregorioa] at [2007-11-27 5:49:25]
# 1
Sure. Change your scale (x1000 or something). Or live with BigDecimal.
bsampieria at 2007-7-12 15:35:55 > top of Java-index,Java Essentials,Java Programming...
# 2
double mass = 5.9742e24;Exponent may be off, as the number exceeds the total of my fingers and toes.
Hippolytea at 2007-7-12 15:35:55 > top of Java-index,Java Essentials,Java Programming...
# 3
Thanks =)
robertdigregorioa at 2007-7-12 15:35:55 > top of Java-index,Java Essentials,Java Programming...
# 4
There are closed formulas for computing this, right?
Hippolytea at 2007-7-12 15:35:55 > top of Java-index,Java Essentials,Java Programming...