Skip to content

deprecate round on Int and Long #3235

Closed
@scabug

Description

@scabug

The problem is that math.round(n) (== java.lang.Math.round(n)) is only defined for Float and Double. If called with Int or Long arguments, they are converted to Float/Double, resulting in an loss of precision.
Example:

math.round(123456789)
res17: Int = 123456792

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions