Project

General

Profile

Actions

Bug #17183

closed

Float round working weirdly

Added by agustincornu (Agustin Cornu) about 4 years ago. Updated over 3 years ago.

Status:
Closed
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 1 (0 open1 closed)

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

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0