Simulator, 0.02 time delays and weird age of tokens

Bug #331007 reported by Jiri Srba
2
Affects Status Importance Assigned to Milestone
TAPAAL
Fix Released
High
Kenneth Yrke Jørgensen

Bug Description

Consider the example net attached and in the simulator do the following:

0.5
T0
T1
0.02
T0
0.001
T1

and now check the age of tokens in place P0, it is 0.520999997

Probably some rounding error but this should not really happen after the time delays
that do not even reach the precision of the reals ...

Revision history for this message
Jiri Srba (srba) wrote :
Revision history for this message
Jiri Srba (srba) wrote :

This should be fixed.

Changed in tapn:
importance: Undecided → High
milestone: none → version1
Revision history for this message
Kenneth Yrke Jørgensen (yrke) wrote :

The problem is not realy the precision of the float, but the accuracy

   * Precision - how fine a distinction can be made between two close values.
   * Accuracy - how close the value is to the correct value.

We have fixed this problem by using java.text.DecimalFormat

Changed in tapn:
assignee: nobody → yrke
status: New → Fix Committed
Changed in tapn:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.