Make pandas C parser xstrtod match float/np.float64 internal routine (original) (raw)

read_csv() converts the string '0.011277' into a np.float64 whose repr() is:
'0.011276999999999999' .
However, repr(np.float64('0.011277')) returns:
'0.011277000000000001'
Also, in Pandas v.0.9.0, read_csv() produced '0.011276999999999999', while in Pandas v.10.0 read_csv() produces '0.011277000000000001'.

This problem showed up when I truncated the number (with 1e-6 precision).

System setting:
Pandas v. 10.0,
Numpy v.1.7.0b2
Windows 7