Project

General

Profile

Bug #17183

Float round working weirdly

Added by agustincornu (Agustin Cornu) 29 days ago. Updated 28 days 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
#1

Updated by agustincornu (Agustin Cornu) 29 days ago

  • ruby -v set to 2.7

Updated by agustincornu (Agustin Cornu) 29 days ago

This is a known issue and not a bug. My bad. I cannot delete the ticket

#3

Updated by marcandre (Marc-Andre Lafortune) 29 days ago

  • Is duplicate of Bug #14635: Float#round(n) returns a wrong result when n is big added
#4

Updated by marcandre (Marc-Andre Lafortune) 29 days ago

  • Is duplicate of deleted (Bug #14635: Float#round(n) returns a wrong result when n is big)
#5

Updated by marcandre (Marc-Andre Lafortune) 29 days ago

  • Related to Bug #14635: Float#round(n) returns a wrong result when n is big added

Updated by marcandre (Marc-Andre Lafortune) 29 days ago

I think that's a bug. Looks different but maybe related to #14365.

Updated by shyouhei (Shyouhei Urabe) 28 days ago

Agreed to marcandre (Marc-Andre Lafortune) . This sounds like a real bug.

Also available in: Atom PDF