#1210 Fix some subtle real time conversion issues

Other (492)
Cary R.

I found this with valgrind in the scanf code changes. The issue is that values like 0.1, 0.01, etc cannot be represented exactly and if the double math does not have extra bits there can be calculation issues. If you divide by 10.0, 100.0, etc., which can be represented correctly, you do get the correct result. There may be an issue in the valgrind double code, but conceptually using a more accurate value is better. We use this scheme all the time when converting a time to a scaled real time. These patches fix the vpi and vvp code to use / instead of * when the scaling would produce a value less then 1.0.

There are patches for development and V0.9. There are no test suite changes other than the new scanf4.v test works correctly with valgrind.


  • Stephen Williams

    Applied to git master.

  • Stephen Williams

    • milestone: 530241 --> v0.9-branch
    • status: open --> open-accepted
  • Stephen Williams

    • status: open-accepted --> closed-accepted
  • Stephen Williams

    Applied to git v0_9-branch.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks