Homework 4b
- Due Oct 4, 2016 by 1:50pm
- Points 12
- Submitting a file upload
You only have to hand this in if you had a bug on part of homework 4. The assignment is to hand in correct code. Here are the failing test cases with answers:
for: [-32..-32] & [-32..-31]
got [-16..-1] but expected [-32..-32]
for: [-31..-30] & [-31..-30]
got [-31..-30] but expected [-32..-30]
for: [-32..-32] & [0..0]
got [-32..-32] but expected [0..0]
for: [-32..-32] & [-31..-31]
got [-31..-31] but expected [-32..-32]
for: [-31..-31] & [-31..-30]
got [-31..-30] but expected [-32..-31]
for: [-32..2] & [-29..-29]
got [-32..1] but expected [-32..2]
for: [-32..-32] - [-32..1]
got [0..31] but expected [-32..31]
this is an error of unsoundness
for: [-32..-31] - [-32..31]
got [1..1] but expected [-32..31]
this is an error of unsoundness
for: [-32..-32] - [1..1]
got [-1..-1] but expected [31..31]
this is an error of unsoundness
for: [0..30] - [-32..-32]
got [-32..0] but expected [-32..-2]
this is an error of imprecision
for: [-32..-32] - [1..1]
got [-32..31] but expected [31..31]
this is an error of imprecision