3166 – "positive" -> "non-negative" in modulo operator description

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 3166 - "positive" -> "non-negative" in modulo operator description
Summary: "positive" -> "non-negative" in modulo operator description
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dlang.org (show other issues)
Version: D2
Hardware: All All
: P2 normal
Assignee: No Owner
URL: http://www.digitalmars.com/d/2.0/expr...
Keywords: spec
Depends on:
Blocks:
Reported: 2009年07月12日 01:37 UTC by Michiel Helvensteijn
Modified: 2015年06月09日 05:15 UTC (History)
2 users (show)

See Also:


Attachments
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description Michiel Helvensteijn 2009年07月12日 01:37:06 UTC
"For integral operands of the % operator, the sign of the result is
positive if the operands are positive, otherwise the sign of the result is
implementation defined."
should read
"For integral operands of the % operator, the result is non-negative if the operands are non-negative. Otherwise, the sign of the result is implementation defined."
Comment 1 Stewart Gordon 2009年07月13日 14:19:38 UTC
Does it mean positive in the normal mathematical sense, or having the internal sign bit set to positive?
Comment 2 Stewart Gordon 2009年07月13日 14:21:45 UTC
Silly me, integral operands. Then it's correct except in the case where the right operand is zero.
Comment 3 Walter Bright 2009年09月03日 13:25:49 UTC
Fixed dmd 1.047 and 2.032


AltStyle によって変換されたページ (->オリジナル) /