[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gcl-devel] Re: GCL Bug info
From: |
Camm Maguire |
Subject: |
[Gcl-devel] Re: GCL Bug info |
Date: |
18 Dec 2002 23:15:13 -0500 |
Greetings, and thanks for your report!
I've verified your bug in current cvs. I've just committed a fix.
Please check it out if you can. This is serious enough that it may
warrant a backport to 2.4.5.
What are the thoughts on the list regarding this?
"Jim O'Dell" <address@hidden> writes:
> Camm:
>
> I saw a post by you and thought I'd send you this report of a GCL bug I
> trakced down the other day
> while working on an aljabr port to CCL. Aljabr is a version of Macsyma
> which I am proting to the
> latest version of GCL.
>
> If there is a better place to send this, I trust you'll let me know.
>
To me, or to address@hidden
Thanks again,
> Thanks,
> Jim O'Dell
>
> ================================================
>
> ;;; This file documents a bug in gcl ldp
> ;;; GCL version 2.4.3
> ;;; Updated with GMP version 4.1
> ;;; gcc -v output:
> ;;; Reading specs from
> /usr/dist/bin/../lib/gcc-lib/i686-pc-linux-gnu/3.2/specs
> ;;; Configured with: ./configure --prefix=/usr/dist/lib/gcc-3.2
> ;;; Thread model: posix
> ;;; gcc version 3.2
>
> (defun ldb-test (number)
> (do ((i 1 (+ 1 i)))
> ((> i 67) ())
> (let ((my-int (my-ldb (byte i (- 67 i)) number))
> (int (ldb (byte i (- 67 i)) number)))
> (format t "~&I: ~A, Type: ~A, My-int: ~A, ~B, Int: ~A, ~B"
> i (type-of int) my-int my-int int int))))
>
> ;;; ldb in gcl is defined as
> ;;; (logandc2 (ash integer (- (byte-position bytespec)))
> ;;; (- (ash 1 (byte-size bytespec))))
> ;;; Which should be the same as my-ldb
> ;;; I guess that logandc2 has a bug in its implementation
> (defun my-ldb (bytespec integer)
> (logand (ash integer (- (byte-position bytespec)))
> (lognot (- (ash 1 (byte-size bytespec))))))`
>
> ;;; Here is the test case. Everything works fine until one
> ;;; gets to a bignum case and then the standard ldb gets
> ;;; the wrong answer. I presume that the bug is somewhere
> ;;; in the gmp package but I did not pursue it.
> (test (expt 2 56))
>
>
>
>
--
Camm Maguire address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens." -- Baha'u'llah
- [Gcl-devel] Re: GCL Bug info,
Camm Maguire <=