Project

General

Profile

Bug #5228

Integer#round fails on some big negative numbers

Added by marcandre (Marc-Andre Lafortune) almost 9 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Normal
Target version:
ruby -v:
trunk
Backport:
[ruby-core:39096]

Description

Integer#round fails for some big negative numbers:

(+25 * 10*70).round(-71) # => 30...00
(-25 * 10
*70).round(-71) # => -20...00, should be -30...00

Also available in: Atom PDF