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N$G$O$J$$$+$H9M$($^$7$?!#=1B(B=


On 2010/02/08, at 23:51, Kenta Murata wrote:

> =1B$B$`$i$?$G$9!#=1B(B
>=20
> On 2010/02/08, at 19:36, TOYOFUKU Chikanobu wrote:
>=20
>> =1B$BK-J!$G$9!#=1B(B
>>=20
>>> Mathematica =1B$B$G$O<!$N$h$&$K$J$j$^$9!#=1B(B
>>> In[1]:=3D N[Sin[N[100000000, 1]], 100]
>>> Out[1]=3D 0.
>>=20
>> =1B$B$3$l$O$I$&$$$&7W;;7k2L$K$h$k=1B(B 0. =1B$B$G$7$g$&$+!#=1B(B
>> =1B$B7W;;$G$-$J$$$H$$$&0UL#$N=1B(B 0.=1B$B!)=1B(B
>=20
> =1B$B$=3D$&$G$O$J$/!"M-8z7e?t=1B(B1=1B$B$G7W;;$9$k$H=1B(B 0. =
=1B$B$K$J$k$H$$$&!"=1B(B
> =1B$B$=3D$N$^$^$N0UL#$@$H;W$$$^$9!#=1B(B
> =1B$B$=3D$b$=3D$b=1B(B Sin =1B$B$N30B&$N=1B(B N =1B$B$OITMW$G$7$?=1B(B
>=20
> In[15]:=3D Sin[N[100000000, 1]]
> Out[15]=3D 0.
>=20
> Sin =1B$B$N%"%k%4%j%:%`$K$h$C$F$O$3$&$J$i$J$$$h$&$K=1B(B
> =1B$B$G$-$k$N$+$b$7$l$^$;$s!#=1B(B
>=20
>> Sin =1B$B$G$J$/=1B(B Exp =1B$B$@$H$I$&$$$&7k2L$rJV$9$N$G$7$g$&!#=1B(B
>=20
> In[17]:=3D Exp[N[100000000, 1]]
> Out[17]=3D 0.*10^43429455
>=20
>>> In[2]:=3D Mod[N[100000000, 1], 3]
>>> Out[2]=3D 0.*10^7
>>=20
>> =1B$B$3$&$$$&=1B(B mod =1B$B$OI,MW$@$H;W$$$^$9$7$3$l$r=1B(B divMod =
=1B$B$NM>$j$H$9$k$N$b=1B(B
>> =1B$B$"$j$=3D$&$K;W$$$^$9$,$3$l$r=1B(B % =
=1B$B$K$7$?J}$,$h$$$G$7$g$&$+!#$=3D$l$H$b=1B(B
>> =1B$B$7$J$$J}$,$h$$$G$7$g$&$+!#=1B(B
>=20
> % =1B$B1i;;;R$KBP1~$5$;$k$+$I$&$+$K$D$$$F$O!"$H$F$bG:$_$I$3$m$G$9$M!#=1B=
(B
> =1B$B0l4S$7$F=1B(B % =1B$B$O=1B(B mod =
=1B$B$NJLL>$H$7$F$7$^$&$N$b%"%j$@$H;W$$$^$9!#=1B(B
> =1B$B$=3D$&$7$J$$$HDj$a$k;v$b4V0c$$$G$O$J$$$H;W$$$^$9$,!"=1B(B
> =1B$B$=3D$N>l9g$I$N$h$&$J1i;;$K$J$k$+2~$a$FDj5A$,I,MW$G$9$M!#=1B(B

--
Kenta Murata
OpenPGP FP =3D FA26 35D7 4F98 3498 0810 E0D5 F213 966F E9EB 0BCC

=1B$BK\$r=3Dq$-$^$7$?=1B(B!!
=1B$B!X=1B(BRuby =1B$B5U0z$-%l%7%T!Y=1B(B =
http://www.amazon.co.jp/dp/4798119881/mrkn-22

E-mail: mrkn / mrkn.jp
twitter: http://twitter.com/mrkn/
blog: http://d.hatena.ne.jp/mrkn/