From: Alex Shulgin Date: 2007-10-14T18:15:07+09:00 Subject: Re: Bug: Numeric#divmod calculates wrongly On Oct 14, 10:18 am, "Dirk Traulsen" wrote: > > Could somebody please confirm these findings? Especially with other > System and Ruby version combinations this would be really helpful to > nail down this massive bug. A computer should really calculate > correctly... It's correct on my system: Debian lenny (testing) Linux 2.6.21-2-686 #1 SMP Wed Jul 11 03:53:02 UTC 2007 i686 GNU/Linux =================================================== ruby 1.8.6 (2007-06-07) [i486-linux] x=[0.58, 0.59, 0.63, 0.66, 0.67] y=1/12.0 x/y --- 6.96 7.08 7.56 7.92 8.04 x.divmod(y) ----------- [6, 0.08] [7, 0.00666666666666667] [7, 0.0466666666666667] [7, 0.0766666666666667] [8, 0.00333333333333341] =================================================== -- Cheers, Alex