$title 'Test correctness of sllog10 intrinsic' (FNSLLOG10,SEQ=721) $onText sllog10(x,S) = log_10(x) if x >= S (1/log 10) (ln(S) + r/S) otherwise, r = x - S for S >= 1e-150, default S = 1e-150. Contributor: Steve, Mar 2017 $offText $include fnset_xy.inc $gdxIn fnsllog10 $load aeps reps relToInput T data $gdxIn loop {T, data(T, 'f') = sllog10.value( data(T,'x'),data(T,'y')); data(T, 'fx') = sllog10.grad(1: data(T,'x'),data(T,'y')); data(T, 'fy') = sllog10.grad(2: data(T,'x'),data(T,'y')); data(T,'fxx') = sllog10.hess(1:1:data(T,'x'),data(T,'y')); data(T,'fxy') = sllog10.hess(1:2:data(T,'x'),data(T,'y')); data(T,'fyx') = sllog10.hess(2:1:data(T,'x'),data(T,'y')); data(T,'fyy') = sllog10.hess(2:2:data(T,'x'),data(T,'y')); data(T, 'rc') = mathlastrc; data(T, 'ec') = mathlastec; }; $include fntest_xy.inc