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

Re: Exactness

This page is part of the web mail archives of SRFI 77 from before July 7th, 2015. The new archives for SRFI 77 contain all messages, not just those from before July 7th, 2015.

Marcin 'Qrczak' Kowalczyk wrote:
Any existing implementation uses any other representation by default
than fixnums/bignums,

Well, the fixnum/bignum distinction is a bit more complicated in Kawa.

Kawa has:
* array-based bignums: a (reference to a) gnu.math.IntNum, one of whose
  fields is a reference to an array of 32-bits ints ("words").
* "small" bignums: if there is just a single word, it is stored
  directly in te gnu.math.IntNum, and the array field is null.
* "cached" bignums: there is a table of pre-allocated gnu.math.IntNum
  objects, representing -100..1024.

In addition, Kawa can work with unboxed Java byte/short/int/long.
	--Per Bothner
per@xxxxxxxxxxx   http://per.bothner.com/