]> granicus.if.org Git - python/commit
Revise max() and min() to comply with the 8/2/2004 update to the specification
authorRaymond Hettinger <python@rcn.com>
Tue, 17 Aug 2004 06:39:37 +0000 (06:39 +0000)
committerRaymond Hettinger <python@rcn.com>
Tue, 17 Aug 2004 06:39:37 +0000 (06:39 +0000)
commitd6c700a320eacd6f04cbcc60996b84e765766890
treed07c64797ec5e9cfce7464a8f9fdc60b1d78351c
parentf63ba43733aca984272540040d43ddf0c3fbdae9
Revise max() and min() to comply with the 8/2/2004 update to the specification
(version 1.45):

The max and min operations follow the rules in the current IEEE 754 revision draft:
if one operand is a quiet NaN and the other is number, then the number is always returned
if both operands are finite and equal in numerical value then an ordering is applied:
    if the signs differ then max returns the operand with the positive sign and
    min returns the operand with the negative sign; if the signs are the same then
    the exponent is used to select the result.
Lib/decimal.py