From: Marius Vollmer <mvo@zagadka.ping.de>
Cc: guile-devel@gnu.org
Subject: Re: real numbers and integer-expt.
Date: 20 Mar 2002 23:32:25 +0100 [thread overview]
Message-ID: <87g02uyio6.fsf@zagadka.ping.de> (raw)
In-Reply-To: <87lmcwgmvf.fsf@raven.i.defaultvalue.org>
Rob Browning <rlb@defaultvalue.org> writes:
> Marius Vollmer <mvo@zagadka.ping.de> 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
Yes, good point. I wasn't aware of that.
I guess we need to first answer what the purpose of 'integer-expt' is.
Given 'expt' is it useful to have 'integer-expt' as well? Is
integer-expt really only for exact numbers and not for integers? Is
it just a subset of 'expt' for use from C code?
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel
next prev parent reply other threads:[~2002-03-20 22:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-13 8:36 real numbers and integer-expt Rob Browning
2002-03-13 19:23 ` Marius Vollmer
2002-03-13 21:23 ` Rob Browning
2002-03-13 21:32 ` Rob Browning
2002-03-13 21:48 ` Rob Browning
2002-03-20 22:32 ` Marius Vollmer [this message]
2002-03-20 22:54 ` Rob Browning
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87g02uyio6.fsf@zagadka.ping.de \
--to=mvo@zagadka.ping.de \
--cc=guile-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).