fnvcpow.gms : vcpower 내장의 정확성 테스트

설명

vcpower(x,c) = x**c, c 상수

소형 모델 유형 :무료 슬롯 사이트


카테고리 : 무료 슬롯 사이트 테스트 라이브러리


메인 파일 : fnvcpow.gms 포함: fnset_xy.inc[htmlfntest_xy.inc[html]

$title 'vcpower 내장의 정확성 테스트' (FNVCPOW,SEQ=181)

* vcpower(x,c) = x**c, c 상수
$include fnset_xy.inc

$gdxIn fnvcpow
$load aeps 담당자 relToInput T 데이터
$gdxIn

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

중단$(실행 오류 lt 10)
  'x**c, x < 0)의 등급/헤스를 가져오는 동안 실행 오류가 발생해야 합니다.';
실행 오류 = 0;

$onDollar
* 일부 시스템은 기본적으로 언더플로를 0으로 플러시합니다.
* 이로 인해 x < 1, c > 1인 경우 일부 파생어의 결과가 덜 정확해졌습니다.
$ifI %system.platform% == LAX $set 플러시언더
$ifI %system.platform% == LEX $set 플러시언더
$ifI %system.platform% == WEX $set 플러시언더

$flushunder를 설정하지 않은 경우 $goTo noflushunder
* 1e-285를 수행할 수 없습니다. 지수가 너무 작습니다!!
* $if 정의된 경우 aeps aeps = max(aeps,1e-285);
$ 정의된 경우 aeps aeps = max(aeps,power(10,-285));
$label noflushunder

$include fntest_xy.inc