guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

errata: size of fixnums


From: Stefan Israelsson Tampe
Subject: errata: size of fixnums
Date: Thu, 2 Sep 2010 17:58:42 +0200
User-agent: KMail/1.13.5 (Linux/2.6.34-12-desktop; KDE/4.4.4; x86_64; ; )

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]