Skip to content

floating point parsing issue #16610

@brendene

Description

@brendene

H2O version, Operating System and Environment
H2O_cluster_version: 3.46.0.6
Running single node cluster on linux using Python 3.11

Actual behavior
Parsing small floating point numbers can yield NA or INF in the resulting H2OFrame

Expected behavior
The double precision floating point numbers should be preserved.

Steps to reproduce
Here is python code to reproduce. This also happens when loading data from parquet files.

badFloat1 = float.fromhex('0x1.1c6bbbd5ccfaep-362')
badFloat2 = float.fromhex('0x1.0995342e882f9p-372')
print(badFloat1, badFloat2) # 1.1826684498151677e-109 1.0784540306167682e-112
h2o.H2OFrame({'badFloat': [badFloat1]}) # works
h2o.H2OFrame({'badFloat': [badFloat2]}) # works
h2o.H2OFrame({'badFloat': [badFloat1, badFloat1]}) # works
h2o.H2OFrame({'badFloat': [badFloat2, badFloat2]}) # works
h2o.H2OFrame({'badFloat': [badFloat1, badFloat2]}) # broken, 2nd value is nan

Is there a way to fix this or a workaround I can use when creating the H2OFrame to avoid this?

Thank you

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions