Skip to content

Output full numeric precision for floating point numbers #2929

@traversc

Description

@traversc

This is a question/feature request, as I don't think it exists as an option.

Example:

x <- -75.1637420654296875
fwrite(data.table(a = x), file="/tmp/x.txt")
xi <- fread("/tmp/x.txt")$a

identical(x, xi)
 # FALSE
x-xi
# 1.421085e-14

x is an exact floating point value (that is, fully representable by IEEE standards) according to: https://www.h-schmidt.net/FloatConverter/IEEE754.html

I would like to write and read that value to its full precision.

Thank you

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions