Parent Directory | Revision Log
Moving solvers to their own directory
1 | REQUIRE "atoms.a4l"; |
2 | IMPORT "johnpye/qrslv/qrslv"; |
3 | |
4 | MODEL qrslvtest; |
5 | |
6 | x IS_A solver_var; |
7 | y IS_A solver_var; |
8 | z IS_A solver_var; |
9 | |
10 | log_10_expr: y = log10(x); |
11 | log_e_expr: z = ln(x); |
12 | |
13 | METHODS |
14 | METHOD specify; |
15 | FIX x; |
16 | END specify; |
17 | METHOD values; |
18 | x := 10; |
19 | END values; |
20 | METHOD on_load; |
21 | RUN reset; |
22 | RUN values; |
23 | END on_load; |
24 | METHOD self_test; |
25 | ASSERT abs(y - 1) < 1e-20; |
26 | ASSERT abs(z - 2.302585093) < 1e-8; |
27 | ASSERT abs(x - 10) <1e-20; |
28 | END self_test; |
29 | |
30 | END qrslvtest; |
john.pye@anu.edu.au | ViewVC Help |
Powered by ViewVC 1.1.22 |