From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Israelsson Tampe Newsgroups: gmane.lisp.guile.devel Subject: errata: size of fixnums Date: Thu, 2 Sep 2010 17:58:42 +0200 Message-ID: <201009021758.42644.stefan.tampe@spray.se> References: <201009020022.35768.stefan.tampe@spray.se> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1283443372 28417 80.91.229.12 (2 Sep 2010 16:02:52 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 2 Sep 2010 16:02:52 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Sep 02 18:02:51 2010 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OrCFR-0007Go-Uk for guile-devel@m.gmane.org; Thu, 02 Sep 2010 18:02:51 +0200 Original-Received: from localhost ([127.0.0.1]:49726 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OrCDo-0006wN-Uh for guile-devel@m.gmane.org; Thu, 02 Sep 2010 12:01:05 -0400 Original-Received: from [140.186.70.92] (port=44119 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OrCBg-0006Ci-Li for guile-devel@gnu.org; Thu, 02 Sep 2010 11:58:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OrCBZ-0005YJ-Qn for guile-devel@gnu.org; Thu, 02 Sep 2010 11:58:46 -0400 Original-Received: from spsmtp02oc.mail2world.com ([74.202.142.198]:4078) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OrCBZ-0005YB-M1 for guile-devel@gnu.org; Thu, 02 Sep 2010 11:58:45 -0400 Original-Received: from mail pickup service by spsmtp02oc.mail2world.com with Microsoft SMTPSVC; Thu, 2 Sep 2010 08:58:43 -0700 auth-sender: stefan.tampe@spray.se Original-Received: from 82.182.254.46 unverified ([82.182.254.46]) by spsmtp02oc.mail2world.com with Mail2World SMTP Server; Thu, 02 Sep 2010 08:58:42 -0700 User-Agent: KMail/1.13.5 (Linux/2.6.34-12-desktop; KDE/4.4.4; x86_64; ; ) In-Reply-To: <201009020022.35768.stefan.tampe@spray.se> X-OriginalArrivalTime: 02 Sep 2010 15:58:43.0394 (UTC) FILETIME=[B7D65A20:01CB4AB7] X-detected-operating-system: by eggs.gnu.org: Windows 2000 SP4, XP SP1+ X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:10836 Archived-At: Hrm, the coffee must have been strong last night, I spotted the bug, It's not inside guile. Cheers Stefan On Thursday, September 02, 2010 12:22:35 am you wrote: > Hi, > > I noticed that sending a fixnum 6bytes long to guile returned a > truncated fixnum of 4 of 4 bytes. I guess that this would not break > the numeriks but it looks like we are wasting space here and/or clock > cycles. > > The suspicius part is line 66 in numbers.h > > #define SCM_MOST_POSITIVE_FIXNUM ((SCM_T_SIGNED_BITS_MAX-3)/4) > > which means that trunkation will be at 4bytes on a 64bit system. > I changed 4 to 2 (mayby unsafe in corner cases) and the truncation > disapeared. > > So Bugg Feature? > > Regards > Stefan