Sandbox: Difference between revisions
no edit summary
No edit summary |
No edit summary |
||
Line 3:
{{libheader|math/calculus}}
In earlier versions without calculus library, D. can be used instead of pderiv
<syntaxhighlight lang="J">
load 'math/calculus' ▼
coinsert 'jcalculus'▼
▲coinsert 'jcalculus'
func=: monad define
Line 23 ⟶ 18:
)
go=.y
go=. go - 0.03 * func pderiv 1 ] go NB. use D. instead of pderiv for earlier versions
)
shortygd ^:_ go
</syntaxhighlight>
{{out}}
<pre>
0.107626780140768125 _1.22325973233483509
</pre>
|