...
This noncompliant code example attempts to use a regular expression to eliminate the trailing zeros. However, even though this works for 1/1000.0, for 1/10000.0, it produces the string 1.0E-4 because of which the regular expression fails to work as expected. Subsequent comparison operations can still fail.
...