If INT_MAX < LONG_MAX

e$B86$G$9!#e(B

rational.c e$B$,e(B x86_64
e$B$G%F%9%H$,DL$i$J$$$H$$$&Js9p$r$b$i$$$^$7$?!#e(B

64bit e$B%^%7%s$r;}$C$F$$$J$$$N$G!"$b$7$+$7$Fe(B vmware e$B$Ge(B 32bit
e$B%^%7e(B
e$B%s>e$Ge(B 64bit
e$B%^%7%s$N%(%%e%l!<%H$,$G$-$J$$$+$H4|BT$7$?$s$G$9$,!“e(B
[email protected]$a$G$7$?!#5U$O$”$k$
[email protected]$1$I!#$"$?$j$^$($+!#e(B

e$B$7$+$?$J$$$N$Ge(B numeric.c e$B$rD/$a$F$$$k$s$G$9$,!"e(B
check_int e$B$NDj5A$NCf$Ge(B INT_MAX, INT_MIN
e$B$H$$$&$N$r8+$D$1$^$7$?!#e(B
e$B$3$l$C$Fe(B LONG_MAX, LONG_MIN e$B$G$J$/$F$$$$$N$G$7$g$&$+!)e(B

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

In message “Re: [ruby-dev:29632] if INT_MAX < LONG_MAX”
on Wed, 4 Oct 2006 13:34:45 +0900, Shin-ichiro HARA
[email protected] writes:

|e$B$7$+$?$J$$$N$Ge(B numeric.c e$B$rD/$a$F$$$k$s$G$9$,!"e(B
|check_int e$B$NDj5A$NCf$Ge(B INT_MAX, INT_MIN e$B$H$$$&$N$r8+$D$1$^$7$?!#e(B
|e$B$3$l$C$Fe(B LONG_MAX, LONG_MIN e$B$G$J$/$F$$$$$N$G$7$g$&$+!)e(B

check_int()e$B$Oe(Blong
valuee$B$,e(Binte$B$NHO0OFb$+%A%’%C%/$9$k4X?t$G$9$+e(B
e$B$i!"$3$3$Oe(BINT_MAXe$B$G9g$C$F$^$9!#e(B

e$B86$G$9!#e(B

check_int()e$B$Oe(Blong valuee$B$,e(Binte$B$NHO0OFb$+%A%’%C%/$9$k4X?t$G$9$+e(B
e$B$i!"$3$3$Oe(BINT_MAXe$B$G9g$C$F$^$9!#e(B

e$B$=$&$G$7$?$+!#$3$l$G;d$,8m2r$7$F$?$3$H$K5$$,$D$-$^$7$?!#e(B

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs