Rewrite UnityPrintFloat to match printf("%.6g").
The existing implementation was not very good: - It printed all very small values as "0.000000..." - It did not distinguish positive and negative zero - In some cases it printed extra garbage digits for single-precision values (e.g. 3.9e+30 was printed as 3.90000013+30) Tests have been updated to check that we now match printf("%.6g") for 1,000,000 randomly chosen values, except for rounding of the 6th digit.
Showing
想要评论请 注册 或 登录