Created on 2006-11-10.00:00:00 last changed 171 months ago
Proposed resolution:
Suggest [numeric.limits.members], paragraph 57 is amended to:
A type is modulo if,
it is possible to add two positive numbers and have a result that wraps around to a third number that is less.given any operation involving +,- or * on values of that type whose value would fall outside the range [min(), max()], then the value returned differs from the true value by an integer multiple of (max() - min() + 1).
[ Bellevue: accept resolution, move to ready status. Does this mandate that is_modulo be true on platforms for which int happens to b modulo? A: the standard already seems to require that. ]
[ Batavia: Related to N2144. Pete: is there an ISO definition of modulo? Underflow on signed behavior is undefined. ]
18.2.1.2 55 states that "A type is modulo if it is possible to add two positive numbers together and have a result that wraps around to a third number that is less". This seems insufficient for the following reasons:
History | |||
---|---|---|---|
Date | User | Action | Args |
2010-10-21 18:28:33 | admin | set | messages: + msg3214 |
2010-10-21 18:28:33 | admin | set | messages: + msg3213 |
2010-10-21 18:28:33 | admin | set | messages: + msg3212 |
2006-11-10 00:00:00 | admin | create |