Project

General

Profile

Actions

Bug #17183

closed

Float round working weirdly

Added by agustincornu (Agustin Cornu) over 1 year ago. Updated 6 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:100090]

Description

I encountered this issue when casting a specific float with a especific round argument.

0.5.round(15)
=> 0.5
0.5.round(16)
=> 0.5000000000000001
0.5.round(17)
=> 0.5

Related issues

Related to Ruby master - Bug #14635: Float#round(n) returns a wrong result when n is bigClosedActions
Actions

Also available in: Atom PDF