oscbyspro / Ultimathnum

Binary arithmetic reimagined in Swift
Apache License 2.0
4 stars 1 forks source link

Bad negative versus infinite comparison #14

Closed oscbyspro closed 3 weeks ago

oscbyspro commented 3 weeks ago

I wrote some more comparison tests and found this bad negative-versus-infinite behavior:

Test().comparison(IXL(-1), UXL(~0), -1 as Signum) // OK
Test().comparison(IXL(-1), UXL(~1), -1 as Signum) // :(
Test().comparison(IXL(-1), UXL(~2), -1 as Signum) // :(
Test().comparison(IXL(-1), UXL(~3), -1 as Signum) // :(

Test().comparison(IXL(-2), UXL(~0), -1 as Signum) // OK
Test().comparison(IXL(-2), UXL(~1), -1 as Signum) // OK
Test().comparison(IXL(-2), UXL(~2), -1 as Signum) // :(
Test().comparison(IXL(-2), UXL(~3), -1 as Signum) // :(
oscbyspro commented 3 weeks ago

I need a vacation exhibit Ω

It turns out that I had placed the negative vs infinite appendix comparison after the body comparison. Sigh.