[plt-scheme] Bit manipulation in PLT Scheme

From: Paulo J. Matos (pocmatos at gmail.com)
Date: Wed Mar 15 14:53:58 EST 2006

On 10/03/06, Danny Yoo <dyoo at hkn.eecs.berkeley.edu> wrote:
> > My doubt is, isn't any number represented in MzScheme interpreted as a
> > big num be it either 1, 2 or 324234928340928343123? Or MzScheme is able
> > internally to represent 30000 inside an int since it checks there is no
> > need for a bignum?
> Chapter 12 of "Inside Mzscheme" suggests that the numbers handled by
> fixnums and bignums are disjoint:
> http://download.plt-scheme.org/doc/301/html/insidemz/insidemz-Z-H-12.html#node_chap_12
> It checks and does appear to do a scheme_bignum_normalize() which brings
> bignums back to fixnum status if it can fit.

"MzScheme supports integers of an arbitrary magnitude; when an integer
cannot be represented as a fixnum (i.e., 30 or 62 bits plus a sign

Does this mean that a fixnum length differs from 32 bit to 64 bit architecture?
How can I know when I have a 30 or 62 bit fixnum then?

> Best of wishes!

Paulo Jorge Matos - pocm at sat inesc-id pt
Web: http://sat.inesc-id.pt/~pocm
Computer and Software Engineering

Posted on the users mailing list.