Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#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.

Change History (2)

comment:1 Changed 12 years ago by sjamaan

Resolution: fixed
Status: newclosed

This has been fixed and pushed as commit ab9b93a236ca4337f523672883e3d88015c10346

comment:2 Changed 12 years ago by felix winkelmann

Milestone: 4.8.04.9.0

Milestone 4.8.0 deleted

Note: See TracTickets for help on using tickets.