unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* inexact integers in modulo etc
@ 2002-04-15 12:32 Bill Schottstaedt
  2002-04-22 14:12 ` Rob Browning
  0 siblings, 1 reply; 2+ messages in thread
From: Bill Schottstaedt @ 2002-04-15 12:32 UTC (permalink / raw)


I guess this is not news, but just in case... Some Guile numerical
primitives that should (could?) accept inexact integers (at least that's
the way I read r5rs) do not.  The remainder example below is taken
from r5rs:

guile> (version)
"1.7.0"
guile> (modulo 4.0 2)

Backtrace:
In standard input:
   2: 0* [modulo 4.0 2]

standard input:2:1: In procedure modulo in expression (modulo 4.0 2):
standard input:2:1: Wrong type argument in position 1: 4.0
ABORT: (wrong-type-arg)
guile> (remainder -13 -4.0)

Backtrace:
In standard input:
   1: 0* [remainder -13 -4.0]

standard input:1:1: In procedure remainder in expression (remainder -13 -4.0):
standard input:1:1: Wrong type argument in position 2: -4.0
ABORT: (wrong-type-arg)

Others are quotient, gcd, lcm, even?, odd?

_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-guile


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

end of thread, other threads:[~2002-04-22 14:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-15 12:32 inexact integers in modulo etc Bill Schottstaedt
2002-04-22 14:12 ` Rob Browning

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