On Jun 18, 7:12 pm, Peter Pearson <[EMAIL PROTECTED]> wrote: > On Tue, 17 Jun 2008 08:13:40 -0400, Phil Hobbs wrote: > > [EMAIL PROTECTED] wrote: > [snip] > >> I have a physical system set up in which a body is supposed to > >> accelerate and to get very close to lightspeed, while never really > >> attaining it. After approx. 680 seconds, Python gets stuck and tells > >> me the object has passed lightspeed. I put the same equations in > >> Mathematica, again I get the same mistake around 680 seconds. So I > >> think, I have a problem with my model! Then I pump up the > >> WorkingPrecision in Mathematica to about 10. I run the same equations > >> again, and it works! At least for the first 10,000 seconds, the object > >> does not pass lightspeed. > >> I concluded that I need Python to work at a higher precision. > [snip] > > You need to change your representation. Try redoing the algebra using > > (c-v) as the independent variable, and calculate that. > > Or represent the velocity as c*tanh(b), where b is the independent > variable. If memory serves, this is the representation in which > constant acceleration corresponds to db/dt = constant. > > -- > To email me, substitute nowhere->spamcop, invalid->net.
See my comment to Brodie. -- http://mail.python.org/mailman/listinfo/python-list