fnbinomial.gms : Test correctness of binomial intrinsic


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
* 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