1 |
REQUIRE "atoms.a4l"; |
REQUIRE "atoms.a4l"; |
2 |
|
|
3 |
MODEL testTrig; |
MODEL testfunc; |
4 |
(* dependent variables *) |
(* dependent variables *) |
5 |
yArccosh,yArcsinh,yArctanh, |
yArccosh,yArcsinh,yArctanh, |
6 |
yCos,yCosh, |
yCos,yCosh, |
40 |
tanEqn: yTan = tan(xTan); |
tanEqn: yTan = tan(xTan); |
41 |
tanhEqn: yTanh = tanh(xTanh); |
tanhEqn: yTanh = tanh(xTanh); |
42 |
|
|
43 |
METHODS |
METHODS |
44 |
|
|
45 |
METHOD default_self; |
METHOD default_self; |
46 |
END default_self; |
END default_self; |
47 |
|
|
48 |
METHOD specify; |
METHOD specify; |
49 |
FIX xExp,xLn; |
FIX xExp,xLn; |
50 |
FIX xSin,xCos,xTan; |
FIX xSin,xCos,xTan; |
51 |
FIX xArcsin,xArccos,xArctan; |
FIX xArcsin,xArccos,xArctan; |
52 |
FIX xSinh,xCosh,xTanh; |
FIX xSinh,xCosh,xTanh; |
53 |
FIX xArccosh,xArcsinh,xArctanh; |
FIX xArccosh,xArcsinh,xArctanh; |
54 |
FIX xLnm; |
FIX xLnm; |
55 |
END specify; |
END specify; |
56 |
|
|
57 |
METHOD values; |
METHOD on_load; |
58 |
|
RUN default_self; |
59 |
|
RUN reset; |
60 |
|
RUN values; |
61 |
|
END on_load; |
62 |
|
|
63 |
|
METHOD values; |
64 |
xArccos := 0.10; (* magnitude must not exceed 1.0 *) |
xArccos := 0.10; (* magnitude must not exceed 1.0 *) |
65 |
xArccosh := 2.0; (* value must be 1.0 or greater *) |
xArccosh := 2.0; (* value must be 1.0 or greater *) |
66 |
xArcsin := 0.11; (* magnitude must not exceed 1.0 *) |
xArcsin := 0.11; (* magnitude must not exceed 1.0 *) |
76 |
xSinh := 0.18; |
xSinh := 0.18; |
77 |
xTan := 0.19 {radian}; |
xTan := 0.19 {radian}; |
78 |
xTanh := 0.2; |
xTanh := 0.2; |
79 |
END values; |
END values; |
|
|
|
80 |
|
|
81 |
(* set up to recover original x values. Note mapping |
|
82 |
after solving. *) |
(* set up to recover original x values. Note mapping |
83 |
|
after solving. *) |
84 |
METHOD valuesRecover; |
|
85 |
|
METHOD valuesRecover; |
86 |
xArccos := yCos; (* yArccos becomes xCos orig value *) |
xArccos := yCos; (* yArccos becomes xCos orig value *) |
87 |
xArccosh := yCosh; (* yArccosh becomes xCosh orig value *) |
xArccosh := yCosh; (* yArccosh becomes xCosh orig value *) |
88 |
xArcsin := ySin; (* etc *) |
xArcsin := ySin; (* etc *) |
98 |
xSinh := yArcsinh; |
xSinh := yArcsinh; |
99 |
xTan := yArctan; |
xTan := yArctan; |
100 |
xTanh := yArctanh; |
xTanh := yArctanh; |
101 |
END valuesRecover; |
END valuesRecover; |
102 |
|
|
|
END testTrig; |
|
103 |
|
END testfunc; |