mit-scheme-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MIT-Scheme-devel] possible bug in min function


From: Sean D'Epagnier
Subject: [MIT-Scheme-devel] possible bug in min function
Date: Sun, 11 Feb 2007 10:46:52 -0700
User-agent: Mutt/1.5.11

I have been using mit-scheme for nearest neighbor algorithms, and often
I have a default "distance" of ieee754 infinity for a point.

I am looking to find the minimum, but when I execute the following:

1 ]=> (min 1 (/ 1.0 0.0))

;Value: #[+inf]


This seems wrong, I have worked around it for now using something like:

1 ]=> (min (exact->inexact 1) (/ 1.0 0.0))

;Value: 1.


Does this make any sense? is it a bug?  This is on a 64bit linux
system with the c backend.  I tried it on a 32bit linux system, and
I get a division by zero error.  Shouldn't both versions behave the same?

Thanks,
Sean




reply via email to

[Prev in Thread] Current Thread [Next in Thread]