Bugzilla – Full Text Bug Listing

- Home
- | New
- | Browse
- | Search
- | [?]
- | Reports
- | Help
- | New Account
- | Log In
- | Forgot Password

Summary: | pow computes incorect result in complicated expressions | ||
---|---|---|---|

Product: | UPPAAL | Reporter: | Marius Mikučionis <marius> |

Component: | Engine | Assignee: | Marius Mikučionis <marius> |

Status: | ASSIGNED --- | ||

Severity: | normal | CC: | adavid |

Priority: | P5 | ||

Version: | 4.1.19 | ||

Hardware: | PC | ||

OS: | All | ||

Architecture: | |||

Attachments: | queries computing wrong values |

`Created attachment 305 [details] queries computing wrong values The model has two variables always set to zero: int i=0; double d=0.0; Then the following queries: simulate 1 [<=10] { i, pow(0.5*i, 2.0) + 2.0, 2.0 + pow(i*0.5, 2.0), 2.0 + pow(0.5*i, 2.0) } simulate 1 [<=10] { d, pow(0.5*d, 2.0) + 2.0, 2.0 + pow(d*0.5, 2.0), 2.0 + pow(0.5*d, 2.0) } should compute {0, 2, 2, 2} but both compute {0, 2, 0.25, 0.5} There is some strange interaction with variables and pow function. Wrong values are also computed when these expressions are used in the model (where it is even more difficult to find).`