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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 155 - (show annotations) (download) (as text)
Fri Dec 23 00:59:32 2005 UTC (16 years, 9 months ago) by johnpye
File MIME type: text/x-ascend
File size: 418 byte(s)
Fixing up self-testing models
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 x.fixed := TRUE;
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