help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: An issue with function signatures


From: Juan Pablo Carbajal
Subject: Re: An issue with function signatures
Date: Fri, 21 Dec 2018 09:16:37 +0100

Hi Julien,

Thank you for your thoughts. Unless we get another answer I see this
as a weakness on the signature and we should discourage it in future
function.
There is this other aspect that marks superiority of the signature
which request a function with multiple arguments (value, deriv,
deriv2, etc..): a function that returns multiple arguments can be used
with optimizers with the current signature (i.e, updating current
signatures can be made backwards compatible) without extra coding or
more expensive execution, while the converse is not true (either one
needs extra spurious code, like the one with the persistent variable
trick, or we waste computing).

Thanks

On Thu, Dec 20, 2018 at 10:35 AM Julien Bect
<address@hidden> wrote:
>
> Le 20/12/2018 à 09:56, JuanPi a écrit :
> >
> > Hi Julien.
> > Thanks i have tried this idea, but found that you need some extra code
> > to detect if the point in which the derivatives are evaluated are the
> > same as the ones used to evaluate the function, to make sure that the
> > correspondence between function and derivatives holds. Otherwise you
> > are depending on the internal functioning of the optimiser, which can
> > be anything. Don't you suffer this problem?
> >
>
> Sure, you need some extra code, but it's not necessarily very complicated.
>
> In my simple example, the extra code is just "~ isequal (p, p0)". If you
> have more arguments, you need more isequals.
>
>
>
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]