Raul Miller <[email protected]>
writes:

> This is better, though perhaps my names
> are not the best.  But it's still slower and
> bulkier than it really needs to be.  All we
> really need for this exercise is:
>
> mysqrt=: improve~^:_ 1:
>
> Notice, by the way, that the testing function
> 'close_enough' has vanished.  Instead we keep
> going until the result stops changing.

Yes, but now you can't pretend that this is even a toy model of
numerical code.  Continuing to machine precision in a solver is, well,
ridiculous.

I know this is educational code, and the power-based solution is
educationally interesting and all, but it doesn't generalize to reality.

- Johann

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

Reply via email to