REBOL3 tracker
  0.9.12 beta
Ticket #0001975 User: anonymous

Project:



rss
TypeBug Statussubmitted Date27-Feb-2013 22:50
Versionr3 master CategoryMath Submitted bySunanda
PlatformAll Severityminor Prioritynormal

Summary Logical operations on TUPLE and INTEGER can produce nonsense
Description It can if the integer is negative (results are same in R2)


1.2.3.4.5.6 or -1
== 0.0.0.0.0.0

1.2.3.4.5.6 and -1
== 1.2.3.4.5.6

1.2.3.4.5.6 xor -1
== 0.0.0.0.0.0

1.2.3.4.5.6 or -1111111111
== 0.0.0.0.0.0

1.2.3.4.5.6 or -11111111111
== 255.255.255.255.255.255


(Suggest this should be disallowed, as it is if the args are reversed)
Example code
1.2.3.4.5.6 or -11111111111
1.2.3.4.5.6 or -1

Assigned ton/a Fixed in- Last Update27-Feb-2013 23:21


Comments
(0003532)
BrianH
27-Feb-2013 23:20

Sunanda, please write your code examples so that they show the current and expected results. Being R2-compatible is only a goal when R2 is correct - likely in this case, but we can't know that without seeing what R2 and R3 does with the same code. Also, unless we keep a record of the erroneous behavior in the ticket, we won't know what it previously did that was wrong after the bug is fixed, so we won't know what to test for to make sure the bug doesn't come back. I fixed #1974, you can fix this one.

Date User Field Action Change
27-Feb-2013 23:21 BrianH Description Modified -
27-Feb-2013 23:21 BrianH Code Modified -
27-Feb-2013 23:21 BrianH Category Modified Unspecified => Math
27-Feb-2013 23:20 BrianH Comment : 0003532 Added -
27-Feb-2013 22:50 sunanda Ticket Added -