fnbinomial.gms : Test correctness of binomial intrinsic

Description

reps = 1e-7;


Small Model of Type : GAMS


Category : GAMS Test library


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

$title 'Test correctness of binomial intrinsic' (FNBINOMIAL,SEQ=730)

$include fnset_xy.inc

$gdxIn fnbinomial
$load aeps reps reps2 T data
$gdxIn
* reps = 1e-7;

data(T,'fyx_') = data(T,'fxy_');

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

$include fntest_xy.inc