[armedbear-devel] BigNum question

archisman rudra archi.rudra at gmail.com
Tue Oct 9 18:34:32 UTC 2012


Is this correct behavior?

CL-USER(17): (type-of 1234567898723618080928927362387)
(INTEGER 2147483648)



The relevant java code is in Bignum.java: (the value field is a java
BigInteger)

  @Override
  public LispObject typeOf()
  {
    if (value.signum() > 0)
      return list(Symbol.INTEGER,
                   new Bignum((long)Integer.MAX_VALUE + 1));
    return Symbol.BIGNUM;
  }



for comparison:
CL-USER(23): (type-of -1234567898723618080928927362387)
BIGNUM


which makes intuitive sense.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/armedbear-devel/attachments/20121009/ccbbc336/attachment.html>


More information about the armedbear-devel mailing list