On Thu, Jul 31, 2008 at 4:33 PM, Zsbán Ambrus <[EMAIL PROTECTED]> wrote:
> NB. a list of roots.  Apart from numerical errors, these should
> NB. be functionally identical.
>
> NB. First, the built-in J function.
> rootsj =: /:~@:>@:{:@:p.
...
> p =: _1 1 1
> echo rootsj p

One way of getting an idea of the magnitude of numerical errors
is to find the polynomial values at the indicated roots
   err=: p. 1 {:: p.
   err _1 1 1
2.22045e_16 _1.11022e_16

-- 
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to