ruby_strtodの精度


#1

e$B$3$s$K$A$O!"$J$+$`$ie(B(e$B$&e(B)e$B$G$9!#e(B

e$B5W$7?6$j$Ke(B1.8e$B$Ge(Btest-alle$B$7$F$_$?$i4v$D$+$N%F%9%H$Ge(BFailuree$B$,A}e(B
e$B$($F$$$k$3$H$K5$IU$-$^$7$?!#e(B

e$B6qBNE*$K$Oe(BYAMLe$B$N%F%9%H$J$N$G$9$,!"D4$Y$F$_$k$H!"IbF0>.?tE@?te(B
e$B%j%F%i%k$He(BYAMLe$B$NIbF0>.?tE@?t$Ne(Bloade$B$H$GFbItCM$,HyL/$K0[$J$kCMe(B
e$B$K$J$C$F$$$^$7$?!#e(B

e$BIbF0>.?tE@?t$re(Bassert_equale$B$G8+$h$&$H$9$k$3$H$N@'Hs$O$5$F$*$-e(B

e$B$D$^$j:G6ae(Bruby_strtod()e$B$,JQ$o$C$F!e(BYAML(e$B$H$$$&$+e(Bsyck)e$B$O%7%9%Fe(B
e$B%`$Ne(Bstrtod()e$B$r;H$C$F$$$?$+$i:9$,H/@8$7$?$N$G$9$,!$=$&$$$&$be(B
e$B$N$H$$$&$3$H$G$$$$$N$G$7$g$&$+!#e(B
YAMLe$BB&$re(Brubye$BK\BNB&$K9g$o$;$k$N$O4JC1e(B(ext/syck/rubyext.ce$B$He(B
ext/syck/bytecode.ce$B$Ge(Butil.he$B$re(Bincludee$B$9$l$P$$$$e(B)e$B$J$N$G$9$,!"$Ie(B
e$B$&$be(Bruby_strtod()e$B$,=>Mh$h$j@:EY$,Mn$A$F$$$k$N$G$O$J$$$+$H$$$&e(B
e$B5$$,$7$F!"$A$g$C$H5$$K$J$C$F$$$^$9!#e(B

e$B$*$^$1e(B
e$B:#8=:_$Ne(B1.9e$B$He(B1.8e$B$H$NHf3Se(B

C:>ruby18 -ve puts %0.20f % 0.288
ruby 1.8.4 (2006-05-16) [i386-mswin32]
0.28800000000000003000

C:>ruby -ve puts %0.20f % 0.288
ruby 1.9.0 (2006-05-15) [i386-mswin32]
0.28799999999999998000

e$B$=$l$G$O!#e(B


#2

e$B$3$s$K$A$O!"$J$+$`$ie(B(e$B$&e(B)e$B$G$9!#e(B

In message [ruby-dev:28645] Re: ruby_strtode$B$N@:EYe(B
on May.16,2006 19:15:52, removed_email_address@domain.invalid wrote:
| > e$B:#8=:$Ne(B1.9e$B$He(B1.8e$B$H$NHf3Se(B
| >
| > C:>ruby18 -ve puts %0.20f % 0.288
| > ruby 1.8.4 (2006-05-16) [i386-mswin32]
| > 0.28800000000000003000
| >
| > C:>ruby -ve puts %0.20f % 0.288
| > ruby 1.9.0 (2006-05-15) [i386-mswin32]
| > 0.28799999999999998000
| >
|
| 0.288 e$B$+$i$N$:$l$,e(B +0.00003000 e$B$@$C$?$N$,e(B -0.00002000 e$B$K$J$C$Fe(B
| e$B$$$k$N$G6a$/$J$C$F$$$k$J$N$G$O$J$$$G$7$g$&$+e(B.
| # e$B$
$?$a$O$H$b$+$/$G$9$1$l$Ie(B.

e$B:#$Oe(B1.8e$B$NJ}$,e(B1.9e$B$h$j$be(Bruby_strtod()e$B$K4X$7$F$@$1$O3+H/$,@h9T$7e(B
e$B$F$k$O$:$J$N$G!"5U$KI>2A$7$F$/$@$5$$$^$7!#e(B

e$B$=$l$G$O!#e(B


#3

e$B$3$s$K$A$oe(B.
e$B;32J$G$9e(B.

From: U.Nakamura removed_email_address@domain.invalid
Subject: [ruby-dev:28644] ruby_strtode$B$N@:EYe(B

e$B$3$s$K$A$O!"$J$+$`$ie(B(e$B$&e(B)e$B$G$9!#e(B

e$BN,e(B

0.288 e$B$+$i$N$:$l$,e(B +0.00003000 e$B$@$C$?$N$,e(B -0.00002000
e$B$K$J$C$Fe(B
e$B$$$k$N$G6a$/$J$C$F$$$k$J$N$G$O$J$$$G$7$g$&$+e(B.

e$B$_$?$a$O$H$b$+$/$G$9$1$l$Ie(B.

e$B$G$o!A"ve(B


#4

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

In message Re: [ruby-dev:28644] ruby_strtode$B$N@:EYe(B
on Tue, 16 May 2006 18:41:38 +0900, U.Nakamura
removed_email_address@domain.invalid writes:

|e$B6qBNE*$K$Oe(BYAMLe$B$N%F%9%H$J$N$G$9$,!"D4$Y$F$_$k$H!"IbF0>.?tE@?te(B
|e$B%j%F%i%k$He(BYAMLe$B$NIbF0>.?tE@?t$Ne(Bloade$B$H$GFbItCM$,HyL/$K0[$J$kCMe(B
|e$B$K$J$C$F$$$^$7$?!#e(B
|# e$BIbF0>.?tE@?t$re(Bassert_equale$B$G8+$h$&$H$9$k$3$H$N@'Hs$O$5$F$*$-e(B
|
|e$B$D$^$j:G6ae(Bruby_strtod()e$B$,JQ$o$C$F!e(BYAML(e$B$H$$$&$+e(Bsyck)e$B$O%7%9%Fe(B
|e$B%`$Ne(Bstrtod()e$B$r;H$C$F$$$?$+$i:9$,H/@8$7$?$N$G$9$,!$=$&$$$&$be(B
|e$B$N$H$$$&$3$H$G$$$$$N$G$7$g$&$+!#e(B

e$B$=$&$$$&$b$N$G$O$J$$$+$H;W$$$^$9!#e(Blocalee$B$N$3$H$J$I9M$($k$H%7e(B
e$B%9%F%`<BAu$O;H$($^$;$s$7!"8m:9$,H/@8$9$k$N$O;_$a$i$l$^$;$s$7!#e(B
Floate$B$re(Bequale$B$GHf3S$7$F$O$$$1$J$$$H!#e(B

|YAMLe$BB&$re(Brubye$BK\BNB&$K9g$o$;$k$N$O4JC1e(B(ext/syck/rubyext.ce$B$He(B
|ext/syck/bytecode.ce$B$Ge(Butil.he$B$re(Bincludee$B$9$l$P$$$$e(B)e$B$J$N$G$9$,!"$Ie(B
|e$B$&$be(Bruby_strtod()e$B$,=>Mh$h$j@:EY$,Mn$A$F$$$k$N$G$O$J$$$+$H$$$&e(B
|e$B5$$,$7$F!"$A$g$C$H5$$K$J$C$F$$$^$9!#e(B

Sycke$BB&$Ge(BRubye$B$Ne(Bstrtod()e$B$r;H$&$h$&$KBP=h$7$F$$$?$@$-$?$$$G$9e(B(e$B$Ce(B
e$B$Fe(B_whye$B$KEA$($J$$$H$Je(B)e$B!#$,!8=:_$Ne(Bstrtod()e$B$N@:EY$r8~>e$5$;$ke(B
e$BEXNO$OB3$1$^$9!#$C$F!?tCM7W;;$NOC$J$N$K$J$s$G;d$O;n9T:x8m$Je(B
e$B$s$F$7$F$k$s$@$m$&!)e(B


#5

e$B$3$s$K$A$oe(B.
e$B;32J$G$9e(B.

From: U.Nakamura removed_email_address@domain.invalid
Subject: [ruby-dev:28646] Re: ruby_strtode$B$N@:EYe(B

e$B:#$Oe(B1.8e$B$NJ}$,e(B1.9e$B$h$j$be(Bruby_strtod()e$B$K4X$7$F$@$1$O3+H/$,@h9T$7e(B
e$B$F$k$O$:$J$N$G!"5U$KI>2A$7$F$/$@$5$$$^$7!#e(B

e$B$"$ie(B. e$B$*L\1x$7<:Ni$7$^$7$?e(B^^;

e$B$G$o!A"ve(B