fnbeta.gms : Test correctness of beta intrinsic


Small Model of Type : GAMS

Category : GAMS Test library

Main file : fnbeta.gms

$TITLE 'Test correctness of beta intrinsic' (FNBETA,SEQ=733)

$include fnset_xy.inc

$gdxin fnbeta
$load aeps reps reps1 reps2 T data

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

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

* the data set may contain some singular values
abort$[execerror < 6] 'Should get execution errors evaluating beta.XXXX(x,y) for exceptional x,y';
execerror = 0;

$include fntest_xy.inc