Skip to content

[BUG] libcudf.round doesn't fully work on certain values #17664

@galipremsagar

Description

@galipremsagar

Describe the bug
round method seems to be returning the actual value for the following inputs.

Steps/Code to reproduce bug

In [8]: import cudf

In [9]: s = cudf.Series([1.1320000000000001, 1.234234])

In [10]: s._column.round(decimals=3).element_indexing(0)
Out[10]: np.float64(1.1320000000000001)

In [11]: s._column.round(decimals=3).element_indexing(1)
Out[11]: np.float64(1.234)

Expected behavior

In [10]: s._column.round(decimals=3).element_indexing(0)
Out[10]: np.float64(1.132)

Environment overview (please complete the following information)

  • Environment location: [Bare-metal]
  • Method of cuDF install: [from source]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinglibcudfAffects libcudf (C++/CUDA) code.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions