[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-janitors] #887: exactness result of max and min is non-R5RS and
From: |
Chicken Trac |
Subject: |
[Chicken-janitors] #887: exactness result of max and min is non-R5RS and depends on argument order |
Date: |
Sat, 14 Jul 2012 21:01:41 -0000 |
#887: exactness result of max and min is non-R5RS and depends on argument order
------------------------+---------------------------------------------------
Reporter: johnwcowan | Owner:
Type: defect | Status: new
Priority: minor | Milestone: 4.8.0
Component: unknown | Version: 4.7.x
Keywords: |
------------------------+---------------------------------------------------
R5RS says that `max` and `min` must return inexact results if any argument
is inexact ("unless the procedure can prove that the inaccuracy is not
large enough to affect the result, which is possible only in unusual
implementations", which does not apply to Chicken). However, Chicken's
core versions of `max` and `min` preserve the exactness of the extremum in
an inconsistent fashion:
{{{
(min 1 2.0) => 1
(min 2.0 1) => 1.0
}}}
Seemingly the procedures do not convert the current best notion of the
extremum into an inexact value when the first inexact argument is
processed.
This bug does not apply when using the numbers egg.
--
Ticket URL: <http://bugs.call-cc.org/ticket/887>
Chicken Scheme <http://www.call-with-current-continuation.org/>
Chicken Scheme is a compiler for the Scheme programming language.
- [Chicken-janitors] #887: exactness result of max and min is non-R5RS and depends on argument order,
Chicken Trac <=