oscbyspro / Ultimathnum

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

Hoist some arithmetic to Doublet<T> #65

Closed oscbyspro closed 1 month ago

oscbyspro commented 1 month ago

I feel like Doublet\<T> needs 2-by-2 addition and 2-by-2 multiplication. You can do a lot with these operations, without needing a fully fledged 2x integer. Divider21\<T> might use these (#64), for example. I don't think it needs much, not even overflow checking.

oscbyspro commented 1 month ago

Alternatively, I could await Swift.[U]Int128 and do something like (#60) instead.

oscbyspro commented 1 month ago

Hm. I doubt making Doublet\<T> a quasi-integer scales well. (#60) might be more sensible.