oscbyspro / Ultimathnum

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

Add: BinaryInteger/isMultiple(of:) #87

Open oscbyspro opened 2 months ago

oscbyspro commented 2 months ago

Swift has a BinaryInteger/isMultiple(of:) method, and I don't see a great reason to exclude it from this project. I suppose the difficult part is deciding what to with infinite values. Some factorizations are possible, even for infinite values, but I don't think it's possible in general. I might limit non-optional results to Finite<T> and FiniteInteger. Hm.

oscbyspro commented 2 months ago

I'll have to think about it, but it might be similar to division where 3/4 unsigned arbitrary integer cases are well-behaved.