unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* Complex, exact numbers
@ 2010-09-26 22:00 Mike Gran
  2010-09-27 20:27 ` Andy Wingo
  2010-09-27 21:02 ` Neil Jerram
  0 siblings, 2 replies; 4+ messages in thread
From: Mike Gran @ 2010-09-26 22:00 UTC (permalink / raw)
  To: guile-devel

Hi all-

Should a number be able to be both complex and exact?

The R6RS isn't helpful in answering this question.  It says
"A number object is exact if it is the value of an exact 
numerical literal or was derived from exact number objects
using only exact operations.  Exact number objects correspond
to mathematical numbers in the obvious way."

$ meta/guile -c "(write 0+i) (newline)"
> 0.0+1.0i

$ meta/guile -c "(write #e0+i) (newline)"
> ERROR: In procedure inexact->exact:
> ERROR: Wrong type argument in position 1: 0.0+1.0i

Thanks,

Mike




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-09-27 21:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-26 22:00 Complex, exact numbers Mike Gran
2010-09-27 20:27 ` Andy Wingo
2010-09-27 20:47   ` Mike Gran
2010-09-27 21:02 ` Neil Jerram

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).