[Jprogramming] Trying to fix use of "D." with deriv_jcalculus_ fails

Devon McCormick devonmcc at gmail.com
Sat Jan 16 05:19:24 UTC 2021


I'm using what is given in the essay, trying to change as little as
possible.  However the polynomial version is more straightforward.

On Fri, Jan 15, 2021 at 11:10 PM Henry Rich <henryhrich at gmail.com> wrote:

> A reasonable expectation.  sslope_jcalculus_ provides an approximation
> to the slope.  A user could write a conjunction to use that if
> deriv_jcalculus_ can't find a closed-form derivative.
>
> But: #.&1 _1 _2&> opens its argument.  Can there ever be a derivative of
> a boxed argument?
>
> Henry Rich
>
> On 1/15/2021 10:48 PM, Devon McCormick wrote:
> > I guess I was expecting a numerical solution if a symbolic one is not
> found.
> >
> > On Fri, Jan 15, 2021 at 10:05 PM Henry Rich <henryhrich at gmail.com>
> wrote:
> >
> >> What do you expect the derivative of #.&1 _1 _2&> to be?
> >>
> >> I see that #.&1 _1 _2 has no derivative, but 1 _1 _2&p. does.
> >>
> >> Deficiencies in math/calculus are not 'issues'.  They are opportunities
> >> for improvement by users.
> >>
> >> Henry Rich
> >>
> >> On 1/15/2021 9:37 PM, Devon McCormick wrote:
> >>> I tried to update chapter 23 of the "50 Shades of J" essay using the
> new
> >>> version of Newton's method from "
> >>> https://code.jsoftware.com/wiki/Essays/Newton%27s_Method" but this
> >> breaks
> >>> examples in "50 Shades", e.g.
> >>>
> >>>      f1=: #.&1 _1 _2&>   NB. Function to use
> >>>      Newton=: adverb : ']-u % (u deriv_jcalculus_ 1'
> >>>      f1 Newton 1
> >>> |domain error: deriv_jcalculus_
> >>> |       13!:8(3)
> >>> |deriv_jcalculus_[:19]
> >>>
> >>> Is this a known issue?
> >>>
> >>> I've left my "fix" in as the existing code will also break in the
> current
> >>> version of J.
> >>>
> >>
> >> --
> >> This email has been checked for viruses by AVG.
> >> https://www.avg.com
> >>
> >> ----------------------------------------------------------------------
> >> For information about J forums see http://www.jsoftware.com/forums.htm
> >>
> >
>
>
> --
> This email has been checked for viruses by AVG.
> https://www.avg.com
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>


-- 

Devon McCormick, CFA

Quantitative Consultant


More information about the Programming mailing list