UInt128
A 128-bit signed/unsigned integer implementation with optimized multiplication, division, and string conversions. This package supports the new StaticBigInt on macOS 13.3+ or iOS 16.4+.
Install / Use
/learn @mgriebling/UInt128README
UInt128/Int128
A 128-bit unsigned/signed integer implementation with optimized multiplication, division, and string conversions. The user interface has been changed to be in sync with Apple's unreleased version of the UInt128/Int128.
This package is usually around ten times faster than other UInt128 implementations and roughly the same speed as Apple's implementation. If you find something faster, please let me know.
This package now supports StaticBigInt. Unfortunately, this means you need
to have one of following configurations (or higher)
- macOS 13.3+,
- iOS 16.4+,
- macCatalyst 16.4+,
- tvOS 16.4+,
- watchOS 9.4+
If you don't have these configurations, you need to use a previous release of UInt128/Int128.
Installation
This library includes Swift Package support out of the box. Reference this git repository via XCode to install as a Package.
- Warning: This interface uses different initializers than earlier versions.
You can also manually copy over the Sources/(U)Int128.swift files into your project
and it should work great. This file split duplicates Apple's UInt128 and Int128
files. Note: Some common utilities are located in the Common.swift file which
you'll also need if copying to your project.
Documentation
Please refer to https://mgriebling.github.io/UInt128/documentation/uint128 for the documentation.
Related Skills
openhue
345.9kControl Philips Hue lights and scenes via the OpenHue CLI.
sag
345.9kElevenLabs text-to-speech with mac-style say UX.
weather
345.9kGet current weather and forecasts via wttr.in or Open-Meteo
tweakcc
1.6kCustomize Claude Code's system prompts, create custom toolsets, input pattern highlighters, themes/thinking verbs/spinners, customize input box & user message styling, support AGENTS.md, unlock private/unreleased features, and much more. Supports both native/npm installs on all platforms.
