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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 186 - (show annotations) (download) (as text)
Fri Jan 13 03:36:44 2006 UTC (18 years, 6 months ago) by johnpye
File MIME type: text/x-ascend
File size: 408 byte(s)
Modularising the 'loop' components in my steam system test case.
Changing some models to use the new 'FIX varlist' syntax (bug 204)
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 default_self;
20 RUN reset;
21 RUN values;
22 END default_self;
23 METHOD self_test;
24 ASSERT abs(y - 1) < 1e-20;
25 ASSERT abs(z - 2.302585093) < 1e-8;
26 END self_test;
27
28 END testlog10;

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