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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 305 - (hide annotations) (download) (as text)
Wed Feb 22 03:07:10 2006 UTC (19 years, 2 months ago) by johnpye
File MIME type: text/x-ascend
File size: 419 byte(s)
Test case for changeset 370 / bug #206.
1 johnpye 123 REQUIRE "atoms.a4l";
2    
3     MODEL testlog10;
4    
5 johnpye 155 x IS_A variable;
6     y IS_A variable;
7     z IS_A variable;
8 johnpye 123
9     log_10_expr: y = log10(x);
10     log_e_expr: z = ln(x);
11    
12     METHODS
13     METHOD specify;
14 johnpye 186 FIX x;
15 johnpye 305 FREE y,z;
16 johnpye 123 END specify;
17     METHOD values;
18 johnpye 155 x := 10;
19 johnpye 123 END values;
20     METHOD default_self;
21     RUN reset;
22     RUN values;
23     END default_self;
24     METHOD self_test;
25 johnpye 150 ASSERT abs(y - 1) < 1e-20;
26     ASSERT abs(z - 2.302585093) < 1e-8;
27 johnpye 123 END self_test;
28    
29     END testlog10;

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