#887 closed defect (fixed)
exactness result of max and min is non-R5RS and depends on argument order
Reported by: | johnwcowan | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 4.9.0 |
Component: | unknown | Version: | 4.7.x |
Keywords: | Cc: | ||
Estimated difficulty: |
Description
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.
Note: See
TracTickets for help on using
tickets.
This has been fixed and pushed as commit ab9b93a236ca4337f523672883e3d88015c10346