From: Michael S. <m-s...@us...> - 2005-09-09 13:04:30
|
On 09.09.05, Andre Wobst wrote: > Hi, > > On 09.09.05, Michael Schindler wrote: > > > Geometrically, everything is well-defined, it's only that we commit some > > > numerical error because the length of (dx/dt, dy/dt) goes to zero. But > > > we should be able to treat this case better. > > > > What do you think of? We could look at the neighborhood and return a > > value that is expected to be the limiting rotation when we pass to > > the critial point. > > But there are cases, where we really have an unsteady behaviour. At > least for that cases, we should stop and raise a proper exception. I'm > not sure whether it makes sense to distinguish between the two cases. > It might not be worth the effort ... I'm not sure. Beside that, when > raising an exception, it might be wise to introduce a special > exception class here to enable the caller to handle this issue. This is a question to the Python coding masters: Is an exception the right thing to use here? I tend to dislike the try...except notation and am not quite sure how efficient this is. On the other had, with the different return types "float" or "None" one always has to ask for the proper return type. Michael. -- "A mathematician is a device for turning coffee into theorems" Paul Erdös. |