Re: declare 64 bit integers?
- From: Matthias Benkard <mulkiatsch@xxxxxxxxx>
- Date: Thu, 27 Sep 2007 01:57:50 -0700
Hi,
So I know you can declare
fixnums (28-bit),
A FIXNUM is not necessarily 28 bits wide. The size is implementation-
and platform-dependent (at least 16 bits, though).
but is there any way to declare 64-bit integers ... ?
(declare (type (signed-byte 64) x))
(declare (type (unsigned-byte 64) y))
You can specify any integer length you want by using SIGNED-BYTE and
UNSIGNED-BYTE. The implementation is not guaranteed to optimise just
any weird integer type you throw at it, though. (You can't count on
optimisation of 64-bit integers, either. The only thing you can do is
try it out.)
You may also want to look at the INTEGER type, which lets you express
ranges of integers in a more meaningful way:
(declare (type (integer -100 100) z))
~ Matthias
.
- Follow-Ups:
- Re: declare 64 bit integers?
- From: Pascal Costanza
- Re: declare 64 bit integers?
- References:
- declare 64 bit integers?
- From: jrwats
- declare 64 bit integers?
- Prev by Date: Re: Flamebait if I ever saw it
- Next by Date: Re: CL web development resembling GWT
- Previous by thread: declare 64 bit integers?
- Next by thread: Re: declare 64 bit integers?
- Index(es):