e$B$1$$$8$e!w$$$7$D$+$G$9e(B.
In [ruby-dev:38735] the message: “[ruby-dev:38735] Re: [Bug #1720]
[NaN] == [NaN] e$B$,e(B true e$B$K$J$ke(B”, on Jul/05 01:31(JST)
Yukihiro
Matsumoto writes:
e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B
(1) NaN == NaN e$B$be(B true e$B$K$9$ke(B
e$B0l4S@-$O$"$k$,e(B NaN e$B$NK\Mh$N5sF0$G$O$J$$e(B
(2) rb_equal()e$B$G$^$:e(Bequal?e$B$G$N%A%’%C%/$r$d$a$ke(B
e$B@-G=$,Nt2=$9$k$N$GHr$1$?$$e(B
(3) rb_equal()e$B$Ge(BT_FLOATe$B$rFCJL07$$e(B
2e$B$[$I$G$O$J$$$K$7$F$b@-G=Nt2=$,5$$K$J$ke(B
e$BFCJL07$$$O8e2y$9$k$3$H$,B?$$e(B
(4) e$B$3$N$^$^!#$3$l$ONc30E*$J%1!<%9$H$9$ke(B
e$B;d<+?H$O!"$I$l$,NI$$$H$$$&0U8+$r8=;~E@$G$O;}$?$J$$$N$G$9$,!"e(B
e$B$I$l$,9%$-$+$H8@$o$l$l$P!"e(B(1)e$B$,9%$-$G$9!#e(B
e$B$o$?$7$be(B, (1)e$B$N$h$&$J5$$,$7$^$9e(B.
e$B$H$$$&$+e(B, (1’)e$B$G$9$+e(B:
(1’)
nan1 = 0.0/0
nan2 = 0.0/0
e$B$H$7$Fe(B,
nan1 == nan1 => true
nan1 == nan2 => false
e$B8=9T$G$Oe(B,
nan1.equal?(nan1)
e$B$J$N$Ke(B,
nan1 == nan1 => false
e$B$H$J$k$N$Oe(B,e$B%%V%8%’%/%H;X8~E$K$+$J$j5$J,$N0-$$;EMM$@$H;W$$$^$9e(B.
nan1
e$B$He(Bnan1e$B$NCM$O$d$O$jF1$8$@$H$7$F$h$$$H;W$$$^$9e(B.
e$B0l4S@-$O$"$k$,e(B NaN e$B$NK\Mh$N5sF0$G$O$J$$e(B
e$B$H$"$j$^$9$,e(B, e$B$=$l$K4X$7$F$Oe(B nan1 == nan2 => false
e$B$K$J$l$PLdBj$J$$$-e(B
e$B$,$7$^$9e(B.
__
---------------------------------------------------->> e$B@PDMe(B
e$B7=<ye(B <<—
---------------------------------->> e-mail: [email protected] <<—