You're in the right place. The code could do with some refinement to
simplify both those forms.
Henry Rich
On 1/24/2020 11:41 AM, Raul Miller wrote:
I'm looking at
load'math/calculus'
coinsert'jcalculus'
sin=:1&o.
sin deriv 3
2&o. * _1"0@(1&o.)
And the only benefit I can see to this approach is that it preserves
hypothetical domain restrictions in the base function.
In math contexts, such issues are highlighted or ignored, depending on
the whims the mathematicians.
But here, I sort of suspect that we should assume that the constant
part of the expression does not need to detect domain errors.
This means that I think noun"rank@verb should be pruned to noun"rank.
That said, going all the way to -@(2&o.) would be an improvement.
Thanks,
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm