[ruby-core:65323] [ruby-trunk - Bug #10306] BigNum error

From: sawadatsuyoshi@...
Date: 2014-09-29 18:45:20 UTC
List: ruby-core #65323
Issue #10306 has been updated by Tsuyoshi Sawada.


Cannot be reproduced on ruby 2.1.3p242 (2014-09-19 revision 47630) [x86_64-linux]. I get the correct result:

    (1000000000 ** 99).to_s.count("0")
    # => 891
    1000000000.to_s.count("0") * 99
    # => 891

----------------------------------------
Bug #10306: BigNum error
https://bugs.ruby-lang.org/issues/10306#change-49140

* Author: Max Bacoux
* Status: Open
* Priority: Normal
* Assignee: 
* Category: core
* Target version: 
* ruby -v: ruby 2.1.3p242 (2014-09-19 revision 47630) [x86_64-darwin13.0]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
Some calculations are wrong when dealing with large bignums.

For example, try 1000000000 ** 99, the result is obviously not right.



-- 
https://bugs.ruby-lang.org/

In This Thread

Prev Next