From: Shouichi KAMIYA Date: 2011-01-24T07:00:00+09:00 Subject: [ruby-core:34809] [Ruby 1.9-Bug#4308][Open] Wrong Bignum calculation in some case. --mimepart_4d3ca4bfcdf57_1dc2b37804214912 Content-Type: text/plain Content-Transfer-Encoding: Quoted-printable Content-Disposition: inline Bug #4308: Wrong Bignum calculation in some case. http://redmine.ruby-lang.org/issues/show/4308 Author: Shouichi KAMIYA Status: Open, Priority: Normal ruby -v: ruby 1.9.2p136 (2010-12-25 revision 30365) [x86_64-darwin10.5.0]= I tried to calculate variance of an array but calculation returns wrong r= esult when numbers are big.The problem also happens in 1.8.7-p330. I attached a file that recreates The problem. ---------------------------------------- http://redmine.ruby-lang.org --mimepart_4d3ca4bfcdf57_1dc2b37804214912 Content-Type: application/x-ruby; name=wrong_bignum_calc.rb Content-Transfer-Encoding: Base64 Content-Disposition: attachment; filename=wrong_bignum_calc.rb IyEvdXNyL2Jpbi9lbnYgcnVieQoKY2xhc3MgQXJyYXkKICBkZWYgc3VtCiAg ICByZWR1Y2UoMCkgeyB8cywgaXwgcyArPSBpIH0KICBlbmQKCiAgZGVmIGF2 ZwogICAgZW1wdHk/ID8gMC4wIDogc3VtLnRvX2YgLyBzaXplCiAgZW5kCgog IGRlZiB2YXIKICAgIGVtcHR5PyA/IDAuMCA6IG1hcCB7IHx4fCB4ICoqIDIg fS5hdmcgLSBhdmcgKiogMgogIGVuZAplbmQKCiMgQWxsIG9mIHRoZXNlIHNo b3VsZCBjbGVhcmx5IHJldHVybiAwLgoKcCBbMTI5NTIxODg2NSwgMTI5NTIx ODg2NSwgMTI5NTIxODg2NSwgMTI5NTIxODg2NSwgMTI5NTIxODg2NV0udmFy CiM9PiAwLjAKCnAgWzEyOTUyMTg4NjUsIDEyOTUyMTg4NjUsIDEyOTUyMTg4 NjUsIDEyOTUyMTg4NjUsIDEyOTUyMTg4NjUsIDEyOTUyMTg4NjVdLnZhcgoj PT4gMjU2LjAKCnAgWzEyOTUyMTg4NjUsIDEyOTUyMTg4NjUsIDEyOTUyMTg4 NjUsIDEyOTUyMTg4NjUsIDEyOTUyMTg4NjUsIDEyOTUyMTg4NjUsIDEyOTUy MTg4NjVdLnZhcgojPT4gMC4wCg== --mimepart_4d3ca4bfcdf57_1dc2b37804214912--