oscbyspro / Ultimathnum

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

StdlibIntKit #23

Closed oscbyspro closed 2 weeks ago

oscbyspro commented 2 weeks ago

I want to test some ordinary Swift.BinaryInteger stuff. A StdlibInt\<T> type would enable it. Swift.BinaryInteger is approximately a trapping Ultimathnum.FiniteInteger, so it should be simple to implement. The only thing I haven't covered yet is binary floating-point conversions, which I'll get to eventually.

oscbyspro commented 2 weeks ago

I might need two types since Swift does not have a notion of infinity. Alternatively, I could settle on a signed big integer type that wraps InfiniInt\<IX>. That would cover most things I have in mind. Hm.

oscbyspro commented 2 weeks ago

I've settled on a big, signed, StdlibInt. It uses TextInt too because Swift does not have an arbitrary decoding method.