This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

scm_divide and division by zero inconsistency.


Hi!

I discovered the following inconsistency with scm_divide:

guile> (/ 1 0)
--> +#.#
guile> (/ (expt 2 100) 0)
ERROR: In procedure / in expression (/ (expt 2 100) 0):
ERROR: Numerical overflow
ABORT: (numerical-overflow)

Bignums are treated differently here.  I think that the behaviour should
be consistent, and personally I favor the numerical-overflow variant over
the variant to return infinity or not-a-number or whatever.

What do others think?

Best regards
Dirk Herrmann


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]