Yeah, a rational y wouldn't ever quite satisfy 0 = _2 0 1 p. y
Henry Rich
On 2/5/2020 1:04 PM, Devon McCormick wrote:
You especially need guardrails if you try something like this:
_2 0 1&p. Newton 1 NB. OK - square root of 2
1.41421
_2 0 1&p. Newton 1x NB. Try extended precision
C-c C-c|break NB. After waiting a while...
| _2 0 1&p.Newton 1
NB. Failure to terminate...
On Wed, Feb 5, 2020 at 7:34 AM Henry Rich <henryhr...@gmail.com> wrote:
I misread your function.
(^~ - +:) Newton 1.1
0.346323j1.2326e_32
(^~ - +:) Newton 0.5
0.346323
Still need those guardrails!
Henry Rich
On 2/5/2020 2:21 AM, Skip Cave wrote:
In "Fifty Shades of J" chapter 23, the Newton Raphson algorithm is
described thusly:
Newton =: adverb : ']-u%(u D.1)'(^:_)("0)
How would that be defined using the new derivative verbs?
Also, what is the replacement for d.?
How would I find the roots of (x^x)=2*x using Newton Raphson?
Skip
Skip Cave
Cave Consulting LLC
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm