Boost logo

Boost :

From: Matt Austern (austern_at_[hidden])
Date: 2004-11-23 14:21:35

On Tue, 23 Nov 2004 10:55:19 +0100, Hubert Holin <hubert.holin_at_[hidden]> wrote:

> > Just out of curiosity: Can you give me an example of an algorithm where
> > this would be of advantage?
> >
> > Roland
> It is interesting if, for instance, you have to track an object
> along an orbit for a very long time. Using the canonical ("cartesian")
> representation usually entails transcendental functions (say sine and
> cosine), for which it is very hard to guaranty the accuracy (of a given,
> one-size-fits-all, implementation) for big values of the argument. If
> you integrate numerically, you all the more want to stay in the polar
> domain (unless we cross the singularity, but we are not modeling
> missiles, are we ;-) ? ).

I'm sure you'd want to use polar coordinates for that, yes. There are
of problems for which you want to use polar coordinates of some sort
or another.

But is it likely that you would want to use a package that provides
complex numbers in polar form? My experience is that if you're
working with complex numbers that you want to think of in the form
r exp(i phi), then you'll probably just do the work of separating out
the magnitude and phase ahead of time in your equations, and then
compute with them separately. After all: if you're doing something
where the magnitude-phase form is most convenient, it usually
means that putting numbers in that form makes the equations


Boost list run by bdawes at, gregod at, cpdaniel at, john at