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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 305 - (show annotations) (download) (as text)
Wed Feb 22 03:07:10 2006 UTC (18 years, 4 months ago) by johnpye
File MIME type: text/x-ascend
File size: 419 byte(s)
Test case for changeset 370 / bug #206.
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 FREE y,z;
16 END specify;
17 METHOD values;
18 x := 10;
19 END values;
20 METHOD default_self;
21 RUN reset;
22 RUN values;
23 END default_self;
24 METHOD self_test;
25 ASSERT abs(y - 1) < 1e-20;
26 ASSERT abs(z - 2.302585093) < 1e-8;
27 END self_test;
28
29 END testlog10;

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