[Issue 8007] Wrong documentation for '>>'
https://issues.dlang.org/show_bug.cgi?id=8007 Iain Buclaw changed: What|Removed |Added Priority|P2 |P3 --
[Issue 8007] Wrong documentation for '>>'
https://issues.dlang.org/show_bug.cgi?id=8007 --- Comment #7 from timon.g...@gmx.ch --- (In reply to berni44 from comment #5) > ... And as Don has IMHO > expressed that opinion too, there is some justification in doing so. Don merely clarified what the issue is. --
[Issue 8007] Wrong documentation for '>>'
https://issues.dlang.org/show_bug.cgi?id=8007 --- Comment #6 from timon.g...@gmx.ch --- (In reply to berni44 from comment #5) > ... > If it were so "clearly not true", as you state, I should see this too. But I > can't, so your statement is wrong. https://en.wikipedia.org/wiki/Arithmetic_shift "In computer programming, an arithmetic shift is a shift operator, sometimes termed a signed shift (though it is not restricted to signed operands)." --
[Issue 8007] Wrong documentation for '>>'
https://issues.dlang.org/show_bug.cgi?id=8007 --- Comment #5 from berni44 --- (In reply to timon.gehr from comment #4) > Please stop closing issues just for the sake of it. I do not close issues "just for the sake of it". I closed this one, because I think it's invalid. And I wrote, why I think so. And as Don has IMHO expressed that opinion too, there is some justification in doing so. And in doing so I'll give the next one, who is closing this as invalid even more justification. > It's clearly not true that `>>` is a signed right shift. If it were so "clearly not true", as you state, I should see this too. But I can't, so your statement is wrong. --
[Issue 8007] Wrong documentation for '>>'
https://issues.dlang.org/show_bug.cgi?id=8007 timon.g...@gmx.ch changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|INVALID |--- --- Comment #4 from timon.g...@gmx.ch --- Please stop closing issues just for the sake of it. It's clearly not true that `>>` is a signed right shift. --
[Issue 8007] Wrong documentation for '>>'
https://issues.dlang.org/show_bug.cgi?id=8007 berni44 changed: What|Removed |Added Status|NEW |RESOLVED CC||bugzi...@d-ecke.de Resolution|--- |INVALID --- Comment #3 from berni44 --- IMHO the documentation is quite clear here and correct. First, according to the docs, the opperands have to undergo integer promotion. But for ulong, there is not promotion, therefore the opperand stays ulong. It also tells, that the result is of the same type as the left side, hence the result is an ulong. And therefore there are no signs. I read ">> is a signed right shift" as "if there is a sign, it will be preserved". That's true here. --
[Issue 8007] Wrong documentation for ''
http://d.puremagic.com/issues/show_bug.cgi?id=8007 Don clugd...@yahoo.com.au changed: What|Removed |Added CC||clugd...@yahoo.com.au --- Comment #1 from Don clugd...@yahoo.com.au 2012-05-02 08:32:33 PDT --- I guess you mean it makes you think that x 1 is (cast(signed!(typeof(x)))x) 1 and that x 1 is (cast(unsigned!(typeof(x)))x) 1 ? Both of which are untrue. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8007] Wrong documentation for ''
http://d.puremagic.com/issues/show_bug.cgi?id=8007 --- Comment #2 from timon.g...@gmx.ch 2012-05-02 10:46:16 PDT --- (In reply to comment #1) I guess you mean it makes you think that x 1 is (cast(signed!(typeof(x)))x) 1 Yes, as it is phrased, -1U 1 == -1U would have to hold. The bug report is about this. and that x 1 is (cast(unsigned!(typeof(x)))x) 1 ? Both of which are untrue. We should fix or get rid of it. The usual integral promotion rules are an extremely bad fit here. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---