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.
Development p[atch
V0.9 patch file
Applied to git master.
Applied to git v0_9-branch.