0x3fffffffffffffff.succ

LP64 e$B4D6-$Ge(B 0x3fffffffffffffff.succ e$B$,e(B -4611686018427387904
e$B$K$J$j$^$9!#e(B

% ./ruby -ve ‘p 0x3fffffffffffffff.succ’
ruby 1.9.0 (2007-07-12 patchlevel 0) [x86_64-freebsd6.2]
-4611686018427387904

[email protected]$G$9!#e(B

At Thu, 12 Jul 2007 12:38:03 +0900,
Tanaka A. wrote in [ruby-dev:31190]:

LP64 e$B4D6-$Ge(B 0x3fffffffffffffff.succ e$B$,e(B -4611686018427387904
e$B$K$J$j$^$9!#e(B

LP64e$B$O$J$$$N$G3NG’$G$-$J$$$N$G$9$,!"$3$l$G$7$g$&$+!#e(B

Index: insns.def

— insns.def (revision 12741)
+++ insns.def (working copy)
@@ -2305,5 +2305,5 @@ opt_succ
/* fixnum + INT2FIX(1) */
val = (recv + (obj & (~1)));

  •  if ((~(recv ^ obj) & (recv ^ val)) & 0x80000000) {
    
  •  if ((~(recv ^ obj) & (recv ^ val)) & (FIXNUM_MAX + 1)) {
    
    val = rb_big_plus(rb_int2big(FIX2INT(recv)),
    rb_int2big(FIX2INT(obj)));

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

In message “Re: [ruby-dev:31194] Re: 0x3fffffffffffffff.succ”
on Thu, 12 Jul 2007 16:46:07 +0900, Nobuyoshi N.
[email protected] writes:

|At Thu, 12 Jul 2007 12:38:03 +0900,
|Tanaka A. wrote in [ruby-dev:31190]:
|> LP64 e$B4D6-$Ge(B 0x3fffffffffffffff.succ e$B$,e(B -4611686018427387904
|> e$B$K$J$j$^$9!#e(B
|
|LP64e$B$O$J$$$N$G3NG’$G$-$J$$$N$G$9$,!"$3$l$G$7$g$&$+!#e(B

e$B%3%_%C%H$7$F$/[email protected]$5$$!#e(B

In article
[email protected],
Nobuyoshi N. [email protected] writes:

LP64 e$B4D6-$Ge(B 0x3fffffffffffffff.succ e$B$,e(B -4611686018427387904
e$B$K$J$j$^$9!#e(B

LP64e$B$O$J$$$N$G3NG’$G$-$J$$$N$G$9$,!"$3$l$G$7$g$&$+!#e(B

e$B0c$&$h$&$G$9!#e(B

% ./miniruby -ve ‘p 0x3fffffffffffffff.succ’
ruby 1.9.0 (2007-07-12 patchlevel 0) [x86_64-freebsd6.2]
-4611686018427387904