[ExI] Weird new way to do physics

Tomasz Rola rtomek at ceti.pl
Sun Nov 6 03:45:29 UTC 2011


Oh I wouldn't be myself if I didn't answer my own emails.

On Sat, 5 Nov 2011, Tomasz Rola wrote:

> > > AFAIK Python as it is today is unfit for calculations, especially on 
> > > multicore machines (because it is unicore). Unless you do it in Sage 
> > > (which relies on libraries in written in C and optimised a lot).

Of course Python evolves too. It's just that I prefer some other direction 
and as Python is unwilling to go there, I had to find myself another 
animal.

[...]
> This means, your computation may come to zero simply because there will be 
> no better float to represent a result, but not necesarilly because it 
> really comes to zero.
> 
> This is why I mentioned rationals and Decimal.
> 
> If you use floats in your code, you can turn it off now. Sorry. Or you can 
> leave it on, but even if you get zero, there is a need to tell if the zero 
> is true or false.
> 
> Floats are good for engineering. For results in maths or physics, they are 
> sometimes good - depends what is being computed.
> 
> In other words, you may consider rethinking your computations so it can 
> check for zero with more precision than float/double can give.

As an afterthought, I guess you may be happy finding an algebraic 
solution with a help of some CAS (computer algebra system). CAS are able 
to perform symbolic computations. If you can find such symbolic form for 
your problem, perhaps you will be able to perform a search in space of 
symbolically expressed solutions. Or whatever you actually want to do, 
only computing on symbolic forms rather than on numbers.

In your case, since you already know Python, a good candidate should be 
Sage:

http://en.wikipedia.org/wiki/Sage_(mathematics_software)

It is truly a behemoth among CASes. Or it seems like this. I have never 
really used it.

Regards,
Tomasz Rola

--
** A C programmer asked whether computer had Buddha's nature.      **
** As the answer, master did "rm -rif" on the programmer's home    **
** directory. And then the C programmer became enlightened...      **
**                                                                 **
** Tomasz Rola          mailto:tomasz_rola at bigfoot.com             **



More information about the extropy-chat mailing list