Subject: bug#14879: closed (Re: bug#14879: fixnum-width, greatest-fixnum and least-fixnum disagree)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 16 Jul 2013 21:43:02 +0000

Your bug report

#14879: fixnum-width, greatest-fixnum and least-fixnum disagree

which was filed against the guile package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
14879: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14879
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#14879: fixnum-width, greatest-fixnum and least-fixnum disagree
From: Mark H Weaver <[email-masked]>
To: Göran Weinholt <[email-masked]>
Cc: [email-masked]
Date: Tue, 16 Jul 2013 17:41:41 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

Göran Weinholt <[email-masked]> writes:

> scheme@(guile-user)> (import (rnrs))
> scheme@(guile-user)> (fixnum-width)
> $1 = 61
> scheme@(guile-user)> (greatest-fixnum)
> $2 = 2305843009213693951
> scheme@(guile-user)> (least-fixnum)
> $3 = -2305843009213693952
>
> If the reported fixnum width is correct, then these should be the least
> and greatest fixnums:
>
>   (- (expt 2 (- (fixnum-width) 1)))   => -1152921504606846976
>   (- (expt 2 (- (fixnum-width) 1)) 1) => 1152921504606846975
>
> If the reported least and greatest fixnums are correct, then the fixnum
> width is actually 62.

That's correct.  Fixed in 06903786211afd9a554b8f009a37111f729607ee.

    Thanks!
      Mark

Subject: fixnum-width, greatest-fixnum and least-fixnum disagree
From: Göran Weinholt <[email-masked]>
To: [email-masked]
Date: Tue, 16 Jul 2013 16:02:55 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello schemers,

scheme@(guile-user)> (import (rnrs))
scheme@(guile-user)> (fixnum-width)
$1 = 61
scheme@(guile-user)> (greatest-fixnum)
$2 = 2305843009213693951
scheme@(guile-user)> (least-fixnum)
$3 = -2305843009213693952

If the reported fixnum width is correct, then these should be the least
and greatest fixnums:

  (- (expt 2 (- (fixnum-width) 1)))   => -1152921504606846976
  (- (expt 2 (- (fixnum-width) 1)) 1) => 1152921504606846975

If the reported least and greatest fixnums are correct, then the fixnum
width is actually 62.

Tested with 2.0.9.33-3bbca-dirty on an amd64 system.

Regards,

-- 
Göran Weinholt <[email-masked]>
20             JUSTICE KENNEDY:  That seems odd.  I mean,
21 Microsoft doesn't say please buy our disk because it's
22 the prettiest disk in the business.