/[ascend]/trunk/models/johnpye/testlog10.a4c
ViewVC logotype

Contents of /trunk/models/johnpye/testlog10.a4c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 917 - (show annotations) (download) (as text)
Thu Nov 2 21:34:59 2006 UTC (16 years, 3 months ago) by johnpye
File MIME type: text/x-ascend
File size: 426 byte(s)
Added some debug stuff to work on the on_load problem.
1 REQUIRE "atoms.a4l";
2
3 MODEL testlog10;
4
5 x IS_A variable;
6 y IS_A variable;
7 z IS_A variable;
8
9 log_10_expr: y = log10(x);
10 log_e_expr: z = ln(x);
11
12 METHODS
13 METHOD specify;
14 FIX x;
15 END specify;
16 METHOD values;
17 x := 10;
18 END values;
19 METHOD on_load;
20 RUN reset;
21 RUN values;
22 END on_load;
23 METHOD self_test;
24 ASSERT abs(y - 1) < 1e-20;
25 ASSERT abs(z - 2.302585093) < 1e-8;
26 ASSERT abs(x - 10) <1e-20;
27 END self_test;
28
29 END testlog10;

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22