View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000513 | ascend | general | public | 2011-06-21 15:51 | 2011-11-11 11:23 |
Reporter | vikram | ||||
Assigned To | ben | ||||
Priority | high | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | Linux | OS | Ubuntu | OS Version | 10.04 LTS |
Product Version | 0.9.7 | ||||
Target Version | 0.9.8 | Fixed in Version | 0.9.8 | ||
Summary | 0000513: Constant raised to constant evaluated incorrectly | ||||
Description | When a constant value is raised to another constant value, the result is base constant value raised to base constant value irrespective of the index constant value. | ||||
Steps To Reproduce | A simple example : x IS_A factor; y IS_A factor; x = 2^4; y = 4^2; x converged to 4 which is 2^2 y converges to 254 which is 4^4 | ||||
Tags | No tags attached. | ||||
|
test_bug.a4l (153 bytes) |
|
Reminder sent to: ben Hi Ben You might want to look at this bug... very strange, it seems that a^b is being evaluated as a^a in cases where a is an integer. Cheers JP |
|
Note: the bug also occurs with x = 2^4.0; y = 4^2.0; |
|
TODO: test if same occurs when 4.0, 2.0 are replaced by real_constant or integer_constant instances. |
|
Ben responds: The relation instantiator (with simplification on at least) will promote real constants that are identifiably integer back to integers as int power functions can be rather cheaper. |
|
Earlier response from Ben, too: please confirm (or deny) that the same error occurs if relations simplification is enabled/disabled via g_simplify_relations. Also please use the display relations functionality to show the instantiated relation tokens and see if the error is in the instantiation (which should appear in the tokens) or in the equation solution process (which should not). If err in the solution process, solving with matrix partitioning turned off (using matrix 2x2 newton rather than inversion) should get to the right solutions. This will narrow down where the problem is quickly. |
|
Hi Ben Confirm that bug is caused by the "g_simplify_relations" being set to 1. Will try next to use the 'display relations functionality'. Any thoughts at this stage? Cheers JP |
|
Using 'WriteRelationString' (via the PyGTK GUI) I was able to determine that the problem arises from the instantiation process. |
|
Reminder sent to: ben Hi Ben Wonder if you might be able to pass your eyes over compiler/relation.c around line 1600... I think the problem of this bug might be in that vicinity, and also, it says "still need to code C^R case". Cheers JP |
|
Fixed by Ben in changeset 3849. Thanks Ben! |
Date Modified | Username | Field | Change |
---|---|---|---|
2011-06-21 15:51 | vikram | New Issue | |
2011-06-21 15:51 | vikram | File Added: test_bug.a4l | |
2011-06-21 16:10 | john | Note Added: 0000745 | |
2011-06-21 16:12 | john | Note Added: 0000746 | |
2011-06-21 16:28 | john | Assigned To | => john |
2011-06-21 16:28 | john | Status | new => confirmed |
2011-06-21 17:40 | john | Note Added: 0000747 | |
2011-06-23 10:48 | john | Priority | normal => high |
2011-06-23 10:48 | john | Product Version | => 0.9.7 |
2011-06-23 10:48 | john | Target Version | => 0.9.8 |
2011-06-23 12:08 | john | Note Added: 0000750 | |
2011-06-23 12:08 | john | Note Added: 0000751 | |
2011-10-09 21:07 | svn | ||
2011-10-09 21:17 | svn | ||
2011-10-09 21:19 | john | Note Added: 0000774 | |
2011-10-09 22:12 | john | Note Added: 0000775 | |
2011-11-07 22:32 | john | Note Added: 0000779 | |
2011-11-11 11:22 | john | Note Added: 0000780 | |
2011-11-11 11:22 | john | Assigned To | john => ben |
2011-11-11 11:22 | john | Status | confirmed => assigned |
2011-11-11 11:23 | john | Status | assigned => resolved |
2011-11-11 11:23 | john | Fixed in Version | => 0.9.8 |
2011-11-11 11:23 | john | Resolution | open => fixed |