On Jun 15, 7:43 pm, Peter Otten <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > On Jun 15, 6:58 pm, Christian Meesters <[EMAIL PROTECTED]> 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. > Did you try gmpy? Not yet: I was kind of set back when I saw their homepage was last updated 2002. But I'll give it a try. You think it's the best thing there is? Thanks, Ram. -- http://mail.python.org/mailman/listinfo/python-list