fncentr5.gms : Test centropy intrinsic on nice inputs

Description

```Test the function values and derivatives of
centropy(x,y,delta) = x * log((x+delta)/(y+delta))
on nice inputs:
x,y in [1e-6,1e6]
d   in [0,1e-8]

Author: Steve Dirkse
```

Small Model of Type : GAMS

Category : GAMS Test library

Main file : fncentr5.gms   includes :   fnset_xy.inc [htmlfntest_xy.inc [html]

``````\$TITLE 'Test centropy intrinsic on nice inputs' (FNCENTR5,SEQ=361)

\$ontext
Test the function values and derivatives of
centropy(x,y,delta) = x * log((x+delta)/(y+delta))
on nice inputs:
x,y in [1e-6,1e6]
d   in [0,1e-8]

Author: Steve Dirkse
\$offtext

\$include fnset_xy.inc

\$gdxin fncentr5
\$gdxin
relToInput = 0;
reps = 4e-13;

loop {T,
data(T,  'f')  = centropy.value(   data(T,'x'),data(T,'y'),data(T,'d'));
data(T,'fxx')  = centropy.hess(1:1:data(T,'x'),data(T,'y'),data(T,'d'));
data(T,'fxy')  = centropy.hess(1:2:data(T,'x'),data(T,'y'),data(T,'d'));
data(T,'fyx')  = centropy.hess(2:1:data(T,'x'),data(T,'y'),data(T,'d'));
data(T,'fyy')  = centropy.hess(2:2:data(T,'x'),data(T,'y'),data(T,'d'));
data(T, 'rc')  = mathlastrc;
data(T, 'ec')  = mathlastec;
};

display relToInput;
\$include fntest_xy.inc
``````
GAMS Development Corp.
GAMS Software GmbH

General Information and Sales
U.S. (+1) 202 342-0180
Europe: (+49) 221 949-9170