guile-devel
[Top][All Lists]
Advanced

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

Re: real numbers and integer-expt.


From: Rob Browning
Subject: Re: real numbers and integer-expt.
Date: Wed, 13 Mar 2002 15:48:36 -0600
User-agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.1 (i386-debian-linux-gnu)

Marius Vollmer <address@hidden> writes:

> Yes.  Floats can be integers, too.  However, there's a bug
> nevertheless: floats can represent integers that don't fit into 32
> bit ints.  Also, complex numbers can be ints as well.

OK, that's a bit confusing -- we have SCM_COMPLEXP which does *not*
mean the same thing as scm_complex_p -- the former checks to make sure
the object, tag-wise, is a complex smob, the latter checks to see if
the object actually contains a complex number, so we have

  (complex? 3) -> #t

but

  SCM_COMPLEX(SCM_MKINUM(3)) -> 0

-- 
Rob Browning
rlb @defaultvalue.org, @linuxdevel.com, and @debian.org
Previously @cs.utexas.edu
GPG=1C58 8B2C FB5E 3F64 EA5C  64AE 78FE E5FE F0CB A0AD



reply via email to

[Prev in Thread] Current Thread [Next in Thread]