On Dec 14, 8:28 am, Carl Banks <[EMAIL PROTECTED]> wrote: > On Dec 13, 6:20 pm, Keflavich <[EMAIL PROTECTED]> wrote: > > > Solved: used round(number,12) in this case for all of the operands of > > my arcsines. Not pretty, but at least VIM made it easy... > > > Thanks for the help, > > Adam > > I suspect this could even fail in some circumstances. If it's for > school you're probably covered, but in real world, it would be better > to: > > 1. Rewrite calculation to avoid arccos and arcsin (using trigonometric > or geometric identities) > > 2. Clamp it to range [-1.0:1.0]. You can do this in numpy with > numpy.clip(). > > Carl Banks
Thanks Carl. The "clip" task sounds a lot more reasonable. It would be clever if I could find a way around using arcsin/arccos, I'll see if that works for me. Yours is certainly the most practical advice on this thread. Adam -- http://mail.python.org/mailman/listinfo/python-list