Project

General

Profile

Actions

Bug #17183

open

Float round working weirdly

Added by agustincornu (Agustin Cornu) 10 months ago. Updated 10 months ago.

Status:
Open
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 bigFeedbackActions
Actions

Also available in: Atom PDF