[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## inexact integers in modulo etc

**From**: |
Bill Schottstaedt |

**Subject**: |
inexact integers in modulo etc |

**Date**: |
Mon, 15 Apr 2002 05:32:27 -0700 |

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?

**inexact integers in modulo etc**,
*Bill Schottstaedt* **<=**