REQUIRE "atoms.a4l"; MODEL testfunc; (* dependent variables *) yArccosh,yArcsinh,yArctanh, yCos,yCosh, yExp,yLn,yLnm, ySin,ySinh, yTan,yTanh IS_A factor; yArcsin,yArccos, yArctan IS_A angle; (* fixed variables *) xArccos,xArccosh, xArcsin,xArcsinh, xArctan,xArctanh, xCosh, xExp,xLn,xLnm, xSinh, xTanh IS_A factor; xCos,xSin, xTan IS_A angle; (* equations *) arccosEqn: yArccos = arccos(xArccos); arccoshEqn: yArccosh = arccosh(xArccosh); arcsinEqn: yArcsin = arcsin(xArcsin); arcsinhEqn: yArcsinh = arcsinh(xArcsinh); arctanEqn: yArctan = arctan(xArctan); arctanhEqn: yArctanh = arctanh(xArctanh); cosEqn: yCos = cos(xCos); coshEqn: yCosh = cosh(xCosh); expEqn: yExp = exp(xExp); lnEqn: yLn = ln(xLn); lnmEqn: yLnm = lnm(xLnm); sinEqn: ySin = sin(xSin); sinhEqn: ySinh = sinh(xSinh); tanEqn: yTan = tan(xTan); tanhEqn: yTanh = tanh(xTanh); METHODS METHOD default_self; END default_self; METHOD specify; FIX xExp,xLn; FIX xSin,xCos,xTan; FIX xArcsin,xArccos,xArctan; FIX xSinh,xCosh,xTanh; FIX xArccosh,xArcsinh,xArctanh; FIX xLnm; END specify; METHOD on_load; RUN default_self; RUN reset; RUN values; END on_load; METHOD values; xArccos := 0.10; (* magnitude must not exceed 1.0 *) xArccosh := 2.0; (* value must be 1.0 or greater *) xArcsin := 0.11; (* magnitude must not exceed 1.0 *) xArcsinh := 2.1; xArctan := 2.2; xArctanh := 0.12; (* magnitude must not exceed 1.0 *) xCos := 0.13 {radian}; xCosh := 0.14; xExp := 0.15; xLn := 0.16; (* value must be greater than 0 *) xLnm := 0.16; xSin := 0.17 {radian}; xSinh := 0.18; xTan := 0.19 {radian}; xTanh := 0.2; END values; (* set up to recover original x values. Note mapping after solving. *) METHOD valuesRecover; xArccos := yCos; (* yArccos becomes xCos orig value *) xArccosh := yCosh; (* yArccosh becomes xCosh orig value *) xArcsin := ySin; (* etc *) xArcsinh := ySinh; xArctan := yTan; xArctanh := yTanh; xCos := yArccos; xCosh := yArccosh; xExp := yLn; xLn := yExp; xLnm := yExp; xSin := yArcsin; xSinh := yArcsinh; xTan := yArctan; xTanh := yArctanh; END valuesRecover; END testfunc;