Open galipremsagar opened 3 years ago
This 9 digits of precision (actually 10 significant digits) is hardcoded in the float-to-string conversion cudf::strings::from_floats()
used by cuio's CSV writer.
This issue has been marked rotten due to no recent activity in the past 90d. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed.
Describe the bug While writing a
float64
orfloat32
column to csv cudf is truncating or just writing upto precision9
for bothfloat64
andfloat32
. This is leading to data truncation incase offloat64
and incorrect data representation incase offloat32
.Steps/Code to reproduce bug For
float64
:For
float32
:Expected behavior Ideally we should be matching pandas behavior here as the resolutions of
float32
andfloat64
are1e-06
and1e-15
respectively:This difference in precision could lead to inequality while comparing data, for example:
cudf.txt pandas.txt
Diff of these two files: https://www.diffchecker.com/qaAbEXt7
Environment overview (please complete the following information)
0.16
)Environment details Please run and paste the output of the
cudf/print_env.sh
script here, to gather any other relevant environment detailsClick here to see environment details
Additional context Surfaced while running fuzz tests #6001