View Issue Details

IDProjectCategoryView StatusLast Update
0000165ascendcompilerpublic2012-08-10 09:56
Reporterjohn 
Assigned Toben 
PriorityimmediateSeverityblockReproducibilityalways
Status assignedResolutionopen 
Product Version 
Target Version1.0Fixed in Version 
Summary0000165: Wrong value in expr pdd_y1[i] = + 4 * alpha[i]^2;
DescriptionThis is a serious bug in the expression parser or evaluation engine.

In the current (revision 132) file models/johnpye/iapws95.a4c, I have this expression:

    phirdeltadelta_r3[range_r3] IS_A factor;
    FOR i IN range_r3 CREATE
        phirdeltadelta_r3[i] =
            n[i]* tau^t[i] * exp( r3_b1[i] ) * (
                    - 2 * alpha[i] * delta^d[i]
                    + 4 * alpha[i]^2 * delta^d[i] * d1^2 (* d1 = d-1 = d-eps *)
                    - 4 * d[i] * alpha[i] * delta^(d[i]-1) * d1
                    + d[i] * (d[i]-1) * delta^(d[i]-2)
                );
    END FOR;

I found that the '+4 *alpha[i]^2' is giving a very large incorrect result.

I had to change the value to '+4*alpha[i]*alpha[i]' for it to evaluate correctly.
TagsNo tags attached.

Relationships

Activities

john

2005-12-13 08:18

administrator   ~0000084

See changeset 140 for the working (workaround) version.

john

2005-12-20 09:09

administrator   ~0000112

Added models/johnpye/iapws95-failing165.a4c (changeset 156) which demonstrates this bug.

john

2006-05-17 01:04

administrator   ~0000343

Reminder sent to: ben

Hi Ben

Here is another bug we should probably review. Have you been able to reproduce this one yet?

Cheers
JP

ben

2012-08-10 09:05

manager   ~0000894

Is this still happening? is this the simplest form of the term that produces the error, or is there a smaller test equation? can you give an example of the incorrect result and correct result (numbers)? does the problem change if relation simplification is turned on/off?

ben

2012-08-10 09:56

manager   ~0000895

Last edited: 2012-08-16 13:01

View 2 revisions

updated test model for 165; bug not reproducible on tk gui.

(changeset 4306)

Issue History

Date Modified Username Field Change
2005-12-13 08:17 john New Issue
2005-12-13 08:18 john Note Added: 0000084
2005-12-13 08:18 john Description Updated
2005-12-13 17:05 john Status new => assigned
2005-12-13 17:05 john Assigned To => ben
2005-12-20 09:09 john Note Added: 0000112
2006-02-07 13:19 john Target release => 1.0
2006-02-07 13:24 john Target release 1.0 => 0.9.6
2006-05-17 01:04 john Note Added: 0000343
2010-03-23 18:26 john Target Version => 0.9.8
2011-03-09 19:32 john Target Version 0.9.8 => 1.0
2012-08-10 09:05 ben Note Added: 0000894
2012-08-10 09:56 ben Note Added: 0000895
2012-08-16 13:01 john Note Edited: 0000895 View Revisions