32 bit or 64 bit?

ram.rachum at gmail.com ram.rachum at gmail.com
Tue Jun 17 15:39:38 CEST 2008


On Jun 17, 3:13 pm, Phil Hobbs
<pcdhSpamMeSensel... at electrooptical.net> wrote:
> ram.rac... at gmail.com wrote:
> > On Jun 15, 7:43 pm, Peter Otten <__pete... at web.de> wrote:
> >> ram.rac... at gmail.com wrote:
> >>> On Jun 15, 6:58 pm, Christian Meesters <meest... at uni-mainz.de> wrote:
> >>>>> I do need speed. Is there an option?
> >>>> Mind telling us what you *actually* want to achieve? (What do you want to
> >>>> calculate?)
> >>>> Christian
> >>> Physical simulations of objects with near-lightspeed velocity.
> >> How did you determine that standard python floats are not good enough?
>
> > 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.
>
> >> Everything beyond that is unlikely to be supported by the hardware and will
> >> therefore introduce a speed penalty.
>
> > I have thought of that as well. However I have no choice. I must do
> > these calculations. If you know of any way that is supported by the
> > hardware, it will be terrific, but for now the slower things will have
> > to do.
>
> You need to change your representation.  Try redoing the algebra using
> (c-v) as the independent variable, and calculate that.
>
> Cheers,
>
> Phil Hobbs

That was suggested. Problem is, that sometimes the velocities are near
zero. So this solution, by itself, is not general enough.



More information about the Python-list mailing list