Summary
srfi-4 unit should support s64 and u64 vectors in Chicken 5
Metadata
- Id: 6756a8069c13b09863b34e1835a1e6c79d64a8e8
- Trac id: 1462
- Type: defect
- Reporter: johnwcowan
- Owner:
- Cc:
- Status: closed
- Component: core libraries
- Estimated difficulty: easy
- Resolution: worksforme
- Priority: major
- Milestone: 5.0
- Version: 4.13.0
- Changetime: 2018-05-15 09:31:41 UTC
- Created: 2018-05-14 23:25:03 UTC
- Keywords: srfi-4
Description
SRFI 4 has four sizes of integer vectors, 8-bit, 16-bit, 32-bit, and 64-bit vectors in signed and unsigned flavors. Currently, there is no support for 64-bit vectors anywhere in Chicken 4, even if the numbers egg is loaded. With native bignums, supporting s64vectors and u64vectors is straightforward and should be provided.
Changes and comments
[2018-05-15 09:31:41 UTC] sjamaan changed status from new to closed
[2018-05-15 09:31:41 UTC] sjamaan set resolution to worksforme
[2018-05-15 09:31:41 UTC] sjamaan wrote:
I don't know what you've checked, but it seems to work just fine:
(c) 2008-2017, The CHICKEN Team
(c) 2000-2007, Felix L. Winkelmann
Version 5.0.0 (rev dfc562f1)
linux-unix-gnu-x86-64 [ 64bit dload ptables ]
#;1> (import srfi-4)
; loading /home/peter/chickens/chicken-5/lib/chicken/9/srfi-4.import.so ...
; loading /home/peter/chickens/chicken-5/lib/chicken/9/chicken.import.so ...
; loading /home/peter/chickens/chicken-5/lib/chicken/9/chicken.bitwise.import.so ...
; loading /home/peter/chickens/chicken-5/lib/chicken/9/chicken.fixnum.import.so ...
; loading /home/peter/chickens/chicken-5/lib/chicken/9/chicken.foreign.import.so ...
; loading /home/peter/chickens/chicken-5/lib/chicken/9/chicken.gc.import.so ...
; loading /home/peter/chickens/chicken-5/lib/chicken/9/chicken.platform.import.so ...
; loading /home/peter/chickens/chicken-5/lib/chicken/9/chicken.keyword.import.so ...
; loading library srfi-4 ...
#;2> (u64vector (expt 2 64))
Error: (u64vector-set!) out of range
18446744073709551616
0
18446744073709551616
Call history:
<syntax> (u64vector (expt 2 64))
<syntax> (expt 2 64)
<eval> (u64vector (expt 2 64))
<eval> (expt 2 64) <--
#;2> (u64vector (- (expt 2 64) 1))
#u64(18446744073709551615)
It's even documented,|too]!