diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 7b9492557..6b15679ea 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -23,7 +23,9 @@ jobs:
spm:
name: Swift Package Manager 5.4
runs-on: macOS-11
- concurrency: spm
+ concurrency:
+ group: spm-${{ github.run_id }}
+ cancel-in-progress: false
env:
DEVELOPER_DIR: /Applications/Xcode_12.5.1.app/Contents/Developer
steps:
@@ -32,12 +34,22 @@ jobs:
run: swift package resolve
- name: Build
run: swift build --build-tests
- # - name: Run local tests
- # run: swift test --skip-build -c debug --filter localTests
+ - name: Install ganache
+ run: npm install ganache --global
+ - name: Start ganache in background
+ run: ganache &
+ - name: Wait till ganache starts
+ run: sleep 1
+ - name: Run local tests
+ run: swift test --skip-build -c debug --filter localTests
+ # - name: Run remote tests
+ # run: swift test --skip-build -c debug --filter remoteTests
carthage:
name: Carthage
runs-on: macOS-11
- concurrency: carthage
+ concurrency:
+ group: carthage-${{ github.run_id }}
+ cancel-in-progress: false
env:
DEVELOPER_DIR: /Applications/Xcode_12.5.1.app/Contents/Developer
strategy:
@@ -53,5 +65,13 @@ jobs:
run: carthage build --no-use-binaries --platform iOS Simulator --use-xcframeworks
- name: Building framework
run: xcodebuild build-for-testing -project "web3swift.xcodeproj" -scheme "web3swift" -destination "${{matrix.destination}}" -testPlan LocalTests
- # - name: Running local tests
- # run: xcodebuild test-without-building -project "web3swift.xcodeproj" -scheme "web3swift" -destination "${{matrix.destination}}" -testPlan LocalTests
+ - name: Install ganache
+ run: npm install ganache --global
+ - name: Start ganache in background
+ run: ganache &
+ - name: Wait till ganache starts
+ run: sleep 1
+ - name: Run local tests
+ run: xcodebuild test-without-building -project "web3swift.xcodeproj" -scheme "web3swift" -destination "${{matrix.destination}}" -testPlan LocalTests
+ # - name: Run remote tests
+ # run: xcodebuild test-without-building -project "web3swift.xcodeproj" -scheme "web3swift" -destination "${{matrix.destination}}" -testPlan RemoteTests
diff --git a/.gitignore b/.gitignore
index 06b69c170..6b4f21edb 100755
--- a/.gitignore
+++ b/.gitignore
@@ -47,15 +47,13 @@ Package.pins
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
-# Pods/
-# Example/web3swiftBrowser/Pods
+Example/**/Pods
# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
-# Carthage/Checkouts
-
-#Carthage/Build
+Carthage/Checkouts
+Carthage/Build
# fastlane
#
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 901774947..6c0da721c 100755
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,428 +1,719 @@
# Changelog
-## [Unreleased](https://github.com/matter-labs/web3swift/tree/HEAD)
+## [Unreleased](https://github.com/skywinder/web3swift/tree/HEAD)
-[Full Changelog](https://github.com/matter-labs/web3swift/compare/2.3.0...HEAD)
+[Full Changelog](https://github.com/skywinder/web3swift/compare/2.5.0...HEAD)
+
+**Merged pull requests:**
+
+- Syncing with master [\#428](https://github.com/skywinder/web3swift/pull/428) ([yaroslavyaroslav](https://github.com/yaroslavyaroslav))
+
+## [2.5.0](https://github.com/skywinder/web3swift/tree/2.5.0) (2021-12-23)
+
+[Full Changelog](https://github.com/skywinder/web3swift/compare/2.3.0...2.5.0)
**Implemented enhancements:**
-- Credentials: send "Authorization" header [\#267](https://github.com/matter-labs/web3swift/issues/267)
+- Add support of EIP-712 signatures [\#323](https://github.com/skywinder/web3swift/issues/323)
+- BIP39.mnemonicsToEntropy does not work for mnemonics of length 15, 18, 21 [\#300](https://github.com/skywinder/web3swift/issues/300)
+- Support Solidity 0.6 & ABIEncoderV2 [\#258](https://github.com/skywinder/web3swift/issues/258)
+- Omit zeros at the end of formatted string [\#117](https://github.com/skywinder/web3swift/issues/117)
+- \[recreated\] Detect read function aborting by messaged require statement [\#276](https://github.com/skywinder/web3swift/pull/276) ([hakumai-iida](https://github.com/hakumai-iida))
+
+**Fixed bugs:**
+
+- `subscribeOnLogs` method with specific contract address is not working!!!! [\#366](https://github.com/skywinder/web3swift/issues/366)
+- EthereumContract with Custom ABI returns nil [\#342](https://github.com/skywinder/web3swift/issues/342)
+- Error on running tests [\#290](https://github.com/skywinder/web3swift/issues/290)
+- Serialisation of BIP32 misplaced address postition [\#257](https://github.com/skywinder/web3swift/issues/257)
+- Xcode 10.2.1 carthage update hangs while building web3swift.xcodeproj [\#197](https://github.com/skywinder/web3swift/issues/197)
**Closed issues:**
-- Xcode 10.3 archive failed [\#266](https://github.com/matter-labs/web3swift/issues/266)
-- Xcode 11 regenerating password [\#228](https://github.com/matter-labs/web3swift/issues/228)
-- support Xocde 11 SPM for iOS [\#221](https://github.com/matter-labs/web3swift/issues/221)
+- Error in Documentation Examples: "Failed to fetch gas estimate" [\#421](https://github.com/skywinder/web3swift/issues/421)
+- BSC Network Transaction [\#418](https://github.com/skywinder/web3swift/issues/418)
+- How to sign and send ERC20 token [\#413](https://github.com/skywinder/web3swift/issues/413)
+- Example [\#409](https://github.com/skywinder/web3swift/issues/409)
+- How install for macOS? [\#408](https://github.com/skywinder/web3swift/issues/408)
+- Use case for Web3Swift [\#405](https://github.com/skywinder/web3swift/issues/405)
+- Make and example on how to use ENS domains [\#404](https://github.com/skywinder/web3swift/issues/404)
+- Make an example on how to check your wallet balance [\#402](https://github.com/skywinder/web3swift/issues/402)
+- Implement a functionality to add custom chains [\#401](https://github.com/skywinder/web3swift/issues/401)
+- Prepare and example on how to use mnemonics [\#399](https://github.com/skywinder/web3swift/issues/399)
+- Expired Discord invitation link [\#382](https://github.com/skywinder/web3swift/issues/382)
+- How to estimate gas limit and gas price ? [\#380](https://github.com/skywinder/web3swift/issues/380)
+- let block = try? web3.eth.getBlockNumber\(\) [\#376](https://github.com/skywinder/web3swift/issues/376)
+- Support carthage both M1 and Intel processors [\#375](https://github.com/skywinder/web3swift/issues/375)
+- Support for Xcode 12 SPM [\#373](https://github.com/skywinder/web3swift/issues/373)
+- promisekit: warning: `wait()` called on main thread! [\#372](https://github.com/skywinder/web3swift/issues/372)
+- How to generate web3swift framework file from source [\#369](https://github.com/skywinder/web3swift/issues/369)
+- how to maintain multiple wallet ,need to store separate key json file? [\#367](https://github.com/skywinder/web3swift/issues/367)
+- Extremely slow init BIP39 and keystore in current dev branch [\#365](https://github.com/skywinder/web3swift/issues/365)
+- How can i get EventLogs and topics from a transaction response? [\#359](https://github.com/skywinder/web3swift/issues/359)
+- Cannot parse ABI with tuple\[\] [\#358](https://github.com/skywinder/web3swift/issues/358)
+- Send Transaction issue, processingError\(desc: "Failed to fetch gas estimate"\) [\#356](https://github.com/skywinder/web3swift/issues/356)
+- Instance member 'contract' cannot be used on type 'web3'; did you mean to use a value of this type instead? [\#352](https://github.com/skywinder/web3swift/issues/352)
+- Could not build Objective-C module 'web3swift' [\#344](https://github.com/skywinder/web3swift/issues/344)
+- Building the latest web3Swift example [\#341](https://github.com/skywinder/web3swift/issues/341)
+- cannot open https://exchange.pancakeswap.finance/\#/swap [\#338](https://github.com/skywinder/web3swift/issues/338)
+- Crash with parsing custom ABI Contract [\#333](https://github.com/skywinder/web3swift/issues/333)
+- @ravi-ranjan-oodles thanks for the update. [\#329](https://github.com/skywinder/web3swift/issues/329)
+- Issue in Uploading to Test Flight [\#328](https://github.com/skywinder/web3swift/issues/328)
+- Update CryptoSwift podspec [\#322](https://github.com/skywinder/web3swift/issues/322)
+- cann't open DApp, such as "https://uniswap.tokenpocket.pro/\#/swap" [\#321](https://github.com/skywinder/web3swift/issues/321)
+- CryptoSwift version is too low to work properly in Xcode12.5 [\#318](https://github.com/skywinder/web3swift/issues/318)
+- web3swift.Web3Error.processingError\(desc: "Failed to fetch gas estimate"\)(BSC Chain) [\#317](https://github.com/skywinder/web3swift/issues/317)
+- Quick simple steps for minting ERC20 or ERC721 tokens [\#314](https://github.com/skywinder/web3swift/issues/314)
+- Generate Contract Bytecode / Address [\#313](https://github.com/skywinder/web3swift/issues/313)
+- I can't find func 'Web3.InfuraKovanWeb3\(\)' [\#311](https://github.com/skywinder/web3swift/issues/311)
+- web3 instance error: Variable used within its own initial value [\#310](https://github.com/skywinder/web3swift/issues/310)
+- Failed to fetch gas estimate when sending erc20 [\#307](https://github.com/skywinder/web3swift/issues/307)
+- DApp browser cann't open Uniswap in a right way [\#304](https://github.com/skywinder/web3swift/issues/304)
+- Update cocoapods bigint to 5.0 [\#288](https://github.com/skywinder/web3swift/issues/288)
+- When I use getBlockByNumber , hash Unable to check [\#287](https://github.com/skywinder/web3swift/issues/287)
+- How to parse the return value of read transaction [\#284](https://github.com/skywinder/web3swift/issues/284)
+- Failed to fetch gas estimate [\#283](https://github.com/skywinder/web3swift/issues/283)
+- Generic parameter 'Element' could not be inferred [\#282](https://github.com/skywinder/web3swift/issues/282)
+- Unable to send ether using send function [\#279](https://github.com/skywinder/web3swift/issues/279)
+- This request is not supported because your node is running with state pruning. Run with --pruning=archive. [\#274](https://github.com/skywinder/web3swift/issues/274)
+- Send ERC20 token error And get token name error [\#262](https://github.com/skywinder/web3swift/issues/262)
+- Problem when decoding raw transaction input data [\#216](https://github.com/skywinder/web3swift/issues/216)
+- Is it necessary to use password in creating Bip32keystore ? [\#213](https://github.com/skywinder/web3swift/issues/213)
+
+**Merged pull requests:**
-## [2.3.0](https://github.com/matter-labs/web3swift/tree/2.3.0) (2020-09-21)
+- Fix-up [\#427](https://github.com/skywinder/web3swift/pull/427) ([yaroslavyaroslav](https://github.com/yaroslavyaroslav))
+- 2.5.0 [\#426](https://github.com/skywinder/web3swift/pull/426) ([yaroslavyaroslav](https://github.com/yaroslavyaroslav))
+- Bugfix: Derive PublicKey [\#423](https://github.com/skywinder/web3swift/pull/423) ([yuzhiyou1990](https://github.com/yuzhiyou1990))
+- Enabling GitHub actions [\#422](https://github.com/skywinder/web3swift/pull/422) ([yaroslavyaroslav](https://github.com/yaroslavyaroslav))
+- Fix building issue [\#410](https://github.com/skywinder/web3swift/pull/410) ([yaroslavyaroslav](https://github.com/yaroslavyaroslav))
+- Fixed keystore backward compatibility [\#397](https://github.com/skywinder/web3swift/pull/397) ([BaldyAsh](https://github.com/BaldyAsh))
+- add support of EIP-712 signature [\#396](https://github.com/skywinder/web3swift/pull/396) ([BaldyAsh](https://github.com/BaldyAsh))
+- Fix ENS.getContentHash to return Data [\#395](https://github.com/skywinder/web3swift/pull/395) ([battlmonstr](https://github.com/battlmonstr))
+- Fix Serialisation of BIP32 Keystore [\#394](https://github.com/skywinder/web3swift/pull/394) ([BaldyAsh](https://github.com/BaldyAsh))
+- Dependency update | M1 support [\#389](https://github.com/skywinder/web3swift/pull/389) ([Valter4578](https://github.com/Valter4578))
+- Fixed typo in function name [\#386](https://github.com/skywinder/web3swift/pull/386) ([JeneaVranceanu](https://github.com/JeneaVranceanu))
+- Updated Example and Updated Version for BigInt , CryptoSwift and PromiseKit dependency [\#383](https://github.com/skywinder/web3swift/pull/383) ([veerChauhan](https://github.com/veerChauhan))
+- add support of EIP-712 signature [\#381](https://github.com/skywinder/web3swift/pull/381) ([AndreyMaksimkin](https://github.com/AndreyMaksimkin))
+- fixed parsing of ABIs with tuples + wrong gas info when transactionOptions created from json [\#379](https://github.com/skywinder/web3swift/pull/379) ([izakpavel](https://github.com/izakpavel))
+- fixed: websocket delegate issue \(new\) [\#378](https://github.com/skywinder/web3swift/pull/378) ([amirhossein7](https://github.com/amirhossein7))
+- Added Promise: Support for getCode function [\#368](https://github.com/skywinder/web3swift/pull/368) ([SwiftyLimi](https://github.com/SwiftyLimi))
+- Added: Receive type at ABI.Element [\#348](https://github.com/skywinder/web3swift/pull/348) ([SwiftyLimi](https://github.com/SwiftyLimi))
+- Update local Tests and refactoring [\#347](https://github.com/skywinder/web3swift/pull/347) ([BaldyAsh](https://github.com/BaldyAsh))
+- update carthage build scripts to support xcode 11-12 [\#345](https://github.com/skywinder/web3swift/pull/345) ([skywinder](https://github.com/skywinder))
+- Update libs versions, Cartfile and Pods dependencies [\#334](https://github.com/skywinder/web3swift/pull/334) ([AnnaYatsun1](https://github.com/AnnaYatsun1))
+- fix crash when 'payable' nil [\#332](https://github.com/skywinder/web3swift/pull/332) ([xdozorx](https://github.com/xdozorx))
+- Update README.md [\#331](https://github.com/skywinder/web3swift/pull/331) ([Iysbaera](https://github.com/Iysbaera))
+- CrytoSwift update version 1.4.0 [\#327](https://github.com/skywinder/web3swift/pull/327) ([lzttxs](https://github.com/lzttxs))
+- Update carthage libraries [\#325](https://github.com/skywinder/web3swift/pull/325) ([alex78pro](https://github.com/alex78pro))
+- Gas estimate fix [\#324](https://github.com/skywinder/web3swift/pull/324) ([frostiq](https://github.com/frostiq))
+- Update README.md [\#306](https://github.com/skywinder/web3swift/pull/306) ([manuG420](https://github.com/manuG420))
+- fix mnemonicsToEntropy mnemonic length check [\#301](https://github.com/skywinder/web3swift/pull/301) ([sche](https://github.com/sche))
+- Updated Contract transaction method with Your ABI string [\#299](https://github.com/skywinder/web3swift/pull/299) ([veerChauhan](https://github.com/veerChauhan))
+- fix crash abi parsing [\#296](https://github.com/skywinder/web3swift/pull/296) ([nerzh](https://github.com/nerzh))
+- Examples, Fixed Crashes, Refactoring [\#286](https://github.com/skywinder/web3swift/pull/286) ([skywinder](https://github.com/skywinder))
+- Master [\#281](https://github.com/skywinder/web3swift/pull/281) ([skywinder](https://github.com/skywinder))
+- Fix Serialisation of BIP32 Keystore [\#278](https://github.com/skywinder/web3swift/pull/278) ([podkovyrin](https://github.com/podkovyrin))
+
+## [2.3.0](https://github.com/skywinder/web3swift/tree/2.3.0) (2020-09-26)
+
+[Full Changelog](https://github.com/skywinder/web3swift/compare/2.2.2...2.3.0)
-[Full Changelog](https://github.com/matter-labs/web3swift/compare/2.2.2...2.3.0)
+**Implemented enhancements:**
+
+- Credentials: send "Authorization" header [\#267](https://github.com/skywinder/web3swift/issues/267)
**Fixed bugs:**
-- How to add web3swift in my framework ? [\#167](https://github.com/matter-labs/web3swift/issues/167)
-- Documentation link 404 in README.md [\#164](https://github.com/matter-labs/web3swift/issues/164)
+- How to add web3swift in my framework ? [\#167](https://github.com/skywinder/web3swift/issues/167)
+- Documentation link 404 in README.md [\#164](https://github.com/skywinder/web3swift/issues/164)
**Closed issues:**
-- web3swift.Web3Error.processingError\("Failed to fetch nonce"\) [\#272](https://github.com/matter-labs/web3swift/issues/272)
-- WebView: Dapp & Connect Wallet [\#264](https://github.com/matter-labs/web3swift/issues/264)
-- Create new contract method. [\#261](https://github.com/matter-labs/web3swift/issues/261)
-- Not able to Deploy smart contract [\#214](https://github.com/matter-labs/web3swift/issues/214)
-- unable to create archive file for testflight [\#161](https://github.com/matter-labs/web3swift/issues/161)
+- web3swift.Web3Error.processingError\("Failed to fetch nonce"\) [\#272](https://github.com/skywinder/web3swift/issues/272)
+- Xcode 10.3 archive failed [\#266](https://github.com/skywinder/web3swift/issues/266)
+- WebView: Dapp & Connect Wallet [\#264](https://github.com/skywinder/web3swift/issues/264)
+- Create new contract method. [\#261](https://github.com/skywinder/web3swift/issues/261)
+- Xcode 11 regenerating password [\#228](https://github.com/skywinder/web3swift/issues/228)
+- support Xocde 11 SPM for iOS [\#221](https://github.com/skywinder/web3swift/issues/221)
+- Not able to Deploy smart contract [\#214](https://github.com/skywinder/web3swift/issues/214)
+- unable to create archive file for testflight [\#161](https://github.com/skywinder/web3swift/issues/161)
**Merged pull requests:**
-- Added web3-react-native to libraries that use web3swift [\#263](https://github.com/matter-labs/web3swift/pull/263) ([cawfree](https://github.com/cawfree))
+- Added web3-react-native to libraries that use web3swift [\#263](https://github.com/skywinder/web3swift/pull/263) ([cawfree](https://github.com/cawfree))
-## [2.2.2](https://github.com/matter-labs/web3swift/tree/2.2.2) (2020-04-04)
+## [2.2.2](https://github.com/skywinder/web3swift/tree/2.2.2) (2020-04-04)
-[Full Changelog](https://github.com/matter-labs/web3swift/compare/2.2.1...2.2.2)
+[Full Changelog](https://github.com/skywinder/web3swift/compare/2.2.1...2.2.2)
**Implemented enhancements:**
-- ENS Registry migration [\#237](https://github.com/matter-labs/web3swift/issues/237)
-- WKWebView with injected "web3 [\#202](https://github.com/matter-labs/web3swift/issues/202)
+- ENS Registry migration [\#237](https://github.com/skywinder/web3swift/issues/237)
+- WKWebView with injected "web3 [\#202](https://github.com/skywinder/web3swift/issues/202)
**Fixed bugs:**
-- Fix build dependencies [\#244](https://github.com/matter-labs/web3swift/issues/244)
-- Carthage build fails [\#226](https://github.com/matter-labs/web3swift/issues/226)
+- Fix build dependencies [\#244](https://github.com/skywinder/web3swift/issues/244)
+- Carthage build fails [\#226](https://github.com/skywinder/web3swift/issues/226)
**Closed issues:**
-- Event filters by Param not working [\#248](https://github.com/matter-labs/web3swift/issues/248)
-- KeysService\(\) in Migration guide not found [\#240](https://github.com/matter-labs/web3swift/issues/240)
-- How to get seed phrase from private key? [\#236](https://github.com/matter-labs/web3swift/issues/236)
-- Sender Value nil [\#219](https://github.com/matter-labs/web3swift/issues/219)
+- Event filters by Param not working [\#248](https://github.com/skywinder/web3swift/issues/248)
+- KeysService\(\) in Migration guide not found [\#240](https://github.com/skywinder/web3swift/issues/240)
+- How to get seed phrase from private key? [\#236](https://github.com/skywinder/web3swift/issues/236)
+- Sender Value nil [\#219](https://github.com/skywinder/web3swift/issues/219)
**Merged pull requests:**
-- value as optional parameter [\#256](https://github.com/matter-labs/web3swift/pull/256) ([skywinder](https://github.com/skywinder))
-- 2.2.2 [\#253](https://github.com/matter-labs/web3swift/pull/253) ([BaldyAsh](https://github.com/BaldyAsh))
-- \#248 [\#250](https://github.com/matter-labs/web3swift/pull/250) ([hakumai-iida](https://github.com/hakumai-iida))
-- Baldyash/webview [\#249](https://github.com/matter-labs/web3swift/pull/249) ([BaldyAsh](https://github.com/BaldyAsh))
-- policy [\#247](https://github.com/matter-labs/web3swift/pull/247) ([BaldyAsh](https://github.com/BaldyAsh))
-- Fix dependencies, build [\#245](https://github.com/matter-labs/web3swift/pull/245) ([BaldyAsh](https://github.com/BaldyAsh))
-- chore: update ENS Registry migration [\#243](https://github.com/matter-labs/web3swift/pull/243) ([aranhaagency](https://github.com/aranhaagency))
-- improtant notice update [\#232](https://github.com/matter-labs/web3swift/pull/232) ([skywinder](https://github.com/skywinder))
-- Add Alice Wallet to project list [\#230](https://github.com/matter-labs/web3swift/pull/230) ([lmcmz](https://github.com/lmcmz))
-- Update Extensions.swift [\#225](https://github.com/matter-labs/web3swift/pull/225) ([kocherovets](https://github.com/kocherovets))
-- correct gasLimit [\#222](https://github.com/matter-labs/web3swift/pull/222) ([luqz](https://github.com/luqz))
-- Change BIP39 word list extension from array of strings to one string … [\#217](https://github.com/matter-labs/web3swift/pull/217) ([husamettinor](https://github.com/husamettinor))
-- Expose BIP39 words and separator [\#212](https://github.com/matter-labs/web3swift/pull/212) ([dawiddr](https://github.com/dawiddr))
+- value as optional parameter [\#256](https://github.com/skywinder/web3swift/pull/256) ([skywinder](https://github.com/skywinder))
+- 2.2.2 [\#253](https://github.com/skywinder/web3swift/pull/253) ([BaldyAsh](https://github.com/BaldyAsh))
+- \#248 [\#250](https://github.com/skywinder/web3swift/pull/250) ([hakumai-iida](https://github.com/hakumai-iida))
+- Baldyash/webview [\#249](https://github.com/skywinder/web3swift/pull/249) ([BaldyAsh](https://github.com/BaldyAsh))
+- policy [\#247](https://github.com/skywinder/web3swift/pull/247) ([BaldyAsh](https://github.com/BaldyAsh))
+- Fix dependencies, build [\#245](https://github.com/skywinder/web3swift/pull/245) ([BaldyAsh](https://github.com/BaldyAsh))
+- chore: update ENS Registry migration [\#243](https://github.com/skywinder/web3swift/pull/243) ([aranhaagency](https://github.com/aranhaagency))
+- improtant notice update [\#232](https://github.com/skywinder/web3swift/pull/232) ([skywinder](https://github.com/skywinder))
+- Add Alice Wallet to project list [\#230](https://github.com/skywinder/web3swift/pull/230) ([lmcmz](https://github.com/lmcmz))
+- Update Extensions.swift [\#225](https://github.com/skywinder/web3swift/pull/225) ([kocherovets](https://github.com/kocherovets))
+- correct gasLimit [\#222](https://github.com/skywinder/web3swift/pull/222) ([luqz](https://github.com/luqz))
+- Change BIP39 word list extension from array of strings to one string … [\#217](https://github.com/skywinder/web3swift/pull/217) ([husamettinor](https://github.com/husamettinor))
+- Expose BIP39 words and separator [\#212](https://github.com/skywinder/web3swift/pull/212) ([dawiddr](https://github.com/dawiddr))
-## [2.2.1](https://github.com/matter-labs/web3swift/tree/2.2.1) (2019-06-24)
+## [2.2.1](https://github.com/skywinder/web3swift/tree/2.2.1) (2019-06-24)
-[Full Changelog](https://github.com/matter-labs/web3swift/compare/2.2.0...2.2.1)
+[Full Changelog](https://github.com/skywinder/web3swift/compare/2.2.0...2.2.1)
**Implemented enhancements:**
-- 2.2.0 [\#155](https://github.com/matter-labs/web3swift/issues/155)
+- 2.2.0 [\#155](https://github.com/skywinder/web3swift/issues/155)
**Closed issues:**
-- BigInt 3.1 [\#207](https://github.com/matter-labs/web3swift/issues/207)
-- recevied transaction id from geth node server but not able to see that transaction id at etherscan.io [\#200](https://github.com/matter-labs/web3swift/issues/200)
-- How do I fetch information such as balance, decimal,symbol and name of ERC20token ? [\#199](https://github.com/matter-labs/web3swift/issues/199)
-- Starscream 3.1.0 not compatible with Swift 5.0 [\#195](https://github.com/matter-labs/web3swift/issues/195)
-- How to Connect infuraWebsocket and subsribe perticular event in swift? [\#193](https://github.com/matter-labs/web3swift/issues/193)
-- Use of unresolved identifier 'Wallet' [\#192](https://github.com/matter-labs/web3swift/issues/192)
-- V in Signed Message Hash not being calculated properly [\#191](https://github.com/matter-labs/web3swift/issues/191)
-- Not possible to calculate fast, normal and cheap transaction fee ? [\#190](https://github.com/matter-labs/web3swift/issues/190)
-- SocketProvider does not receive messages [\#188](https://github.com/matter-labs/web3swift/issues/188)
-- Cannot build example in v2.1.6 [\#177](https://github.com/matter-labs/web3swift/issues/177)
-- EIP67Code missing in web3swift 2.1.6 [\#176](https://github.com/matter-labs/web3swift/issues/176)
-- 'internal' protection level on Web3Error description property [\#172](https://github.com/matter-labs/web3swift/issues/172)
-- ENS initializer is inaccessible due to `internal` protection level [\#171](https://github.com/matter-labs/web3swift/issues/171)
-- Archive on Xcode 10.2 [\#166](https://github.com/matter-labs/web3swift/issues/166)
-- carthage not support on Xcode 10.2 [\#138](https://github.com/matter-labs/web3swift/issues/138)
+- BigInt 3.1 [\#207](https://github.com/skywinder/web3swift/issues/207)
+- recevied transaction id from geth node server but not able to see that transaction id at etherscan.io [\#200](https://github.com/skywinder/web3swift/issues/200)
+- How do I fetch information such as balance, decimal,symbol and name of ERC20token ? [\#199](https://github.com/skywinder/web3swift/issues/199)
+- Starscream 3.1.0 not compatible with Swift 5.0 [\#195](https://github.com/skywinder/web3swift/issues/195)
+- How to Connect infuraWebsocket and subsribe perticular event in swift? [\#193](https://github.com/skywinder/web3swift/issues/193)
+- Use of unresolved identifier 'Wallet' [\#192](https://github.com/skywinder/web3swift/issues/192)
+- V in Signed Message Hash not being calculated properly [\#191](https://github.com/skywinder/web3swift/issues/191)
+- Not possible to calculate fast, normal and cheap transaction fee ? [\#190](https://github.com/skywinder/web3swift/issues/190)
+- SocketProvider does not receive messages [\#188](https://github.com/skywinder/web3swift/issues/188)
+- Cannot build example in v2.1.6 [\#177](https://github.com/skywinder/web3swift/issues/177)
+- EIP67Code missing in web3swift 2.1.6 [\#176](https://github.com/skywinder/web3swift/issues/176)
+- 'internal' protection level on Web3Error description property [\#172](https://github.com/skywinder/web3swift/issues/172)
+- ENS initializer is inaccessible due to `internal` protection level [\#171](https://github.com/skywinder/web3swift/issues/171)
+- Archive on Xcode 10.2 [\#166](https://github.com/skywinder/web3swift/issues/166)
+- carthage not support on Xcode 10.2 [\#138](https://github.com/skywinder/web3swift/issues/138)
**Merged pull requests:**
-- 2.2.1 [\#210](https://github.com/matter-labs/web3swift/pull/210) ([BaldyAsh](https://github.com/BaldyAsh))
-- infura v3 complete update [\#209](https://github.com/matter-labs/web3swift/pull/209) ([BaldyAsh](https://github.com/BaldyAsh))
-- merge Master -\> develop [\#205](https://github.com/matter-labs/web3swift/pull/205) ([skywinder](https://github.com/skywinder))
-- update documentation, prettify doc style [\#204](https://github.com/matter-labs/web3swift/pull/204) ([skywinder](https://github.com/skywinder))
-- V handle fix [\#201](https://github.com/matter-labs/web3swift/pull/201) ([BaldyAsh](https://github.com/BaldyAsh))
-- Update ENSBaseRegistrar.swift [\#198](https://github.com/matter-labs/web3swift/pull/198) ([barrasso](https://github.com/barrasso))
-- Websockets improvements and fixes [\#189](https://github.com/matter-labs/web3swift/pull/189) ([BaldyAsh](https://github.com/BaldyAsh))
-- Update ETHRegistrarController.swift [\#187](https://github.com/matter-labs/web3swift/pull/187) ([barrasso](https://github.com/barrasso))
-- Update ETHRegistrarController.swift [\#183](https://github.com/matter-labs/web3swift/pull/183) ([barrasso](https://github.com/barrasso))
-- Fix typo in Usage [\#182](https://github.com/matter-labs/web3swift/pull/182) ([sweepty](https://github.com/sweepty))
-- Expose errorDescription. [\#181](https://github.com/matter-labs/web3swift/pull/181) ([andresousa](https://github.com/andresousa))
-- Update ENS Resolver [\#180](https://github.com/matter-labs/web3swift/pull/180) ([barrasso](https://github.com/barrasso))
+- 2.2.1 [\#210](https://github.com/skywinder/web3swift/pull/210) ([BaldyAsh](https://github.com/BaldyAsh))
+- infura v3 complete update [\#209](https://github.com/skywinder/web3swift/pull/209) ([BaldyAsh](https://github.com/BaldyAsh))
+- merge Master -\> develop [\#205](https://github.com/skywinder/web3swift/pull/205) ([skywinder](https://github.com/skywinder))
+- update documentation, prettify doc style [\#204](https://github.com/skywinder/web3swift/pull/204) ([skywinder](https://github.com/skywinder))
+- V handle fix [\#201](https://github.com/skywinder/web3swift/pull/201) ([BaldyAsh](https://github.com/BaldyAsh))
+- Update ENSBaseRegistrar.swift [\#198](https://github.com/skywinder/web3swift/pull/198) ([barrasso](https://github.com/barrasso))
+- Websockets improvements and fixes [\#189](https://github.com/skywinder/web3swift/pull/189) ([BaldyAsh](https://github.com/BaldyAsh))
+- Update ETHRegistrarController.swift [\#187](https://github.com/skywinder/web3swift/pull/187) ([barrasso](https://github.com/barrasso))
+- Update ETHRegistrarController.swift [\#183](https://github.com/skywinder/web3swift/pull/183) ([barrasso](https://github.com/barrasso))
+- Fix typo in Usage [\#182](https://github.com/skywinder/web3swift/pull/182) ([sweepty](https://github.com/sweepty))
+- Expose errorDescription. [\#181](https://github.com/skywinder/web3swift/pull/181) ([andresousa](https://github.com/andresousa))
+- Update ENS Resolver [\#180](https://github.com/skywinder/web3swift/pull/180) ([barrasso](https://github.com/barrasso))
-## [2.2.0](https://github.com/matter-labs/web3swift/tree/2.2.0) (2019-04-30)
+## [2.2.0](https://github.com/skywinder/web3swift/tree/2.2.0) (2019-04-30)
-[Full Changelog](https://github.com/matter-labs/web3swift/compare/2.1.6...2.2.0)
+[Full Changelog](https://github.com/skywinder/web3swift/compare/2.1.6...2.2.0)
**Closed issues:**
-- Failed to fetch gas estimate [\#178](https://github.com/matter-labs/web3swift/issues/178)
+- Failed to fetch gas estimate [\#178](https://github.com/skywinder/web3swift/issues/178)
**Merged pull requests:**
-- 2.2.0 [\#179](https://github.com/matter-labs/web3swift/pull/179) ([BaldyAsh](https://github.com/BaldyAsh))
+- 2.2.0 [\#179](https://github.com/skywinder/web3swift/pull/179) ([BaldyAsh](https://github.com/BaldyAsh))
-## [2.1.6](https://github.com/matter-labs/web3swift/tree/2.1.6) (2019-04-26)
+## [2.1.6](https://github.com/skywinder/web3swift/tree/2.1.6) (2019-04-26)
-[Full Changelog](https://github.com/matter-labs/web3swift/compare/2.1.5...2.1.6)
+[Full Changelog](https://github.com/skywinder/web3swift/compare/2.1.5...2.1.6)
**Merged pull requests:**
-- 2.1.6 [\#175](https://github.com/matter-labs/web3swift/pull/175) ([BaldyAsh](https://github.com/BaldyAsh))
-- Quickfix ens [\#174](https://github.com/matter-labs/web3swift/pull/174) ([BaldyAsh](https://github.com/BaldyAsh))
+- 2.1.6 [\#175](https://github.com/skywinder/web3swift/pull/175) ([BaldyAsh](https://github.com/BaldyAsh))
+- Quickfix ens [\#174](https://github.com/skywinder/web3swift/pull/174) ([BaldyAsh](https://github.com/BaldyAsh))
-## [2.1.5](https://github.com/matter-labs/web3swift/tree/2.1.5) (2019-04-24)
+## [2.1.5](https://github.com/skywinder/web3swift/tree/2.1.5) (2019-04-24)
-[Full Changelog](https://github.com/matter-labs/web3swift/compare/2.1.4...2.1.5)
+[Full Changelog](https://github.com/skywinder/web3swift/compare/2.1.4...2.1.5)
**Merged pull requests:**
-- Documentation update [\#153](https://github.com/matter-labs/web3swift/pull/153) ([BaldyAsh](https://github.com/BaldyAsh))
+- Documentation update [\#153](https://github.com/skywinder/web3swift/pull/153) ([BaldyAsh](https://github.com/BaldyAsh))
-## [2.1.4](https://github.com/matter-labs/web3swift/tree/2.1.4) (2019-04-24)
+## [2.1.4](https://github.com/skywinder/web3swift/tree/2.1.4) (2019-04-24)
-[Full Changelog](https://github.com/matter-labs/web3swift/compare/2.1.3...2.1.4)
+[Full Changelog](https://github.com/skywinder/web3swift/compare/2.1.3...2.1.4)
**Fixed bugs:**
-- Cannot load module 'Web3swift' as 'web3swift [\#133](https://github.com/matter-labs/web3swift/issues/133)
+- Cannot load module 'Web3swift' as 'web3swift [\#133](https://github.com/skywinder/web3swift/issues/133)
**Closed issues:**
-- How to convert 21000 BigUInt estimated gas price into Wei ? [\#163](https://github.com/matter-labs/web3swift/issues/163)
-- ENS Permanent Registrar Support [\#159](https://github.com/matter-labs/web3swift/issues/159)
-- web3swift 2.1.3 [\#154](https://github.com/matter-labs/web3swift/issues/154)
-- Sending ETH always results in zero value [\#149](https://github.com/matter-labs/web3swift/issues/149)
-- WebSockets subscriptions [\#145](https://github.com/matter-labs/web3swift/issues/145)
-- 依赖该库生成framework,真机情况下会出现问题 [\#143](https://github.com/matter-labs/web3swift/issues/143)
-- Building fails with compilation errors [\#140](https://github.com/matter-labs/web3swift/issues/140)
+- How to convert 21000 BigUInt estimated gas price into Wei ? [\#163](https://github.com/skywinder/web3swift/issues/163)
+- ENS Permanent Registrar Support [\#159](https://github.com/skywinder/web3swift/issues/159)
+- web3swift 2.1.3 [\#154](https://github.com/skywinder/web3swift/issues/154)
+- Sending ETH always results in zero value [\#149](https://github.com/skywinder/web3swift/issues/149)
+- WebSockets subscriptions [\#145](https://github.com/skywinder/web3swift/issues/145)
+- 依赖该库生成framework,真机情况下会出现问题 [\#143](https://github.com/skywinder/web3swift/issues/143)
+- Building fails with compilation errors [\#140](https://github.com/skywinder/web3swift/issues/140)
**Merged pull requests:**
-- Fix travis [\#169](https://github.com/matter-labs/web3swift/pull/169) ([BaldyAsh](https://github.com/BaldyAsh))
-- Fix warnings [\#168](https://github.com/matter-labs/web3swift/pull/168) ([BaldyAsh](https://github.com/BaldyAsh))
-- Added reverse registrar [\#165](https://github.com/matter-labs/web3swift/pull/165) ([BaldyAsh](https://github.com/BaldyAsh))
-- WIP: ENS BaseRegistrar and RegistrarController support [\#162](https://github.com/matter-labs/web3swift/pull/162) ([BaldyAsh](https://github.com/BaldyAsh))
-- Updated example to 2.1.3 [\#158](https://github.com/matter-labs/web3swift/pull/158) ([BaldyAsh](https://github.com/BaldyAsh))
+- Fix travis [\#169](https://github.com/skywinder/web3swift/pull/169) ([BaldyAsh](https://github.com/BaldyAsh))
+- Fix warnings [\#168](https://github.com/skywinder/web3swift/pull/168) ([BaldyAsh](https://github.com/BaldyAsh))
+- Added reverse registrar [\#165](https://github.com/skywinder/web3swift/pull/165) ([BaldyAsh](https://github.com/BaldyAsh))
+- WIP: ENS BaseRegistrar and RegistrarController support [\#162](https://github.com/skywinder/web3swift/pull/162) ([BaldyAsh](https://github.com/BaldyAsh))
+- Updated example to 2.1.3 [\#158](https://github.com/skywinder/web3swift/pull/158) ([BaldyAsh](https://github.com/BaldyAsh))
-## [2.1.3](https://github.com/matter-labs/web3swift/tree/2.1.3) (2019-04-06)
+## [2.1.3](https://github.com/skywinder/web3swift/tree/2.1.3) (2019-04-06)
-[Full Changelog](https://github.com/matter-labs/web3swift/compare/2.1.2...2.1.3)
+[Full Changelog](https://github.com/skywinder/web3swift/compare/2.1.2...2.1.3)
**Implemented enhancements:**
-- WIP: WebSockets subscriptions [\#144](https://github.com/matter-labs/web3swift/pull/144) ([BaldyAsh](https://github.com/BaldyAsh))
+- WIP: WebSockets subscriptions [\#144](https://github.com/skywinder/web3swift/pull/144) ([BaldyAsh](https://github.com/BaldyAsh))
**Closed issues:**
-- Use custom JSONRPCmethod and Units [\#148](https://github.com/matter-labs/web3swift/issues/148)
-- ERC20 some functions are not working [\#146](https://github.com/matter-labs/web3swift/issues/146)
-- fix `pod install` absolute paths [\#97](https://github.com/matter-labs/web3swift/issues/97)
-- Installing issue by pod [\#76](https://github.com/matter-labs/web3swift/issues/76)
+- Use custom JSONRPCmethod and Units [\#148](https://github.com/skywinder/web3swift/issues/148)
+- ERC20 some functions are not working [\#146](https://github.com/skywinder/web3swift/issues/146)
+- fix `pod install` absolute paths [\#97](https://github.com/skywinder/web3swift/issues/97)
+- Installing issue by pod [\#76](https://github.com/skywinder/web3swift/issues/76)
**Merged pull requests:**
-- 2.1.3 fix No2 [\#152](https://github.com/matter-labs/web3swift/pull/152) ([BaldyAsh](https://github.com/BaldyAsh))
-- 2.1.3 fix [\#151](https://github.com/matter-labs/web3swift/pull/151) ([BaldyAsh](https://github.com/BaldyAsh))
-- 2.1.3 [\#150](https://github.com/matter-labs/web3swift/pull/150) ([BaldyAsh](https://github.com/BaldyAsh))
+- 2.1.3 fix No2 [\#152](https://github.com/skywinder/web3swift/pull/152) ([BaldyAsh](https://github.com/BaldyAsh))
+- 2.1.3 fix [\#151](https://github.com/skywinder/web3swift/pull/151) ([BaldyAsh](https://github.com/BaldyAsh))
+- 2.1.3 [\#150](https://github.com/skywinder/web3swift/pull/150) ([BaldyAsh](https://github.com/BaldyAsh))
-## [2.1.2](https://github.com/matter-labs/web3swift/tree/2.1.2) (2019-03-30)
+## [2.1.2](https://github.com/skywinder/web3swift/tree/2.1.2) (2019-03-30)
-[Full Changelog](https://github.com/matter-labs/web3swift/compare/2.1.1...2.1.2)
+[Full Changelog](https://github.com/skywinder/web3swift/compare/2.1.1...2.1.2)
**Merged pull requests:**
-- Swift 5 update [\#141](https://github.com/matter-labs/web3swift/pull/141) ([BaldyAsh](https://github.com/BaldyAsh))
-- Swift 5 update [\#139](https://github.com/matter-labs/web3swift/pull/139) ([BaldyAsh](https://github.com/BaldyAsh))
-- 2.1.1 [\#136](https://github.com/matter-labs/web3swift/pull/136) ([BaldyAsh](https://github.com/BaldyAsh))
+- Swift 5 update [\#141](https://github.com/skywinder/web3swift/pull/141) ([BaldyAsh](https://github.com/BaldyAsh))
+- Swift 5 update [\#139](https://github.com/skywinder/web3swift/pull/139) ([BaldyAsh](https://github.com/BaldyAsh))
+- 2.1.1 [\#136](https://github.com/skywinder/web3swift/pull/136) ([BaldyAsh](https://github.com/BaldyAsh))
-## [2.1.1](https://github.com/matter-labs/web3swift/tree/2.1.1) (2019-03-26)
+## [2.1.1](https://github.com/skywinder/web3swift/tree/2.1.1) (2019-03-26)
-[Full Changelog](https://github.com/matter-labs/web3swift/compare/2.1.0...2.1.1)
+[Full Changelog](https://github.com/skywinder/web3swift/compare/2.1.0...2.1.1)
**Implemented enhancements:**
-- Support ST-20 [\#103](https://github.com/matter-labs/web3swift/issues/103)
+- Support ST-20 [\#103](https://github.com/skywinder/web3swift/issues/103)
**Closed issues:**
-- Expected to decode Array\ but found a dictionary instead. [\#128](https://github.com/matter-labs/web3swift/issues/128)
-- Decoding Input/Output data [\#127](https://github.com/matter-labs/web3swift/issues/127)
-- nodeError\("replacement transaction underpriced"\) [\#42](https://github.com/matter-labs/web3swift/issues/42)
+- Expected to decode Array\ but found a dictionary instead. [\#128](https://github.com/skywinder/web3swift/issues/128)
+- Decoding Input/Output data [\#127](https://github.com/skywinder/web3swift/issues/127)
+- nodeError\("replacement transaction underpriced"\) [\#42](https://github.com/skywinder/web3swift/issues/42)
**Merged pull requests:**
-- Fix/podspec [\#135](https://github.com/matter-labs/web3swift/pull/135) ([BaldyAsh](https://github.com/BaldyAsh))
-- let some functions public for customization [\#132](https://github.com/matter-labs/web3swift/pull/132) ([scottphc](https://github.com/scottphc))
-- WIP: ST-20 and Security Token support [\#130](https://github.com/matter-labs/web3swift/pull/130) ([BaldyAsh](https://github.com/BaldyAsh))
-- Fix/remove deprecated [\#120](https://github.com/matter-labs/web3swift/pull/120) ([BaldyAsh](https://github.com/BaldyAsh))
+- Fix/podspec [\#135](https://github.com/skywinder/web3swift/pull/135) ([BaldyAsh](https://github.com/BaldyAsh))
+- let some functions public for customization [\#132](https://github.com/skywinder/web3swift/pull/132) ([scottphc](https://github.com/scottphc))
+- WIP: ST-20 and Security Token support [\#130](https://github.com/skywinder/web3swift/pull/130) ([BaldyAsh](https://github.com/BaldyAsh))
+- Fix/remove deprecated [\#120](https://github.com/skywinder/web3swift/pull/120) ([BaldyAsh](https://github.com/BaldyAsh))
-## [2.1.0](https://github.com/matter-labs/web3swift/tree/2.1.0) (2019-03-06)
+## [2.1.0](https://github.com/skywinder/web3swift/tree/2.1.0) (2019-03-06)
-[Full Changelog](https://github.com/matter-labs/web3swift/compare/2.0.4...2.1.0)
+[Full Changelog](https://github.com/skywinder/web3swift/compare/2.0.4...2.1.0)
**Implemented enhancements:**
-- Support ERC-888 [\#102](https://github.com/matter-labs/web3swift/issues/102)
-- Support SRC-20 [\#101](https://github.com/matter-labs/web3swift/issues/101)
-- Support S3 [\#99](https://github.com/matter-labs/web3swift/issues/99)
-- Support ERC-1400 [\#98](https://github.com/matter-labs/web3swift/issues/98)
-- ERC-165 support [\#82](https://github.com/matter-labs/web3swift/issues/82)
-- ERC-777 support [\#81](https://github.com/matter-labs/web3swift/issues/81)
-- How do I add an account to a node [\#78](https://github.com/matter-labs/web3swift/issues/78)
-- Support Web3View functionality [\#30](https://github.com/matter-labs/web3swift/issues/30)
+- Support ERC-888 [\#102](https://github.com/skywinder/web3swift/issues/102)
+- Support SRC-20 [\#101](https://github.com/skywinder/web3swift/issues/101)
+- Support S3 [\#99](https://github.com/skywinder/web3swift/issues/99)
+- Support ERC-1400 [\#98](https://github.com/skywinder/web3swift/issues/98)
+- ERC-165 support [\#82](https://github.com/skywinder/web3swift/issues/82)
+- ERC-777 support [\#81](https://github.com/skywinder/web3swift/issues/81)
+- How do I add an account to a node [\#78](https://github.com/skywinder/web3swift/issues/78)
+- ERC20 API Support [\#41](https://github.com/skywinder/web3swift/issues/41)
+- Support Web3View functionality [\#30](https://github.com/skywinder/web3swift/issues/30)
**Closed issues:**
-- eth\_estimateGas is not supplied the gasPrice parameter [\#118](https://github.com/matter-labs/web3swift/issues/118)
-- Carthage support missing. [\#115](https://github.com/matter-labs/web3swift/issues/115)
-- \[Utility\] Contract event listener [\#112](https://github.com/matter-labs/web3swift/issues/112)
-- Support ERC-1644 [\#111](https://github.com/matter-labs/web3swift/issues/111)
-- Support ERC-1643 [\#110](https://github.com/matter-labs/web3swift/issues/110)
-- Support ERC-1594 [\#109](https://github.com/matter-labs/web3swift/issues/109)
-- Support ERC-1410 [\#108](https://github.com/matter-labs/web3swift/issues/108)
-- Support ERC-820 [\#107](https://github.com/matter-labs/web3swift/issues/107)
-- Error: Failed to fetch gas estimate on intermediate call [\#106](https://github.com/matter-labs/web3swift/issues/106)
-- Can't use ENS in 2.0 [\#92](https://github.com/matter-labs/web3swift/issues/92)
-- Can't use EIP681 parser [\#91](https://github.com/matter-labs/web3swift/issues/91)
-- enhancement - end to end newbie instructions to deploy erc20 token locally / initialize wallets - then successfully transfer it in app [\#89](https://github.com/matter-labs/web3swift/issues/89)
-- Can you support objective-c [\#88](https://github.com/matter-labs/web3swift/issues/88)
-- SolidityType has no member 'allSatisfy'? [\#87](https://github.com/matter-labs/web3swift/issues/87)
-- How to encode data for appending constructor to bytecode for deploying contract? [\#86](https://github.com/matter-labs/web3swift/issues/86)
-- web3swift.Web3Error error 4 for get balance [\#77](https://github.com/matter-labs/web3swift/issues/77)
-- How to signed Transaction ? get raw [\#62](https://github.com/matter-labs/web3swift/issues/62)
-- how to get token using Signing Transaction [\#58](https://github.com/matter-labs/web3swift/issues/58)
-- Can the signtypedMessage function be added [\#45](https://github.com/matter-labs/web3swift/issues/45)
-- How to get Keystore by PrivateKeyData ? [\#19](https://github.com/matter-labs/web3swift/issues/19)
-- encoding name\(ens\) for sending register contract [\#15](https://github.com/matter-labs/web3swift/issues/15)
+- eth\_estimateGas is not supplied the gasPrice parameter [\#118](https://github.com/skywinder/web3swift/issues/118)
+- Carthage support missing. [\#115](https://github.com/skywinder/web3swift/issues/115)
+- \[Utility\] Contract event listener [\#112](https://github.com/skywinder/web3swift/issues/112)
+- Support ERC-1644 [\#111](https://github.com/skywinder/web3swift/issues/111)
+- Support ERC-1643 [\#110](https://github.com/skywinder/web3swift/issues/110)
+- Support ERC-1594 [\#109](https://github.com/skywinder/web3swift/issues/109)
+- Support ERC-1410 [\#108](https://github.com/skywinder/web3swift/issues/108)
+- Support ERC-820 [\#107](https://github.com/skywinder/web3swift/issues/107)
+- Error: Failed to fetch gas estimate on intermediate call [\#106](https://github.com/skywinder/web3swift/issues/106)
+- Can't use ENS in 2.0 [\#92](https://github.com/skywinder/web3swift/issues/92)
+- Can't use EIP681 parser [\#91](https://github.com/skywinder/web3swift/issues/91)
+- enhancement - end to end newbie instructions to deploy erc20 token locally / initialize wallets - then successfully transfer it in app [\#89](https://github.com/skywinder/web3swift/issues/89)
+- Can you support objective-c [\#88](https://github.com/skywinder/web3swift/issues/88)
+- SolidityType has no member 'allSatisfy'? [\#87](https://github.com/skywinder/web3swift/issues/87)
+- How to encode data for appending constructor to bytecode for deploying contract? [\#86](https://github.com/skywinder/web3swift/issues/86)
+- web3swift.Web3Error error 4 for get balance [\#77](https://github.com/skywinder/web3swift/issues/77)
+- How to signed Transaction ? get raw [\#62](https://github.com/skywinder/web3swift/issues/62)
+- how to get token using Signing Transaction [\#58](https://github.com/skywinder/web3swift/issues/58)
+- Can the signtypedMessage function be added [\#45](https://github.com/skywinder/web3swift/issues/45)
+- Migration to web3 format \(create account\) [\#40](https://github.com/skywinder/web3swift/issues/40)
+- How to get Keystore by PrivateKeyData ? [\#19](https://github.com/skywinder/web3swift/issues/19)
+- encoding name\(ens\) for sending register contract [\#15](https://github.com/skywinder/web3swift/issues/15)
**Merged pull requests:**
-- 2.1.0 [\#124](https://github.com/matter-labs/web3swift/pull/124) ([BaldyAsh](https://github.com/BaldyAsh))
-- Fix/remove deprecated [\#123](https://github.com/matter-labs/web3swift/pull/123) ([BaldyAsh](https://github.com/BaldyAsh))
-- fixed estimate gas problem [\#119](https://github.com/matter-labs/web3swift/pull/119) ([BaldyAsh](https://github.com/BaldyAsh))
-- Added Deed and Registrar ABI to Web3+Utils [\#114](https://github.com/matter-labs/web3swift/pull/114) ([barrasso](https://github.com/barrasso))
-- Fixed EIP681 and EIP67, added and improved a lot of ERCs [\#113](https://github.com/matter-labs/web3swift/pull/113) ([BaldyAsh](https://github.com/BaldyAsh))
-- Documentation [\#105](https://github.com/matter-labs/web3swift/pull/105) ([BaldyAsh](https://github.com/BaldyAsh))
-- recent changes [\#104](https://github.com/matter-labs/web3swift/pull/104) ([BaldyAsh](https://github.com/BaldyAsh))
-- Migration to 2.0 [\#96](https://github.com/matter-labs/web3swift/pull/96) ([BaldyAsh](https://github.com/BaldyAsh))
-- Master to develop for 2.0.2 [\#94](https://github.com/matter-labs/web3swift/pull/94) ([shamatar](https://github.com/shamatar))
-- Feature/readme improvement [\#85](https://github.com/matter-labs/web3swift/pull/85) ([BaldyAsh](https://github.com/BaldyAsh))
-- Get recent develop changes [\#80](https://github.com/matter-labs/web3swift/pull/80) ([BaldyAsh](https://github.com/BaldyAsh))
-
-## [2.0.4](https://github.com/matter-labs/web3swift/tree/2.0.4) (2018-11-20)
+- 2.1.0 [\#124](https://github.com/skywinder/web3swift/pull/124) ([BaldyAsh](https://github.com/BaldyAsh))
+- Fix/remove deprecated [\#123](https://github.com/skywinder/web3swift/pull/123) ([BaldyAsh](https://github.com/BaldyAsh))
+- fixed estimate gas problem [\#119](https://github.com/skywinder/web3swift/pull/119) ([BaldyAsh](https://github.com/BaldyAsh))
+- Added Deed and Registrar ABI to Web3+Utils [\#114](https://github.com/skywinder/web3swift/pull/114) ([barrasso](https://github.com/barrasso))
+- Fixed EIP681 and EIP67, added and improved a lot of ERCs [\#113](https://github.com/skywinder/web3swift/pull/113) ([BaldyAsh](https://github.com/BaldyAsh))
+- Documentation [\#105](https://github.com/skywinder/web3swift/pull/105) ([BaldyAsh](https://github.com/BaldyAsh))
+- recent changes [\#104](https://github.com/skywinder/web3swift/pull/104) ([BaldyAsh](https://github.com/BaldyAsh))
+- Migration to 2.0 [\#96](https://github.com/skywinder/web3swift/pull/96) ([BaldyAsh](https://github.com/BaldyAsh))
+- Master to develop for 2.0.2 [\#94](https://github.com/skywinder/web3swift/pull/94) ([shamatar](https://github.com/shamatar))
+- 2.0.2 [\#93](https://github.com/skywinder/web3swift/pull/93) ([shamatar](https://github.com/shamatar))
+- Feature/readme improvement [\#85](https://github.com/skywinder/web3swift/pull/85) ([BaldyAsh](https://github.com/BaldyAsh))
+- Get recent develop changes [\#80](https://github.com/skywinder/web3swift/pull/80) ([BaldyAsh](https://github.com/BaldyAsh))
-[Full Changelog](https://github.com/matter-labs/web3swift/compare/2.0.3...2.0.4)
+## [2.0.4](https://github.com/skywinder/web3swift/tree/2.0.4) (2018-11-20)
-**Merged pull requests:**
+[Full Changelog](https://github.com/skywinder/web3swift/compare/2.0.3...2.0.4)
-- introduce a fix for invalid value in gas estimation, call and send transactions [\#95](https://github.com/matter-labs/web3swift/pull/95) ([shamatar](https://github.com/shamatar))
-- 2.0.2 [\#93](https://github.com/matter-labs/web3swift/pull/93) ([shamatar](https://github.com/shamatar))
+## [2.0.3](https://github.com/skywinder/web3swift/tree/2.0.3) (2018-11-20)
-## [2.0.3](https://github.com/matter-labs/web3swift/tree/2.0.3) (2018-11-20)
+[Full Changelog](https://github.com/skywinder/web3swift/compare/2.0.2...2.0.3)
-[Full Changelog](https://github.com/matter-labs/web3swift/compare/2.0.2...2.0.3)
+## [2.0.2](https://github.com/skywinder/web3swift/tree/2.0.2) (2018-11-06)
-## [2.0.2](https://github.com/matter-labs/web3swift/tree/2.0.2) (2018-11-06)
-
-[Full Changelog](https://github.com/matter-labs/web3swift/compare/2.0.1...2.0.2)
+[Full Changelog](https://github.com/skywinder/web3swift/compare/2.0.1...2.0.2)
**Merged pull requests:**
-- 2.0.1 [\#84](https://github.com/matter-labs/web3swift/pull/84) ([shamatar](https://github.com/shamatar))
+- 2.0.1 [\#84](https://github.com/skywinder/web3swift/pull/84) ([shamatar](https://github.com/shamatar))
-## [2.0.1](https://github.com/matter-labs/web3swift/tree/2.0.1) (2018-11-05)
+## [2.0.1](https://github.com/skywinder/web3swift/tree/2.0.1) (2018-11-05)
-[Full Changelog](https://github.com/matter-labs/web3swift/compare/2.0.0...2.0.1)
+[Full Changelog](https://github.com/skywinder/web3swift/compare/2.0.0...2.0.1)
**Closed issues:**
-- ENS Functionality [\#56](https://github.com/matter-labs/web3swift/issues/56)
+- ENS Functionality [\#56](https://github.com/skywinder/web3swift/issues/56)
**Merged pull requests:**
-- ENS fix [\#83](https://github.com/matter-labs/web3swift/pull/83) ([BaldyAsh](https://github.com/BaldyAsh))
+- ENS fix [\#83](https://github.com/skywinder/web3swift/pull/83) ([BaldyAsh](https://github.com/BaldyAsh))
-## [2.0.0](https://github.com/matter-labs/web3swift/tree/2.0.0) (2018-10-30)
+## [2.0.0](https://github.com/skywinder/web3swift/tree/2.0.0) (2018-10-30)
-[Full Changelog](https://github.com/matter-labs/web3swift/compare/1.5.1...2.0.0)
+[Full Changelog](https://github.com/skywinder/web3swift/compare/1.5.1...2.0.0)
**Implemented enhancements:**
-- Carthage support [\#44](https://github.com/matter-labs/web3swift/issues/44)
-- How to get pending transactions by this framework [\#36](https://github.com/matter-labs/web3swift/issues/36)
-- ENS for wallets [\#12](https://github.com/matter-labs/web3swift/issues/12)
-- Recover passphrase from BIP32 store [\#5](https://github.com/matter-labs/web3swift/issues/5)
-- ERC20 API Support [\#41](https://github.com/matter-labs/web3swift/issues/41)
+- Carthage support [\#44](https://github.com/skywinder/web3swift/issues/44)
+- How to get pending transactions by this framework [\#36](https://github.com/skywinder/web3swift/issues/36)
+- ENS for wallets [\#12](https://github.com/skywinder/web3swift/issues/12)
+- Recover passphrase from BIP32 store [\#5](https://github.com/skywinder/web3swift/issues/5)
+- ERC20 API Support [\#41](https://github.com/skywinder/web3swift/issues/41)
**Closed issues:**
-- failed to send transaction due to known transaction [\#65](https://github.com/matter-labs/web3swift/issues/65)
-- List of all transactions related to account \(private key\) [\#57](https://github.com/matter-labs/web3swift/issues/57)
-- Make A README & doc [\#46](https://github.com/matter-labs/web3swift/issues/46)
-- 'BigUInt' is ambiguous for type lookup in this conte [\#43](https://github.com/matter-labs/web3swift/issues/43)
-- Migration to web3 format \(create account\) [\#40](https://github.com/matter-labs/web3swift/issues/40)
-- Interface ideas are welcome for v2.0 [\#3](https://github.com/matter-labs/web3swift/issues/3)
+- failed to send transaction due to known transaction [\#65](https://github.com/skywinder/web3swift/issues/65)
+- List of all transactions related to account \(private key\) [\#57](https://github.com/skywinder/web3swift/issues/57)
+- Make A README & doc [\#46](https://github.com/skywinder/web3swift/issues/46)
+- 'BigUInt' is ambiguous for type lookup in this conte [\#43](https://github.com/skywinder/web3swift/issues/43)
+- Migration to web3 format \(create account\) [\#40](https://github.com/skywinder/web3swift/issues/40)
+- Interface ideas are welcome for v2.0 [\#3](https://github.com/skywinder/web3swift/issues/3)
**Merged pull requests:**
-- Carthage [\#75](https://github.com/matter-labs/web3swift/pull/75) ([BaldyAsh](https://github.com/BaldyAsh))
-- Carthage fixes [\#74](https://github.com/matter-labs/web3swift/pull/74) ([BaldyAsh](https://github.com/BaldyAsh))
+- Carthage [\#75](https://github.com/skywinder/web3swift/pull/75) ([BaldyAsh](https://github.com/BaldyAsh))
+- Carthage fixes [\#74](https://github.com/skywinder/web3swift/pull/74) ([BaldyAsh](https://github.com/BaldyAsh))
-## [1.5.1](https://github.com/matter-labs/web3swift/tree/1.5.1) (2018-10-22)
+## [1.5.1](https://github.com/skywinder/web3swift/tree/1.5.1) (2018-10-22)
-[Full Changelog](https://github.com/matter-labs/web3swift/compare/1.5...1.5.1)
+[Full Changelog](https://github.com/skywinder/web3swift/compare/1.5...1.5.1)
**Merged pull requests:**
-- Function visibility fix [\#70](https://github.com/matter-labs/web3swift/pull/70) ([shamatar](https://github.com/shamatar))
+- Function visibility fix [\#70](https://github.com/skywinder/web3swift/pull/70) ([shamatar](https://github.com/shamatar))
-## [1.5](https://github.com/matter-labs/web3swift/tree/1.5) (2018-10-18)
+## [1.5](https://github.com/skywinder/web3swift/tree/1.5) (2018-10-18)
-[Full Changelog](https://github.com/matter-labs/web3swift/compare/1.1.10...1.5)
+[Full Changelog](https://github.com/skywinder/web3swift/compare/1.1.10...1.5)
**Implemented enhancements:**
-- Can you add support for ERC-721 tokens [\#7](https://github.com/matter-labs/web3swift/issues/7)
+- Can you add support for ERC-721 tokens [\#7](https://github.com/skywinder/web3swift/issues/7)
**Closed issues:**
-- Creating a new wallet is too slow [\#63](https://github.com/matter-labs/web3swift/issues/63)
-- need to update for Xcode10 [\#49](https://github.com/matter-labs/web3swift/issues/49)
-- Web3.Utils.formatToEthereumUnits [\#48](https://github.com/matter-labs/web3swift/issues/48)
+- Creating a new wallet is too slow [\#63](https://github.com/skywinder/web3swift/issues/63)
+- need to update for Xcode10 [\#49](https://github.com/skywinder/web3swift/issues/49)
+- Web3.Utils.formatToEthereumUnits [\#48](https://github.com/skywinder/web3swift/issues/48)
+- Interface ideas are welcome for v2.0 [\#3](https://github.com/skywinder/web3swift/issues/3)
**Merged pull requests:**
-- Add TxPool and ERC721 native class [\#68](https://github.com/matter-labs/web3swift/pull/68) ([shamatar](https://github.com/shamatar))
-- Feature/erc721 [\#67](https://github.com/matter-labs/web3swift/pull/67) ([BaldyAsh](https://github.com/BaldyAsh))
-- Feature/adding logo [\#66](https://github.com/matter-labs/web3swift/pull/66) ([BaldyAsh](https://github.com/BaldyAsh))
-- adds txpool function and its local node test [\#64](https://github.com/matter-labs/web3swift/pull/64) ([currybab](https://github.com/currybab))
-- License got reverted somewhere after PRs [\#60](https://github.com/matter-labs/web3swift/pull/60) ([shamatar](https://github.com/shamatar))
+- Add TxPool and ERC721 native class [\#68](https://github.com/skywinder/web3swift/pull/68) ([shamatar](https://github.com/shamatar))
+- Feature/erc721 [\#67](https://github.com/skywinder/web3swift/pull/67) ([BaldyAsh](https://github.com/BaldyAsh))
+- Feature/adding logo [\#66](https://github.com/skywinder/web3swift/pull/66) ([BaldyAsh](https://github.com/BaldyAsh))
+- adds txpool function and its local node test [\#64](https://github.com/skywinder/web3swift/pull/64) ([currybab](https://github.com/currybab))
+- License got reverted somewhere after PRs [\#60](https://github.com/skywinder/web3swift/pull/60) ([shamatar](https://github.com/shamatar))
-## [1.1.10](https://github.com/matter-labs/web3swift/tree/1.1.10) (2018-10-04)
+## [1.1.10](https://github.com/skywinder/web3swift/tree/1.1.10) (2018-10-04)
-[Full Changelog](https://github.com/matter-labs/web3swift/compare/1.1.9...1.1.10)
+[Full Changelog](https://github.com/skywinder/web3swift/compare/1.1.9...1.1.10)
**Merged pull requests:**
-- Preliminary ENS support, start module splitting [\#59](https://github.com/matter-labs/web3swift/pull/59) ([shamatar](https://github.com/shamatar))
-- Feature/readme improvement [\#55](https://github.com/matter-labs/web3swift/pull/55) ([BaldyAsh](https://github.com/BaldyAsh))
-- Feature/support obj c [\#54](https://github.com/matter-labs/web3swift/pull/54) ([BaldyAsh](https://github.com/BaldyAsh))
-- Feature/ENSsupport [\#53](https://github.com/matter-labs/web3swift/pull/53) ([FesenkoG](https://github.com/FesenkoG))
-- Add Travis configuration [\#52](https://github.com/matter-labs/web3swift/pull/52) ([skywinder](https://github.com/skywinder))
-- Added ERC-20 token for testing web3swift lib [\#50](https://github.com/matter-labs/web3swift/pull/50) ([BaldyAsh](https://github.com/BaldyAsh))
+- Preliminary ENS support, start module splitting [\#59](https://github.com/skywinder/web3swift/pull/59) ([shamatar](https://github.com/shamatar))
+- Feature/readme improvement [\#55](https://github.com/skywinder/web3swift/pull/55) ([BaldyAsh](https://github.com/BaldyAsh))
+- Feature/support obj c [\#54](https://github.com/skywinder/web3swift/pull/54) ([BaldyAsh](https://github.com/BaldyAsh))
+- Feature/ENSsupport [\#53](https://github.com/skywinder/web3swift/pull/53) ([FesenkoG](https://github.com/FesenkoG))
+- Add Travis configuration [\#52](https://github.com/skywinder/web3swift/pull/52) ([skywinder](https://github.com/skywinder))
+- Added ERC-20 token for testing web3swift lib [\#50](https://github.com/skywinder/web3swift/pull/50) ([BaldyAsh](https://github.com/BaldyAsh))
-## [1.1.9](https://github.com/matter-labs/web3swift/tree/1.1.9) (2018-09-18)
+## [1.1.9](https://github.com/skywinder/web3swift/tree/1.1.9) (2018-09-18)
-[Full Changelog](https://github.com/matter-labs/web3swift/compare/1.1.7...1.1.9)
+[Full Changelog](https://github.com/skywinder/web3swift/compare/1.1.7...1.1.9)
**Fixed bugs:**
-- eth.getAccounts\(\) function returns an empty address Array [\#24](https://github.com/matter-labs/web3swift/issues/24)
-- EIP681 bug fixes, accessibility in Function changed [\#35](https://github.com/matter-labs/web3swift/pull/35) ([FesenkoG](https://github.com/FesenkoG))
+- eth.getAccounts\(\) function returns an empty address Array [\#24](https://github.com/skywinder/web3swift/issues/24)
+- EIP681 bug fixes, accessibility in Function changed [\#35](https://github.com/skywinder/web3swift/pull/35) ([FesenkoG](https://github.com/FesenkoG))
**Closed issues:**
-- the version 1.1.6 couldn't from password and keystore to get the privateKey [\#32](https://github.com/matter-labs/web3swift/issues/32)
-- Need implementation of EIP-681 parsing [\#25](https://github.com/matter-labs/web3swift/issues/25)
+- the version 1.1.6 couldn't from password and keystore to get the privateKey [\#32](https://github.com/skywinder/web3swift/issues/32)
+- Need implementation of EIP-681 parsing [\#25](https://github.com/skywinder/web3swift/issues/25)
**Merged pull requests:**
-- Update for XCode 10 [\#39](https://github.com/matter-labs/web3swift/pull/39) ([shamatar](https://github.com/shamatar))
-- Basic ENS support added, EIP681 parsing supports ENS from now. [\#38](https://github.com/matter-labs/web3swift/pull/38) ([FesenkoG](https://github.com/FesenkoG))
+- Update for XCode 10 [\#39](https://github.com/skywinder/web3swift/pull/39) ([shamatar](https://github.com/shamatar))
+- Basic ENS support added, EIP681 parsing supports ENS from now. [\#38](https://github.com/skywinder/web3swift/pull/38) ([FesenkoG](https://github.com/FesenkoG))
-## [1.1.7](https://github.com/matter-labs/web3swift/tree/1.1.7) (2018-09-13)
+## [1.1.7](https://github.com/skywinder/web3swift/tree/1.1.7) (2018-09-13)
-[Full Changelog](https://github.com/matter-labs/web3swift/compare/1.1.6...1.1.7)
+[Full Changelog](https://github.com/skywinder/web3swift/compare/1.1.6...1.1.7)
**Fixed bugs:**
-- Thread blocked [\#16](https://github.com/matter-labs/web3swift/issues/16)
+- Thread blocked [\#16](https://github.com/skywinder/web3swift/issues/16)
**Closed issues:**
-- How to create same address and keystore by mnemonics? [\#22](https://github.com/matter-labs/web3swift/issues/22)
+- How to create same address and keystore by mnemonics? [\#22](https://github.com/skywinder/web3swift/issues/22)
**Merged pull requests:**
-- Fix ethereum address parsing, add readme [\#34](https://github.com/matter-labs/web3swift/pull/34) ([shamatar](https://github.com/shamatar))
-- complete EIP681, fix the most stupid Ethereum address parsing [\#33](https://github.com/matter-labs/web3swift/pull/33) ([shamatar](https://github.com/shamatar))
-- Add examples to readme, prettify formatting [\#31](https://github.com/matter-labs/web3swift/pull/31) ([skywinder](https://github.com/skywinder))
-- continue eip681 work [\#27](https://github.com/matter-labs/web3swift/pull/27) ([shamatar](https://github.com/shamatar))
-- Implement EIP681 parser \(untested\) [\#26](https://github.com/matter-labs/web3swift/pull/26) ([shamatar](https://github.com/shamatar))
-- Change access control of function fromRaw in struct EthereumTransaction [\#11](https://github.com/matter-labs/web3swift/pull/11) ([Plazmathron](https://github.com/Plazmathron))
+- Fix ethereum address parsing, add readme [\#34](https://github.com/skywinder/web3swift/pull/34) ([shamatar](https://github.com/shamatar))
+- complete EIP681, fix the most stupid Ethereum address parsing [\#33](https://github.com/skywinder/web3swift/pull/33) ([shamatar](https://github.com/shamatar))
+- Add examples to readme, prettify formatting [\#31](https://github.com/skywinder/web3swift/pull/31) ([skywinder](https://github.com/skywinder))
+- continue eip681 work [\#27](https://github.com/skywinder/web3swift/pull/27) ([shamatar](https://github.com/shamatar))
+- Implement EIP681 parser \(untested\) [\#26](https://github.com/skywinder/web3swift/pull/26) ([shamatar](https://github.com/shamatar))
+- Change access control of function fromRaw in struct EthereumTransaction [\#11](https://github.com/skywinder/web3swift/pull/11) ([Plazmathron](https://github.com/Plazmathron))
-## [1.1.6](https://github.com/matter-labs/web3swift/tree/1.1.6) (2018-09-04)
+## [1.1.6](https://github.com/skywinder/web3swift/tree/1.1.6) (2018-09-04)
-[Full Changelog](https://github.com/matter-labs/web3swift/compare/1.1.5...1.1.6)
+[Full Changelog](https://github.com/skywinder/web3swift/compare/1.1.5...1.1.6)
**Merged pull requests:**
-- Quick fix for scrypt performance [\#17](https://github.com/matter-labs/web3swift/pull/17) ([shamatar](https://github.com/shamatar))
-- adding description string to Web3Error [\#1](https://github.com/matter-labs/web3swift/pull/1) ([GabCas](https://github.com/GabCas))
+- Quick fix for scrypt performance [\#17](https://github.com/skywinder/web3swift/pull/17) ([shamatar](https://github.com/shamatar))
+- adding description string to Web3Error [\#1](https://github.com/skywinder/web3swift/pull/1) ([GabCas](https://github.com/GabCas))
+
+## [1.1.5](https://github.com/skywinder/web3swift/tree/1.1.5) (2018-08-10)
+
+[Full Changelog](https://github.com/skywinder/web3swift/compare/1.1.1...1.1.5)
+
+## [1.1.1](https://github.com/skywinder/web3swift/tree/1.1.1) (2018-07-30)
+
+[Full Changelog](https://github.com/skywinder/web3swift/compare/1.1.0...1.1.1)
+
+## [1.1.0](https://github.com/skywinder/web3swift/tree/1.1.0) (2018-07-27)
+
+[Full Changelog](https://github.com/skywinder/web3swift/compare/1.0.1...1.1.0)
+
+## [1.0.1](https://github.com/skywinder/web3swift/tree/1.0.1) (2018-07-12)
+
+[Full Changelog](https://github.com/skywinder/web3swift/compare/1.0.0...1.0.1)
+
+## [1.0.0](https://github.com/skywinder/web3swift/tree/1.0.0) (2018-07-04)
+
+[Full Changelog](https://github.com/skywinder/web3swift/compare/0.9.0...1.0.0)
+
+## [0.9.0](https://github.com/skywinder/web3swift/tree/0.9.0) (2018-06-18)
+
+[Full Changelog](https://github.com/skywinder/web3swift/compare/0.8.1...0.9.0)
+
+## [0.8.1](https://github.com/skywinder/web3swift/tree/0.8.1) (2018-06-10)
+
+[Full Changelog](https://github.com/skywinder/web3swift/compare/0.8.0...0.8.1)
+
+## [0.8.0](https://github.com/skywinder/web3swift/tree/0.8.0) (2018-05-31)
+
+[Full Changelog](https://github.com/skywinder/web3swift/compare/0.7.9...0.8.0)
+
+## [0.7.9](https://github.com/skywinder/web3swift/tree/0.7.9) (2018-05-31)
+
+[Full Changelog](https://github.com/skywinder/web3swift/compare/0.7.0...0.7.9)
+
+## [0.7.0](https://github.com/skywinder/web3swift/tree/0.7.0) (2018-05-11)
+
+[Full Changelog](https://github.com/skywinder/web3swift/compare/0.6.0...0.7.0)
+
+## [0.6.0](https://github.com/skywinder/web3swift/tree/0.6.0) (2018-04-24)
+
+[Full Changelog](https://github.com/skywinder/web3swift/compare/0.5.6...0.6.0)
+
+## [0.5.6](https://github.com/skywinder/web3swift/tree/0.5.6) (2018-04-20)
+
+[Full Changelog](https://github.com/skywinder/web3swift/compare/0.5.5...0.5.6)
+
+## [0.5.5](https://github.com/skywinder/web3swift/tree/0.5.5) (2018-04-18)
+
+[Full Changelog](https://github.com/skywinder/web3swift/compare/0.5.4...0.5.5)
+
+## [0.5.4](https://github.com/skywinder/web3swift/tree/0.5.4) (2018-04-16)
+
+[Full Changelog](https://github.com/skywinder/web3swift/compare/0.5.3...0.5.4)
+
+## [0.5.3](https://github.com/skywinder/web3swift/tree/0.5.3) (2018-04-16)
+
+[Full Changelog](https://github.com/skywinder/web3swift/compare/0.5.2...0.5.3)
+
+## [0.5.2](https://github.com/skywinder/web3swift/tree/0.5.2) (2018-04-16)
+
+[Full Changelog](https://github.com/skywinder/web3swift/compare/0.5.1...0.5.2)
+
+## [0.5.1](https://github.com/skywinder/web3swift/tree/0.5.1) (2018-04-11)
+
+[Full Changelog](https://github.com/skywinder/web3swift/compare/0.5.0...0.5.1)
+
+## [0.5.0](https://github.com/skywinder/web3swift/tree/0.5.0) (2018-04-10)
+
+[Full Changelog](https://github.com/skywinder/web3swift/compare/0.4.1...0.5.0)
+
+## [0.4.1](https://github.com/skywinder/web3swift/tree/0.4.1) (2018-04-07)
+
+[Full Changelog](https://github.com/skywinder/web3swift/compare/0.4.0...0.4.1)
+
+## [0.4.0](https://github.com/skywinder/web3swift/tree/0.4.0) (2018-04-04)
+
+[Full Changelog](https://github.com/skywinder/web3swift/compare/0.3.6...0.4.0)
+
+## [0.3.6](https://github.com/skywinder/web3swift/tree/0.3.6) (2018-04-02)
+
+[Full Changelog](https://github.com/skywinder/web3swift/compare/0.3.5...0.3.6)
+
+## [0.3.5](https://github.com/skywinder/web3swift/tree/0.3.5) (2018-03-20)
+
+[Full Changelog](https://github.com/skywinder/web3swift/compare/0.3.4...0.3.5)
+
+## [0.3.4](https://github.com/skywinder/web3swift/tree/0.3.4) (2018-03-18)
+
+[Full Changelog](https://github.com/skywinder/web3swift/compare/0.3.3...0.3.4)
+
+## [0.3.3](https://github.com/skywinder/web3swift/tree/0.3.3) (2018-03-05)
+
+[Full Changelog](https://github.com/skywinder/web3swift/compare/0.3.2...0.3.3)
+
+## [0.3.2](https://github.com/skywinder/web3swift/tree/0.3.2) (2018-03-03)
+
+[Full Changelog](https://github.com/skywinder/web3swift/compare/0.3.1...0.3.2)
+
+## [0.3.1](https://github.com/skywinder/web3swift/tree/0.3.1) (2018-03-01)
+
+[Full Changelog](https://github.com/skywinder/web3swift/compare/0.3.0...0.3.1)
+
+## [0.3.0](https://github.com/skywinder/web3swift/tree/0.3.0) (2018-02-27)
+
+[Full Changelog](https://github.com/skywinder/web3swift/compare/0.2.99...0.3.0)
+
+## [0.2.99](https://github.com/skywinder/web3swift/tree/0.2.99) (2018-02-27)
+
+[Full Changelog](https://github.com/skywinder/web3swift/compare/0.2.98...0.2.99)
+
+## [0.2.98](https://github.com/skywinder/web3swift/tree/0.2.98) (2018-02-27)
+
+[Full Changelog](https://github.com/skywinder/web3swift/compare/0.2.12...0.2.98)
+
+## [0.2.12](https://github.com/skywinder/web3swift/tree/0.2.12) (2018-02-01)
+
+[Full Changelog](https://github.com/skywinder/web3swift/compare/0.2.11...0.2.12)
+
+## [0.2.11](https://github.com/skywinder/web3swift/tree/0.2.11) (2018-02-01)
+
+[Full Changelog](https://github.com/skywinder/web3swift/compare/0.2.10...0.2.11)
+
+## [0.2.10](https://github.com/skywinder/web3swift/tree/0.2.10) (2018-01-31)
+
+[Full Changelog](https://github.com/skywinder/web3swift/compare/0.2.9...0.2.10)
+
+## [0.2.9](https://github.com/skywinder/web3swift/tree/0.2.9) (2018-01-29)
+
+[Full Changelog](https://github.com/skywinder/web3swift/compare/0.2.8...0.2.9)
+
+## [0.2.8](https://github.com/skywinder/web3swift/tree/0.2.8) (2018-01-18)
+
+[Full Changelog](https://github.com/skywinder/web3swift/compare/0.2.7...0.2.8)
+
+## [0.2.7](https://github.com/skywinder/web3swift/tree/0.2.7) (2018-01-15)
+
+[Full Changelog](https://github.com/skywinder/web3swift/compare/0.2.5...0.2.7)
+
+## [0.2.5](https://github.com/skywinder/web3swift/tree/0.2.5) (2018-01-12)
+
+[Full Changelog](https://github.com/skywinder/web3swift/compare/0.2.0...0.2.5)
+
+## [0.2.0](https://github.com/skywinder/web3swift/tree/0.2.0) (2017-12-30)
+
+[Full Changelog](https://github.com/skywinder/web3swift/compare/0.1.2...0.2.0)
+
+## [0.1.2](https://github.com/skywinder/web3swift/tree/0.1.2) (2017-12-27)
+
+[Full Changelog](https://github.com/skywinder/web3swift/compare/0.1.1...0.1.2)
+
+## [0.1.1](https://github.com/skywinder/web3swift/tree/0.1.1) (2017-12-26)
+
+[Full Changelog](https://github.com/skywinder/web3swift/compare/0.1.0...0.1.1)
+
+## [0.1.0](https://github.com/skywinder/web3swift/tree/0.1.0) (2017-12-26)
+
+[Full Changelog](https://github.com/skywinder/web3swift/compare/0.0.6...0.1.0)
+
+## [0.0.6](https://github.com/skywinder/web3swift/tree/0.0.6) (2017-12-26)
+
+[Full Changelog](https://github.com/skywinder/web3swift/compare/0.0.5...0.0.6)
+
+## [0.0.5](https://github.com/skywinder/web3swift/tree/0.0.5) (2017-12-21)
+
+[Full Changelog](https://github.com/skywinder/web3swift/compare/0.0.4...0.0.5)
+
+## [0.0.4](https://github.com/skywinder/web3swift/tree/0.0.4) (2017-12-21)
+
+[Full Changelog](https://github.com/skywinder/web3swift/compare/0.0.3...0.0.4)
+
+## [0.0.3](https://github.com/skywinder/web3swift/tree/0.0.3) (2017-12-20)
+
+[Full Changelog](https://github.com/skywinder/web3swift/compare/0.0.2...0.0.3)
+
+## [0.0.2](https://github.com/skywinder/web3swift/tree/0.0.2) (2017-12-20)
+
+[Full Changelog](https://github.com/skywinder/web3swift/compare/0.0.1...0.0.2)
+
+## [0.0.1](https://github.com/skywinder/web3swift/tree/0.0.1) (2017-12-19)
+
+[Full Changelog](https://github.com/skywinder/web3swift/compare/3b32224461f8510e743fa23bccbb437269f98525...0.0.1)
diff --git a/Carthage/Checkouts/BigInt/.codecov.yml b/Carthage/Checkouts/BigInt/.codecov.yml
deleted file mode 100644
index e3be23030..000000000
--- a/Carthage/Checkouts/BigInt/.codecov.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-ignore:
-- "/Tests/*"
-comment:
- layout: "header, diff"
- behavior: default
- require_changes: no
-coverage:
- status:
- project:
- default:
- target: auto
- threshold: null
- base: auto
- paths: "Sources/*"
diff --git a/Carthage/Checkouts/BigInt/.github/workflows/jazzy.yml b/Carthage/Checkouts/BigInt/.github/workflows/jazzy.yml
deleted file mode 100644
index 4ae6fb70b..000000000
--- a/Carthage/Checkouts/BigInt/.github/workflows/jazzy.yml
+++ /dev/null
@@ -1,29 +0,0 @@
-name: Swift
-
-on:
- push:
- tags:
- - '*'
-
-jobs:
- macos:
- runs-on: macos-latest
- steps:
- - uses: actions/checkout@v2
- - name: Install jazzy
- run: gem install jazzy
- - name: Generate documentation
- run: |
- jazzy \
- --clean \
- --github-file-prefix "https://github.com/attaswift/$module/tree/${GITHUB_REF}" \
- --module-version "${{ github.event.release.tag_name }}" \
- --copyright "© $(date '+%Y') [Károly Lőrentey](https://twitter.com/lorentey). (Last updated: $(date '+%Y-%m-%d'))" \
- --config .jazzy.yml
- - name: Commit docs
- run: |
- git config --local user.email "bot@github.com"
- git config --local user.name "GitHub Actions"
- git add ./docs
- git commit -m "Update docs"
- git push origin HEAD:master
diff --git a/Carthage/Checkouts/BigInt/.github/workflows/swift.yml b/Carthage/Checkouts/BigInt/.github/workflows/swift.yml
deleted file mode 100644
index 3b977ac3a..000000000
--- a/Carthage/Checkouts/BigInt/.github/workflows/swift.yml
+++ /dev/null
@@ -1,47 +0,0 @@
-name: Swift
-
-on:
- push:
- branches: [ master ]
- pull_request:
- branches: [ master ]
-
-jobs:
- macos:
- runs-on: macos-latest
- steps:
- - uses: actions/checkout@v2
- - name: Build
- run: swift build --build-tests
- - name: Run tests
- run: swift test
- xcode:
- runs-on: macos-latest
- strategy:
- matrix:
- scheme: [BigInt-macOS, BigInt-iOS, BigInt-watchOS, BigInt-tvOS]
- steps:
- - uses: actions/checkout@v2
- - name: Build
- run: xcrun xcodebuild -workspace BigInt.xcworkspace -scheme ${{ matrix.scheme }}
- linux:
- container:
- image: swift:${{ matrix.linux }}
- runs-on: ubuntu-latest
- strategy:
- matrix:
- linux: [bionic, xenial, focal]
- steps:
- - uses: actions/checkout@v2
- - name: Build
- run: swift build --build-tests --enable-test-discovery
- - name: Test
- run: swift test --enable-test-discovery
- codecov:
- runs-on: macos-latest
- steps:
- - uses: actions/checkout@v2
- - name: Test and generate code coverage report
- run: xcrun xcodebuild -workspace BigInt.xcworkspace -scheme BigInt-macOS test
- - name: Upload coverage to Codecov
- uses: codecov/codecov-action@v1
diff --git a/Carthage/Checkouts/BigInt/.gitignore b/Carthage/Checkouts/BigInt/.gitignore
deleted file mode 100644
index 59f40b169..000000000
--- a/Carthage/Checkouts/BigInt/.gitignore
+++ /dev/null
@@ -1,6 +0,0 @@
-/Carthage/Build
-/.build
-/Packages
-xcuserdata
-/Package.pins
-/Package.resolved
diff --git a/Carthage/Checkouts/BigInt/.jazzy.yml b/Carthage/Checkouts/BigInt/.jazzy.yml
deleted file mode 100644
index 3698439d3..000000000
--- a/Carthage/Checkouts/BigInt/.jazzy.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-module: BigInt
-author: Károly Lőrentey
-theme: fullwidth
-output: ./docs
-author_url: "https://twitter.com/lorentey"
-github_url: "https://github.com/attaswift/BigInt"
-root_url: "https://attaswift.github.io/BigInt/reference/"
-xcodebuild_arguments: ["-workspace", "BigInt.xcworkspace", "-scheme", "BigInt-macOS"]
\ No newline at end of file
diff --git a/Carthage/Checkouts/BigInt/.swift-version b/Carthage/Checkouts/BigInt/.swift-version
deleted file mode 100644
index 819e07a22..000000000
--- a/Carthage/Checkouts/BigInt/.swift-version
+++ /dev/null
@@ -1 +0,0 @@
-5.0
diff --git a/Carthage/Checkouts/BigInt/.travis.yml b/Carthage/Checkouts/BigInt/.travis.yml
deleted file mode 100644
index 47753fd23..000000000
--- a/Carthage/Checkouts/BigInt/.travis.yml
+++ /dev/null
@@ -1,10 +0,0 @@
-language: swift
-osx_image: xcode11
-script:
-- swift build
-- swift test
-- xcrun xcodebuild -workspace BigInt.xcworkspace -scheme BigInt-macOS test
-- xcrun xcodebuild -workspace BigInt.xcworkspace -scheme BigInt-iOS -destination generic/platform=iOS
-- xcrun xcodebuild -workspace BigInt.xcworkspace -scheme BigInt-watchOS
-- xcrun xcodebuild -workspace BigInt.xcworkspace -scheme BigInt-tvOS
-after_success: bash <(curl -s https://codecov.io/bash)
diff --git a/Carthage/Checkouts/BigInt/BigInt.podspec b/Carthage/Checkouts/BigInt/BigInt.podspec
deleted file mode 100644
index cdb493eb9..000000000
--- a/Carthage/Checkouts/BigInt/BigInt.podspec
+++ /dev/null
@@ -1,17 +0,0 @@
-
-Pod::Spec.new do |spec|
- spec.name = 'BigInt'
- spec.version = '5.3.0'
- spec.ios.deployment_target = "8.0"
- spec.osx.deployment_target = "10.9"
- spec.tvos.deployment_target = "9.0"
- spec.watchos.deployment_target = "2.0"
- spec.license = { :type => 'MIT', :file => 'LICENSE.md' }
- spec.summary = 'Arbitrary-precision arithmetic in pure Swift'
- spec.homepage = 'https://github.com/attaswift/BigInt'
- spec.author = 'Károly Lőrentey'
- spec.source = { :git => 'https://github.com/attaswift/BigInt.git', :tag => 'v' + String(spec.version) }
- spec.source_files = 'Sources/*.swift'
- spec.social_media_url = 'https://twitter.com/lorentey'
- spec.documentation_url = 'http://attaswift.github.io/BigInt/'
-end
diff --git a/Carthage/Checkouts/BigInt/BigInt.xcodeproj/project.pbxproj b/Carthage/Checkouts/BigInt/BigInt.xcodeproj/project.pbxproj
deleted file mode 100644
index 2402d2b9a..000000000
--- a/Carthage/Checkouts/BigInt/BigInt.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,1301 +0,0 @@
-// !$*UTF8*$!
-{
- archiveVersion = 1;
- classes = {
- };
- objectVersion = 48;
- objects = {
-
-/* Begin PBXBuildFile section */
- BB241C441DDB70600067F917 /* Addition.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C301DDB70600067F917 /* Addition.swift */; };
- BB241C451DDB70600067F917 /* Bitwise Ops.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C311DDB70600067F917 /* Bitwise Ops.swift */; };
- BB241C461DDB70600067F917 /* Comparable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C321DDB70600067F917 /* Comparable.swift */; };
- BB241C471DDB70600067F917 /* Data Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C331DDB70600067F917 /* Data Conversion.swift */; };
- BB241C481DDB70600067F917 /* Division.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C341DDB70600067F917 /* Division.swift */; };
- BB241C491DDB70600067F917 /* Exponentiation.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C351DDB70600067F917 /* Exponentiation.swift */; };
- BB241C4A1DDB70600067F917 /* GCD.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C361DDB70600067F917 /* GCD.swift */; };
- BB241C4B1DDB70600067F917 /* Hashable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C371DDB70600067F917 /* Hashable.swift */; };
- BB241C4C1DDB70600067F917 /* Multiplication.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C381DDB70600067F917 /* Multiplication.swift */; };
- BB241C4D1DDB70600067F917 /* Prime Test.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C391DDB70600067F917 /* Prime Test.swift */; };
- BB241C4E1DDB70600067F917 /* String Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C3A1DDB70600067F917 /* String Conversion.swift */; };
- BB241C4F1DDB70600067F917 /* Random.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C3B1DDB70600067F917 /* Random.swift */; };
- BB241C501DDB70600067F917 /* Shifts.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C3C1DDB70600067F917 /* Shifts.swift */; };
- BB241C511DDB70600067F917 /* Square Root.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C3D1DDB70600067F917 /* Square Root.swift */; };
- BB241C521DDB70600067F917 /* Subtraction.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C3E1DDB70600067F917 /* Subtraction.swift */; };
- BB241C531DDB70600067F917 /* BigUInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C3F1DDB70600067F917 /* BigUInt.swift */; };
- BB241C651DDB70B00067F917 /* BigInt.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BBB55AD41C8F88F20050DDA9 /* BigInt.framework */; };
- BB241C6F1DDB71910067F917 /* BigUInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C3F1DDB70600067F917 /* BigUInt.swift */; };
- BB241C701DDB71910067F917 /* Comparable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C321DDB70600067F917 /* Comparable.swift */; };
- BB241C711DDB71910067F917 /* Hashable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C371DDB70600067F917 /* Hashable.swift */; };
- BB241C721DDB71910067F917 /* Data Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C331DDB70600067F917 /* Data Conversion.swift */; };
- BB241C731DDB71910067F917 /* Addition.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C301DDB70600067F917 /* Addition.swift */; };
- BB241C741DDB71910067F917 /* Subtraction.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C3E1DDB70600067F917 /* Subtraction.swift */; };
- BB241C751DDB71910067F917 /* Multiplication.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C381DDB70600067F917 /* Multiplication.swift */; };
- BB241C761DDB71910067F917 /* Division.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C341DDB70600067F917 /* Division.swift */; };
- BB241C771DDB71910067F917 /* Exponentiation.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C351DDB70600067F917 /* Exponentiation.swift */; };
- BB241C781DDB71910067F917 /* Bitwise Ops.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C311DDB70600067F917 /* Bitwise Ops.swift */; };
- BB241C791DDB71910067F917 /* Shifts.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C3C1DDB70600067F917 /* Shifts.swift */; };
- BB241C7A1DDB71910067F917 /* Square Root.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C3D1DDB70600067F917 /* Square Root.swift */; };
- BB241C7B1DDB71910067F917 /* GCD.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C361DDB70600067F917 /* GCD.swift */; };
- BB241C7C1DDB71910067F917 /* Prime Test.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C391DDB70600067F917 /* Prime Test.swift */; };
- BB241C7D1DDB71910067F917 /* String Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C3A1DDB70600067F917 /* String Conversion.swift */; };
- BB241C7E1DDB71910067F917 /* Random.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C3B1DDB70600067F917 /* Random.swift */; };
- BB241C831DDB71920067F917 /* BigUInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C3F1DDB70600067F917 /* BigUInt.swift */; };
- BB241C841DDB71920067F917 /* Comparable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C321DDB70600067F917 /* Comparable.swift */; };
- BB241C851DDB71920067F917 /* Hashable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C371DDB70600067F917 /* Hashable.swift */; };
- BB241C861DDB71920067F917 /* Data Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C331DDB70600067F917 /* Data Conversion.swift */; };
- BB241C871DDB71920067F917 /* Addition.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C301DDB70600067F917 /* Addition.swift */; };
- BB241C881DDB71920067F917 /* Subtraction.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C3E1DDB70600067F917 /* Subtraction.swift */; };
- BB241C891DDB71920067F917 /* Multiplication.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C381DDB70600067F917 /* Multiplication.swift */; };
- BB241C8A1DDB71920067F917 /* Division.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C341DDB70600067F917 /* Division.swift */; };
- BB241C8B1DDB71920067F917 /* Exponentiation.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C351DDB70600067F917 /* Exponentiation.swift */; };
- BB241C8C1DDB71920067F917 /* Bitwise Ops.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C311DDB70600067F917 /* Bitwise Ops.swift */; };
- BB241C8D1DDB71920067F917 /* Shifts.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C3C1DDB70600067F917 /* Shifts.swift */; };
- BB241C8E1DDB71920067F917 /* Square Root.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C3D1DDB70600067F917 /* Square Root.swift */; };
- BB241C8F1DDB71920067F917 /* GCD.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C361DDB70600067F917 /* GCD.swift */; };
- BB241C901DDB71920067F917 /* Prime Test.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C391DDB70600067F917 /* Prime Test.swift */; };
- BB241C911DDB71920067F917 /* String Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C3A1DDB70600067F917 /* String Conversion.swift */; };
- BB241C921DDB71920067F917 /* Random.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C3B1DDB70600067F917 /* Random.swift */; };
- BB241C971DDB71920067F917 /* BigUInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C3F1DDB70600067F917 /* BigUInt.swift */; };
- BB241C981DDB71920067F917 /* Comparable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C321DDB70600067F917 /* Comparable.swift */; };
- BB241C991DDB71920067F917 /* Hashable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C371DDB70600067F917 /* Hashable.swift */; };
- BB241C9A1DDB71920067F917 /* Data Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C331DDB70600067F917 /* Data Conversion.swift */; };
- BB241C9B1DDB71920067F917 /* Addition.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C301DDB70600067F917 /* Addition.swift */; };
- BB241C9C1DDB71920067F917 /* Subtraction.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C3E1DDB70600067F917 /* Subtraction.swift */; };
- BB241C9D1DDB71920067F917 /* Multiplication.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C381DDB70600067F917 /* Multiplication.swift */; };
- BB241C9E1DDB71920067F917 /* Division.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C341DDB70600067F917 /* Division.swift */; };
- BB241C9F1DDB71920067F917 /* Exponentiation.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C351DDB70600067F917 /* Exponentiation.swift */; };
- BB241CA01DDB71920067F917 /* Bitwise Ops.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C311DDB70600067F917 /* Bitwise Ops.swift */; };
- BB241CA11DDB71920067F917 /* Shifts.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C3C1DDB70600067F917 /* Shifts.swift */; };
- BB241CA21DDB71920067F917 /* Square Root.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C3D1DDB70600067F917 /* Square Root.swift */; };
- BB241CA31DDB71920067F917 /* GCD.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C361DDB70600067F917 /* GCD.swift */; };
- BB241CA41DDB71920067F917 /* Prime Test.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C391DDB70600067F917 /* Prime Test.swift */; };
- BB241CA51DDB71920067F917 /* String Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C3A1DDB70600067F917 /* String Conversion.swift */; };
- BB241CA61DDB71920067F917 /* Random.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C3B1DDB70600067F917 /* Random.swift */; };
- BB241CBB1DDB71A50067F917 /* ProfileTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C5A1DDB70690067F917 /* ProfileTests.swift */; };
- BB241CC51DDB71A60067F917 /* ProfileTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C5A1DDB70690067F917 /* ProfileTests.swift */; };
- BB241CDC1DDB79E20067F917 /* BigUIntTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C571DDB70690067F917 /* BigUIntTests.swift */; };
- BB241CE41DDB79E30067F917 /* BigUIntTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C571DDB70690067F917 /* BigUIntTests.swift */; };
- BB4273F61F24AFCC00065766 /* Tools.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB4273F41F24AFC800065766 /* Tools.swift */; };
- BB4273F71F24AFCD00065766 /* Tools.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB4273F41F24AFC800065766 /* Tools.swift */; };
- BB4273F81F24AFCD00065766 /* Tools.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB4273F41F24AFC800065766 /* Tools.swift */; };
- BB4273F91F24AFCE00065766 /* Tools.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB4273F41F24AFC800065766 /* Tools.swift */; };
- BB64CD611F1D65D000C1B077 /* BigInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C2F1DDB70600067F917 /* BigInt.swift */; };
- BB9889A51F3E5C3100014740 /* Strideable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB9889A41F3E5C3100014740 /* Strideable.swift */; };
- BB9889A61F3E5C3100014740 /* Strideable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB9889A41F3E5C3100014740 /* Strideable.swift */; };
- BB9889A71F3E5C3100014740 /* Strideable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB9889A41F3E5C3100014740 /* Strideable.swift */; };
- BB9889A81F3E5C3100014740 /* Strideable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB9889A41F3E5C3100014740 /* Strideable.swift */; };
- BB9889AA1F3E5CC600014740 /* Integer Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB9889A91F3E5CC600014740 /* Integer Conversion.swift */; };
- BB9889AB1F3E5CC600014740 /* Integer Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB9889A91F3E5CC600014740 /* Integer Conversion.swift */; };
- BB9889AC1F3E5CC600014740 /* Integer Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB9889A91F3E5CC600014740 /* Integer Conversion.swift */; };
- BB9889AD1F3E5CC600014740 /* Integer Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB9889A91F3E5CC600014740 /* Integer Conversion.swift */; };
- BB99168F1F32610700CCFDDC /* BigIntTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C561DDB70690067F917 /* BigIntTests.swift */; };
- BB9916901F32610A00CCFDDC /* BigUIntTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C571DDB70690067F917 /* BigUIntTests.swift */; };
- BB9916911F33C32000CCFDDC /* WordTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBEAE4DC1F28C37800F4E329 /* WordTests.swift */; };
- BBABCDD21F3E17A8009CA8BC /* Floating Point Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBABCDD11F3E17A8009CA8BC /* Floating Point Conversion.swift */; };
- BBABCDD31F3E17A8009CA8BC /* Floating Point Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBABCDD11F3E17A8009CA8BC /* Floating Point Conversion.swift */; };
- BBABCDD41F3E17A8009CA8BC /* Floating Point Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBABCDD11F3E17A8009CA8BC /* Floating Point Conversion.swift */; };
- BBABCDD51F3E17A8009CA8BC /* Floating Point Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBABCDD11F3E17A8009CA8BC /* Floating Point Conversion.swift */; };
- BBABCDD71F3E2038009CA8BC /* Words and Bits.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBABCDD61F3E2038009CA8BC /* Words and Bits.swift */; };
- BBABCDD81F3E2038009CA8BC /* Words and Bits.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBABCDD61F3E2038009CA8BC /* Words and Bits.swift */; };
- BBABCDD91F3E2038009CA8BC /* Words and Bits.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBABCDD61F3E2038009CA8BC /* Words and Bits.swift */; };
- BBABCDDA1F3E2038009CA8BC /* Words and Bits.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBABCDD61F3E2038009CA8BC /* Words and Bits.swift */; };
- BBB55ABD1C8F80020050DDA9 /* BigInt.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BBB55AB21C8F80020050DDA9 /* BigInt.framework */; };
- BBB55ADE1C8F88F20050DDA9 /* BigInt.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BBB55AD41C8F88F20050DDA9 /* BigInt.framework */; };
- BBB55B081C8F8CBC0050DDA9 /* BigInt.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BBB55AFE1C8F8CBB0050DDA9 /* BigInt.framework */; };
- BBC944371F24C25A00ED6C30 /* BigInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C2F1DDB70600067F917 /* BigInt.swift */; };
- BBC944381F24C25B00ED6C30 /* BigInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C2F1DDB70600067F917 /* BigInt.swift */; };
- BBC944391F24C25C00ED6C30 /* BigInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C2F1DDB70600067F917 /* BigInt.swift */; };
- BBC9443A1F24C27E00ED6C30 /* BigIntTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C561DDB70690067F917 /* BigIntTests.swift */; };
- BBC9443C1F24C27F00ED6C30 /* BigIntTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C561DDB70690067F917 /* BigIntTests.swift */; };
- BBE4CA4E1F3DA5AB0062A281 /* Codable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBE4CA4D1F3DA5AB0062A281 /* Codable.swift */; };
- BBE4CA4F1F3DAD380062A281 /* Codable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBE4CA4D1F3DA5AB0062A281 /* Codable.swift */; };
- BBE4CA501F3DAD390062A281 /* Codable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBE4CA4D1F3DA5AB0062A281 /* Codable.swift */; };
- BBE4CA511F3DAD390062A281 /* Codable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBE4CA4D1F3DA5AB0062A281 /* Codable.swift */; };
- BBEAE4DD1F28C37800F4E329 /* WordTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBEAE4DC1F28C37800F4E329 /* WordTests.swift */; };
- BBEAE4DF1F28C37800F4E329 /* WordTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBEAE4DC1F28C37800F4E329 /* WordTests.swift */; };
- BBF16BD51F2BA51B00402089 /* ProfileTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB241C5A1DDB70690067F917 /* ProfileTests.swift */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXContainerItemProxy section */
- BB241C621DDB70B00067F917 /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = BBB55AA91C8F80020050DDA9 /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = BBB55AD31C8F88F20050DDA9;
- remoteInfo = BigInt;
- };
- BBB55ABE1C8F80020050DDA9 /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = BBB55AA91C8F80020050DDA9 /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = BBB55AB11C8F80020050DDA9;
- remoteInfo = BigInt;
- };
- BBB55ADF1C8F88F20050DDA9 /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = BBB55AA91C8F80020050DDA9 /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = BBB55AD31C8F88F20050DDA9;
- remoteInfo = BigInt;
- };
- BBB55B091C8F8CBC0050DDA9 /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = BBB55AA91C8F80020050DDA9 /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = BBB55AFD1C8F8CBB0050DDA9;
- remoteInfo = BigInt;
- };
-/* End PBXContainerItemProxy section */
-
-/* Begin PBXFileReference section */
- BB241BC51DD9F6490067F917 /* Package.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = ""; };
- BB241BC71DD9F7D60067F917 /* BigInt.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; path = BigInt.podspec; sourceTree = ""; };
- BB241C2F1DDB70600067F917 /* BigInt.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BigInt.swift; sourceTree = ""; };
- BB241C301DDB70600067F917 /* Addition.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Addition.swift; sourceTree = ""; };
- BB241C311DDB70600067F917 /* Bitwise Ops.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Bitwise Ops.swift"; sourceTree = ""; };
- BB241C321DDB70600067F917 /* Comparable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Comparable.swift; sourceTree = ""; };
- BB241C331DDB70600067F917 /* Data Conversion.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Data Conversion.swift"; sourceTree = ""; };
- BB241C341DDB70600067F917 /* Division.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Division.swift; sourceTree = ""; };
- BB241C351DDB70600067F917 /* Exponentiation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Exponentiation.swift; sourceTree = ""; };
- BB241C361DDB70600067F917 /* GCD.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GCD.swift; sourceTree = ""; };
- BB241C371DDB70600067F917 /* Hashable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Hashable.swift; sourceTree = ""; };
- BB241C381DDB70600067F917 /* Multiplication.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Multiplication.swift; sourceTree = ""; };
- BB241C391DDB70600067F917 /* Prime Test.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Prime Test.swift"; sourceTree = ""; };
- BB241C3A1DDB70600067F917 /* String Conversion.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "String Conversion.swift"; sourceTree = ""; };
- BB241C3B1DDB70600067F917 /* Random.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Random.swift; sourceTree = ""; };
- BB241C3C1DDB70600067F917 /* Shifts.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Shifts.swift; sourceTree = ""; };
- BB241C3D1DDB70600067F917 /* Square Root.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Square Root.swift"; sourceTree = ""; };
- BB241C3E1DDB70600067F917 /* Subtraction.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Subtraction.swift; sourceTree = ""; };
- BB241C3F1DDB70600067F917 /* BigUInt.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BigUInt.swift; sourceTree = ""; };
- BB241C561DDB70690067F917 /* BigIntTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BigIntTests.swift; sourceTree = ""; };
- BB241C571DDB70690067F917 /* BigUIntTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BigUIntTests.swift; sourceTree = ""; };
- BB241C5A1DDB70690067F917 /* ProfileTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProfileTests.swift; sourceTree = ""; };
- BB241C6A1DDB70B00067F917 /* BigInt Benchmark.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "BigInt Benchmark.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
- BB241CE81DDB7B620067F917 /* CHANGELOG.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = CHANGELOG.md; sourceTree = ""; };
- BB241CE91DDB7B620067F917 /* Demo.playground */ = {isa = PBXFileReference; lastKnownFileType = file.playground; path = Demo.playground; sourceTree = ""; };
- BB241CF01DDB84210067F917 /* .codecov.yml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = .codecov.yml; sourceTree = ""; };
- BB4273F41F24AFC800065766 /* Tools.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Tools.swift; sourceTree = ""; };
- BB9889A41F3E5C3100014740 /* Strideable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Strideable.swift; sourceTree = ""; };
- BB9889A91F3E5CC600014740 /* Integer Conversion.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Integer Conversion.swift"; sourceTree = ""; };
- BBABCDD11F3E17A8009CA8BC /* Floating Point Conversion.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Floating Point Conversion.swift"; sourceTree = ""; };
- BBABCDD61F3E2038009CA8BC /* Words and Bits.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Words and Bits.swift"; sourceTree = ""; };
- BBB55AB21C8F80020050DDA9 /* BigInt.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = BigInt.framework; sourceTree = BUILT_PRODUCTS_DIR; };
- BBB55AB71C8F80020050DDA9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
- BBB55ABC1C8F80020050DDA9 /* BigInt-Test.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "BigInt-Test.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
- BBB55AC31C8F80020050DDA9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
- BBB55ACC1C8F80660050DDA9 /* version.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = version.xcconfig; sourceTree = ""; };
- BBB55AD41C8F88F20050DDA9 /* BigInt.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = BigInt.framework; sourceTree = BUILT_PRODUCTS_DIR; };
- BBB55ADD1C8F88F20050DDA9 /* BigInt-Test.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "BigInt-Test.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
- BBB55AF11C8F8BE00050DDA9 /* BigInt.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = BigInt.framework; sourceTree = BUILT_PRODUCTS_DIR; };
- BBB55AFE1C8F8CBB0050DDA9 /* BigInt.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = BigInt.framework; sourceTree = BUILT_PRODUCTS_DIR; };
- BBB55B071C8F8CBB0050DDA9 /* BigInt-Test.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "BigInt-Test.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
- BBB55B1D1C8F9E850050DDA9 /* LICENSE.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = LICENSE.md; sourceTree = ""; };
- BBB55B1E1C8F9E920050DDA9 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; };
- BBE4CA4D1F3DA5AB0062A281 /* Codable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Codable.swift; sourceTree = ""; };
- BBEAE4DC1F28C37800F4E329 /* WordTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WordTests.swift; sourceTree = ""; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
- BB241C641DDB70B00067F917 /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- BB241C651DDB70B00067F917 /* BigInt.framework in Frameworks */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- BBB55AAE1C8F80020050DDA9 /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- BBB55AB91C8F80020050DDA9 /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- BBB55ABD1C8F80020050DDA9 /* BigInt.framework in Frameworks */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- BBB55AD01C8F88F20050DDA9 /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- BBB55ADA1C8F88F20050DDA9 /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- BBB55ADE1C8F88F20050DDA9 /* BigInt.framework in Frameworks */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- BBB55AED1C8F8BE00050DDA9 /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- BBB55AFA1C8F8CBB0050DDA9 /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- BBB55B041C8F8CBB0050DDA9 /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- BBB55B081C8F8CBC0050DDA9 /* BigInt.framework in Frameworks */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
- BB241CCB1DDB71DB0067F917 /* Frameworks */ = {
- isa = PBXGroup;
- children = (
- );
- name = Frameworks;
- sourceTree = "";
- };
- BBB55AA81C8F80020050DDA9 = {
- isa = PBXGroup;
- children = (
- BBB55B1E1C8F9E920050DDA9 /* README.md */,
- BBB55B1D1C8F9E850050DDA9 /* LICENSE.md */,
- BB241CE81DDB7B620067F917 /* CHANGELOG.md */,
- BB241BC51DD9F6490067F917 /* Package.swift */,
- BB241BC71DD9F7D60067F917 /* BigInt.podspec */,
- BB241CF01DDB84210067F917 /* .codecov.yml */,
- BBB55ACC1C8F80660050DDA9 /* version.xcconfig */,
- BB241CE91DDB7B620067F917 /* Demo.playground */,
- BBB55AB41C8F80020050DDA9 /* Sources */,
- BBB55AC01C8F80020050DDA9 /* Tests */,
- BBB55AB31C8F80020050DDA9 /* Products */,
- BB241CCB1DDB71DB0067F917 /* Frameworks */,
- );
- sourceTree = "";
- };
- BBB55AB31C8F80020050DDA9 /* Products */ = {
- isa = PBXGroup;
- children = (
- BBB55AB21C8F80020050DDA9 /* BigInt.framework */,
- BBB55ABC1C8F80020050DDA9 /* BigInt-Test.xctest */,
- BBB55AD41C8F88F20050DDA9 /* BigInt.framework */,
- BBB55ADD1C8F88F20050DDA9 /* BigInt-Test.xctest */,
- BBB55AF11C8F8BE00050DDA9 /* BigInt.framework */,
- BBB55AFE1C8F8CBB0050DDA9 /* BigInt.framework */,
- BBB55B071C8F8CBB0050DDA9 /* BigInt-Test.xctest */,
- BB241C6A1DDB70B00067F917 /* BigInt Benchmark.xctest */,
- );
- name = Products;
- sourceTree = "";
- };
- BBB55AB41C8F80020050DDA9 /* Sources */ = {
- isa = PBXGroup;
- children = (
- BB241C3F1DDB70600067F917 /* BigUInt.swift */,
- BB241C2F1DDB70600067F917 /* BigInt.swift */,
- BBABCDD61F3E2038009CA8BC /* Words and Bits.swift */,
- BB9889A91F3E5CC600014740 /* Integer Conversion.swift */,
- BBABCDD11F3E17A8009CA8BC /* Floating Point Conversion.swift */,
- BB241C3A1DDB70600067F917 /* String Conversion.swift */,
- BB241C331DDB70600067F917 /* Data Conversion.swift */,
- BB241C321DDB70600067F917 /* Comparable.swift */,
- BB241C371DDB70600067F917 /* Hashable.swift */,
- BBE4CA4D1F3DA5AB0062A281 /* Codable.swift */,
- BB241C301DDB70600067F917 /* Addition.swift */,
- BB241C3E1DDB70600067F917 /* Subtraction.swift */,
- BB9889A41F3E5C3100014740 /* Strideable.swift */,
- BB241C381DDB70600067F917 /* Multiplication.swift */,
- BB241C341DDB70600067F917 /* Division.swift */,
- BB241C351DDB70600067F917 /* Exponentiation.swift */,
- BB241C311DDB70600067F917 /* Bitwise Ops.swift */,
- BB241C3C1DDB70600067F917 /* Shifts.swift */,
- BB241C3D1DDB70600067F917 /* Square Root.swift */,
- BB241C361DDB70600067F917 /* GCD.swift */,
- BB241C391DDB70600067F917 /* Prime Test.swift */,
- BB241C3B1DDB70600067F917 /* Random.swift */,
- BBB55AB71C8F80020050DDA9 /* Info.plist */,
- );
- path = Sources;
- sourceTree = "";
- };
- BBB55AC01C8F80020050DDA9 /* Tests */ = {
- isa = PBXGroup;
- children = (
- BB241C561DDB70690067F917 /* BigIntTests.swift */,
- BB241C571DDB70690067F917 /* BigUIntTests.swift */,
- BBEAE4DC1F28C37800F4E329 /* WordTests.swift */,
- BB241C5A1DDB70690067F917 /* ProfileTests.swift */,
- BB4273F41F24AFC800065766 /* Tools.swift */,
- BBB55AC31C8F80020050DDA9 /* Info.plist */,
- );
- name = Tests;
- path = Tests/BigIntTests;
- sourceTree = "";
- };
-/* End PBXGroup section */
-
-/* Begin PBXHeadersBuildPhase section */
- BBB55AAF1C8F80020050DDA9 /* Headers */ = {
- isa = PBXHeadersBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- BBB55AD11C8F88F20050DDA9 /* Headers */ = {
- isa = PBXHeadersBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- BBB55AEE1C8F8BE00050DDA9 /* Headers */ = {
- isa = PBXHeadersBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- BBB55AFB1C8F8CBB0050DDA9 /* Headers */ = {
- isa = PBXHeadersBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXHeadersBuildPhase section */
-
-/* Begin PBXNativeTarget section */
- BB241C601DDB70B00067F917 /* BigInt Benchmark */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = BB241C671DDB70B00067F917 /* Build configuration list for PBXNativeTarget "BigInt Benchmark" */;
- buildPhases = (
- BB241C631DDB70B00067F917 /* Sources */,
- BB241C641DDB70B00067F917 /* Frameworks */,
- BB241C661DDB70B00067F917 /* Resources */,
- );
- buildRules = (
- );
- dependencies = (
- BB241C611DDB70B00067F917 /* PBXTargetDependency */,
- );
- name = "BigInt Benchmark";
- productName = BigIntTests;
- productReference = BB241C6A1DDB70B00067F917 /* BigInt Benchmark.xctest */;
- productType = "com.apple.product-type.bundle.unit-test";
- };
- BBB55AB11C8F80020050DDA9 /* BigInt-iOS */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = BBB55AC61C8F80020050DDA9 /* Build configuration list for PBXNativeTarget "BigInt-iOS" */;
- buildPhases = (
- BBB55AAD1C8F80020050DDA9 /* Sources */,
- BBB55AAE1C8F80020050DDA9 /* Frameworks */,
- BBB55AAF1C8F80020050DDA9 /* Headers */,
- BBB55AB01C8F80020050DDA9 /* Resources */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = "BigInt-iOS";
- productName = BigInt;
- productReference = BBB55AB21C8F80020050DDA9 /* BigInt.framework */;
- productType = "com.apple.product-type.framework";
- };
- BBB55ABB1C8F80020050DDA9 /* BigInt iOS Tests */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = BBB55AC91C8F80020050DDA9 /* Build configuration list for PBXNativeTarget "BigInt iOS Tests" */;
- buildPhases = (
- BBB55AB81C8F80020050DDA9 /* Sources */,
- BBB55AB91C8F80020050DDA9 /* Frameworks */,
- BBB55ABA1C8F80020050DDA9 /* Resources */,
- );
- buildRules = (
- );
- dependencies = (
- BBB55ABF1C8F80020050DDA9 /* PBXTargetDependency */,
- );
- name = "BigInt iOS Tests";
- productName = BigIntTests;
- productReference = BBB55ABC1C8F80020050DDA9 /* BigInt-Test.xctest */;
- productType = "com.apple.product-type.bundle.unit-test";
- };
- BBB55AD31C8F88F20050DDA9 /* BigInt-macOS */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = BBB55AE51C8F88F20050DDA9 /* Build configuration list for PBXNativeTarget "BigInt-macOS" */;
- buildPhases = (
- BBB55ACF1C8F88F20050DDA9 /* Sources */,
- BBB55AD01C8F88F20050DDA9 /* Frameworks */,
- BBB55AD11C8F88F20050DDA9 /* Headers */,
- BBB55AD21C8F88F20050DDA9 /* Resources */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = "BigInt-macOS";
- productName = BigInt;
- productReference = BBB55AD41C8F88F20050DDA9 /* BigInt.framework */;
- productType = "com.apple.product-type.framework";
- };
- BBB55ADC1C8F88F20050DDA9 /* BigInt macOS Tests */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = BBB55AE81C8F88F20050DDA9 /* Build configuration list for PBXNativeTarget "BigInt macOS Tests" */;
- buildPhases = (
- BBB55AD91C8F88F20050DDA9 /* Sources */,
- BBB55ADA1C8F88F20050DDA9 /* Frameworks */,
- BBB55ADB1C8F88F20050DDA9 /* Resources */,
- );
- buildRules = (
- );
- dependencies = (
- BBB55AE01C8F88F20050DDA9 /* PBXTargetDependency */,
- );
- name = "BigInt macOS Tests";
- productName = BigIntTests;
- productReference = BBB55ADD1C8F88F20050DDA9 /* BigInt-Test.xctest */;
- productType = "com.apple.product-type.bundle.unit-test";
- };
- BBB55AF01C8F8BE00050DDA9 /* BigInt-watchOS */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = BBB55AF61C8F8BE00050DDA9 /* Build configuration list for PBXNativeTarget "BigInt-watchOS" */;
- buildPhases = (
- BBB55AEC1C8F8BE00050DDA9 /* Sources */,
- BBB55AED1C8F8BE00050DDA9 /* Frameworks */,
- BBB55AEE1C8F8BE00050DDA9 /* Headers */,
- BBB55AEF1C8F8BE00050DDA9 /* Resources */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = "BigInt-watchOS";
- productName = BigInt;
- productReference = BBB55AF11C8F8BE00050DDA9 /* BigInt.framework */;
- productType = "com.apple.product-type.framework";
- };
- BBB55AFD1C8F8CBB0050DDA9 /* BigInt-tvOS */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = BBB55B0F1C8F8CBC0050DDA9 /* Build configuration list for PBXNativeTarget "BigInt-tvOS" */;
- buildPhases = (
- BBB55AF91C8F8CBB0050DDA9 /* Sources */,
- BBB55AFA1C8F8CBB0050DDA9 /* Frameworks */,
- BBB55AFB1C8F8CBB0050DDA9 /* Headers */,
- BBB55AFC1C8F8CBB0050DDA9 /* Resources */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = "BigInt-tvOS";
- productName = BigInt;
- productReference = BBB55AFE1C8F8CBB0050DDA9 /* BigInt.framework */;
- productType = "com.apple.product-type.framework";
- };
- BBB55B061C8F8CBB0050DDA9 /* BigInt tvOS Tests */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = BBB55B121C8F8CBC0050DDA9 /* Build configuration list for PBXNativeTarget "BigInt tvOS Tests" */;
- buildPhases = (
- BBB55B031C8F8CBB0050DDA9 /* Sources */,
- BBB55B041C8F8CBB0050DDA9 /* Frameworks */,
- BBB55B051C8F8CBB0050DDA9 /* Resources */,
- );
- buildRules = (
- );
- dependencies = (
- BBB55B0A1C8F8CBC0050DDA9 /* PBXTargetDependency */,
- );
- name = "BigInt tvOS Tests";
- productName = BigIntTests;
- productReference = BBB55B071C8F8CBB0050DDA9 /* BigInt-Test.xctest */;
- productType = "com.apple.product-type.bundle.unit-test";
- };
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
- BBB55AA91C8F80020050DDA9 /* Project object */ = {
- isa = PBXProject;
- attributes = {
- LastSwiftUpdateCheck = 0730;
- LastUpgradeCheck = 1300;
- ORGANIZATIONNAME = "Károly Lőrentey";
- TargetAttributes = {
- BBB55AB11C8F80020050DDA9 = {
- CreatedOnToolsVersion = 7.3;
- LastSwiftMigration = 1020;
- };
- BBB55ABB1C8F80020050DDA9 = {
- CreatedOnToolsVersion = 7.3;
- LastSwiftMigration = 1020;
- };
- BBB55AD31C8F88F20050DDA9 = {
- CreatedOnToolsVersion = 7.3;
- LastSwiftMigration = 1020;
- };
- BBB55ADC1C8F88F20050DDA9 = {
- CreatedOnToolsVersion = 7.3;
- LastSwiftMigration = 1020;
- };
- BBB55AF01C8F8BE00050DDA9 = {
- CreatedOnToolsVersion = 7.3;
- LastSwiftMigration = 1020;
- };
- BBB55AFD1C8F8CBB0050DDA9 = {
- CreatedOnToolsVersion = 7.3;
- };
- BBB55B061C8F8CBB0050DDA9 = {
- CreatedOnToolsVersion = 7.3;
- };
- };
- };
- buildConfigurationList = BBB55AAC1C8F80020050DDA9 /* Build configuration list for PBXProject "BigInt" */;
- compatibilityVersion = "Xcode 8.0";
- developmentRegion = en;
- hasScannedForEncodings = 0;
- knownRegions = (
- en,
- Base,
- );
- mainGroup = BBB55AA81C8F80020050DDA9;
- productRefGroup = BBB55AB31C8F80020050DDA9 /* Products */;
- projectDirPath = "";
- projectRoot = "";
- targets = (
- BBB55AB11C8F80020050DDA9 /* BigInt-iOS */,
- BBB55AD31C8F88F20050DDA9 /* BigInt-macOS */,
- BBB55AF01C8F8BE00050DDA9 /* BigInt-watchOS */,
- BBB55AFD1C8F8CBB0050DDA9 /* BigInt-tvOS */,
- BBB55ABB1C8F80020050DDA9 /* BigInt iOS Tests */,
- BBB55ADC1C8F88F20050DDA9 /* BigInt macOS Tests */,
- BBB55B061C8F8CBB0050DDA9 /* BigInt tvOS Tests */,
- BB241C601DDB70B00067F917 /* BigInt Benchmark */,
- );
- };
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
- BB241C661DDB70B00067F917 /* Resources */ = {
- isa = PBXResourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- BBB55AB01C8F80020050DDA9 /* Resources */ = {
- isa = PBXResourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- BBB55ABA1C8F80020050DDA9 /* Resources */ = {
- isa = PBXResourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- BBB55AD21C8F88F20050DDA9 /* Resources */ = {
- isa = PBXResourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- BBB55ADB1C8F88F20050DDA9 /* Resources */ = {
- isa = PBXResourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- BBB55AEF1C8F8BE00050DDA9 /* Resources */ = {
- isa = PBXResourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- BBB55AFC1C8F8CBB0050DDA9 /* Resources */ = {
- isa = PBXResourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- BBB55B051C8F8CBB0050DDA9 /* Resources */ = {
- isa = PBXResourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
- BB241C631DDB70B00067F917 /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- BB4273F91F24AFCE00065766 /* Tools.swift in Sources */,
- BBF16BD51F2BA51B00402089 /* ProfileTests.swift in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- BBB55AAD1C8F80020050DDA9 /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- BB241C441DDB70600067F917 /* Addition.swift in Sources */,
- BB241C531DDB70600067F917 /* BigUInt.swift in Sources */,
- BB241C4F1DDB70600067F917 /* Random.swift in Sources */,
- BBABCDD71F3E2038009CA8BC /* Words and Bits.swift in Sources */,
- BBC944391F24C25C00ED6C30 /* BigInt.swift in Sources */,
- BB241C4D1DDB70600067F917 /* Prime Test.swift in Sources */,
- BBABCDD21F3E17A8009CA8BC /* Floating Point Conversion.swift in Sources */,
- BB241C4B1DDB70600067F917 /* Hashable.swift in Sources */,
- BB241C4A1DDB70600067F917 /* GCD.swift in Sources */,
- BB9889AA1F3E5CC600014740 /* Integer Conversion.swift in Sources */,
- BB241C4E1DDB70600067F917 /* String Conversion.swift in Sources */,
- BB241C481DDB70600067F917 /* Division.swift in Sources */,
- BB241C501DDB70600067F917 /* Shifts.swift in Sources */,
- BB241C521DDB70600067F917 /* Subtraction.swift in Sources */,
- BB241C4C1DDB70600067F917 /* Multiplication.swift in Sources */,
- BB9889A51F3E5C3100014740 /* Strideable.swift in Sources */,
- BB241C511DDB70600067F917 /* Square Root.swift in Sources */,
- BB241C471DDB70600067F917 /* Data Conversion.swift in Sources */,
- BB241C461DDB70600067F917 /* Comparable.swift in Sources */,
- BBE4CA4E1F3DA5AB0062A281 /* Codable.swift in Sources */,
- BB241C491DDB70600067F917 /* Exponentiation.swift in Sources */,
- BB241C451DDB70600067F917 /* Bitwise Ops.swift in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- BBB55AB81C8F80020050DDA9 /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- BBC9443A1F24C27E00ED6C30 /* BigIntTests.swift in Sources */,
- BB241CBB1DDB71A50067F917 /* ProfileTests.swift in Sources */,
- BB4273F61F24AFCC00065766 /* Tools.swift in Sources */,
- BBEAE4DD1F28C37800F4E329 /* WordTests.swift in Sources */,
- BB241CE41DDB79E30067F917 /* BigUIntTests.swift in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- BBB55ACF1C8F88F20050DDA9 /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- BB241C8C1DDB71920067F917 /* Bitwise Ops.swift in Sources */,
- BB241C921DDB71920067F917 /* Random.swift in Sources */,
- BB241C901DDB71920067F917 /* Prime Test.swift in Sources */,
- BBABCDD81F3E2038009CA8BC /* Words and Bits.swift in Sources */,
- BB64CD611F1D65D000C1B077 /* BigInt.swift in Sources */,
- BB241C851DDB71920067F917 /* Hashable.swift in Sources */,
- BBABCDD31F3E17A8009CA8BC /* Floating Point Conversion.swift in Sources */,
- BB241C881DDB71920067F917 /* Subtraction.swift in Sources */,
- BB241C8A1DDB71920067F917 /* Division.swift in Sources */,
- BB9889AB1F3E5CC600014740 /* Integer Conversion.swift in Sources */,
- BB241C831DDB71920067F917 /* BigUInt.swift in Sources */,
- BB241C841DDB71920067F917 /* Comparable.swift in Sources */,
- BB241C911DDB71920067F917 /* String Conversion.swift in Sources */,
- BB241C861DDB71920067F917 /* Data Conversion.swift in Sources */,
- BB241C891DDB71920067F917 /* Multiplication.swift in Sources */,
- BB9889A61F3E5C3100014740 /* Strideable.swift in Sources */,
- BB241C8D1DDB71920067F917 /* Shifts.swift in Sources */,
- BB241C8F1DDB71920067F917 /* GCD.swift in Sources */,
- BB241C8E1DDB71920067F917 /* Square Root.swift in Sources */,
- BBE4CA4F1F3DAD380062A281 /* Codable.swift in Sources */,
- BB241C8B1DDB71920067F917 /* Exponentiation.swift in Sources */,
- BB241C871DDB71920067F917 /* Addition.swift in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- BBB55AD91C8F88F20050DDA9 /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- BB4273F71F24AFCD00065766 /* Tools.swift in Sources */,
- BB9916911F33C32000CCFDDC /* WordTests.swift in Sources */,
- BB9916901F32610A00CCFDDC /* BigUIntTests.swift in Sources */,
- BB99168F1F32610700CCFDDC /* BigIntTests.swift in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- BBB55AEC1C8F8BE00050DDA9 /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- BB241C781DDB71910067F917 /* Bitwise Ops.swift in Sources */,
- BB241C7E1DDB71910067F917 /* Random.swift in Sources */,
- BB241C7C1DDB71910067F917 /* Prime Test.swift in Sources */,
- BBABCDD91F3E2038009CA8BC /* Words and Bits.swift in Sources */,
- BBC944371F24C25A00ED6C30 /* BigInt.swift in Sources */,
- BB241C711DDB71910067F917 /* Hashable.swift in Sources */,
- BBABCDD41F3E17A8009CA8BC /* Floating Point Conversion.swift in Sources */,
- BB241C741DDB71910067F917 /* Subtraction.swift in Sources */,
- BB241C761DDB71910067F917 /* Division.swift in Sources */,
- BB9889AC1F3E5CC600014740 /* Integer Conversion.swift in Sources */,
- BB241C6F1DDB71910067F917 /* BigUInt.swift in Sources */,
- BB241C701DDB71910067F917 /* Comparable.swift in Sources */,
- BB241C7D1DDB71910067F917 /* String Conversion.swift in Sources */,
- BB241C721DDB71910067F917 /* Data Conversion.swift in Sources */,
- BB241C751DDB71910067F917 /* Multiplication.swift in Sources */,
- BB9889A71F3E5C3100014740 /* Strideable.swift in Sources */,
- BB241C791DDB71910067F917 /* Shifts.swift in Sources */,
- BB241C7B1DDB71910067F917 /* GCD.swift in Sources */,
- BB241C7A1DDB71910067F917 /* Square Root.swift in Sources */,
- BBE4CA501F3DAD390062A281 /* Codable.swift in Sources */,
- BB241C771DDB71910067F917 /* Exponentiation.swift in Sources */,
- BB241C731DDB71910067F917 /* Addition.swift in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- BBB55AF91C8F8CBB0050DDA9 /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- BB241CA01DDB71920067F917 /* Bitwise Ops.swift in Sources */,
- BB241CA61DDB71920067F917 /* Random.swift in Sources */,
- BB241CA41DDB71920067F917 /* Prime Test.swift in Sources */,
- BBABCDDA1F3E2038009CA8BC /* Words and Bits.swift in Sources */,
- BBC944381F24C25B00ED6C30 /* BigInt.swift in Sources */,
- BB241C991DDB71920067F917 /* Hashable.swift in Sources */,
- BBABCDD51F3E17A8009CA8BC /* Floating Point Conversion.swift in Sources */,
- BB241C9C1DDB71920067F917 /* Subtraction.swift in Sources */,
- BB241C9E1DDB71920067F917 /* Division.swift in Sources */,
- BB9889AD1F3E5CC600014740 /* Integer Conversion.swift in Sources */,
- BB241C971DDB71920067F917 /* BigUInt.swift in Sources */,
- BB241C981DDB71920067F917 /* Comparable.swift in Sources */,
- BB241CA51DDB71920067F917 /* String Conversion.swift in Sources */,
- BB241C9A1DDB71920067F917 /* Data Conversion.swift in Sources */,
- BB241C9D1DDB71920067F917 /* Multiplication.swift in Sources */,
- BB9889A81F3E5C3100014740 /* Strideable.swift in Sources */,
- BB241CA11DDB71920067F917 /* Shifts.swift in Sources */,
- BB241CA31DDB71920067F917 /* GCD.swift in Sources */,
- BB241CA21DDB71920067F917 /* Square Root.swift in Sources */,
- BBE4CA511F3DAD390062A281 /* Codable.swift in Sources */,
- BB241C9F1DDB71920067F917 /* Exponentiation.swift in Sources */,
- BB241C9B1DDB71920067F917 /* Addition.swift in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- BBB55B031C8F8CBB0050DDA9 /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- BBC9443C1F24C27F00ED6C30 /* BigIntTests.swift in Sources */,
- BB241CC51DDB71A60067F917 /* ProfileTests.swift in Sources */,
- BB4273F81F24AFCD00065766 /* Tools.swift in Sources */,
- BBEAE4DF1F28C37800F4E329 /* WordTests.swift in Sources */,
- BB241CDC1DDB79E20067F917 /* BigUIntTests.swift in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXTargetDependency section */
- BB241C611DDB70B00067F917 /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = BBB55AD31C8F88F20050DDA9 /* BigInt-macOS */;
- targetProxy = BB241C621DDB70B00067F917 /* PBXContainerItemProxy */;
- };
- BBB55ABF1C8F80020050DDA9 /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = BBB55AB11C8F80020050DDA9 /* BigInt-iOS */;
- targetProxy = BBB55ABE1C8F80020050DDA9 /* PBXContainerItemProxy */;
- };
- BBB55AE01C8F88F20050DDA9 /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = BBB55AD31C8F88F20050DDA9 /* BigInt-macOS */;
- targetProxy = BBB55ADF1C8F88F20050DDA9 /* PBXContainerItemProxy */;
- };
- BBB55B0A1C8F8CBC0050DDA9 /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = BBB55AFD1C8F8CBB0050DDA9 /* BigInt-tvOS */;
- targetProxy = BBB55B091C8F8CBC0050DDA9 /* PBXContainerItemProxy */;
- };
-/* End PBXTargetDependency section */
-
-/* Begin XCBuildConfiguration section */
- BB241C681DDB70B00067F917 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
- APPLICATION_EXTENSION_API_ONLY = NO;
- COMBINE_HIDPI_IMAGES = YES;
- INFOPLIST_FILE = Tests/BigIntTests/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
- PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_IDENTIFIER_BASE).Tests";
- PRODUCT_NAME = "$(TARGET_NAME)";
- SDKROOT = macosx;
- };
- name = Debug;
- };
- BB241C691DDB70B00067F917 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
- APPLICATION_EXTENSION_API_ONLY = NO;
- COMBINE_HIDPI_IMAGES = YES;
- INFOPLIST_FILE = Tests/BigIntTests/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
- PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_IDENTIFIER_BASE).Tests";
- PRODUCT_NAME = "$(TARGET_NAME)";
- SDKROOT = macosx;
- };
- name = Release;
- };
- BBB55AC41C8F80020050DDA9 /* Debug */ = {
- isa = XCBuildConfiguration;
- baseConfigurationReference = BBB55ACC1C8F80660050DDA9 /* version.xcconfig */;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_COMMA = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
- CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
- CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
- CLANG_WARN_STRICT_PROTOTYPES = YES;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- COPY_PHASE_STRIP = NO;
- CURRENT_PROJECT_VERSION = "$(BUILD_NUMBER)";
- DEBUG_INFORMATION_FORMAT = dwarf;
- DYLIB_COMPATIBILITY_VERSION = "$(BUILD_NUMBER)";
- DYLIB_CURRENT_VERSION = "$(BUILD_NUMBER)";
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- ENABLE_TESTABILITY = YES;
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_OPTIMIZATION_LEVEL = 0;
- GCC_PREPROCESSOR_DEFINITIONS = (
- "DEBUG=1",
- "$(inherited)",
- );
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- MTL_ENABLE_DEBUG_INFO = YES;
- ONLY_ACTIVE_ARCH = YES;
- OTHER_SWIFT_FLAGS = "-DDebug";
- SWIFT_OPTIMIZATION_LEVEL = "-Onone";
- SWIFT_SWIFT3_OBJC_INFERENCE = Off;
- SWIFT_VERSION = 5.0;
- VERSION_INFO_PREFIX = "";
- };
- name = Debug;
- };
- BBB55AC51C8F80020050DDA9 /* Release */ = {
- isa = XCBuildConfiguration;
- baseConfigurationReference = BBB55ACC1C8F80660050DDA9 /* version.xcconfig */;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_COMMA = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
- CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
- CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
- CLANG_WARN_STRICT_PROTOTYPES = YES;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- COPY_PHASE_STRIP = NO;
- CURRENT_PROJECT_VERSION = "$(BUILD_NUMBER)";
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- DYLIB_COMPATIBILITY_VERSION = "$(BUILD_NUMBER)";
- DYLIB_CURRENT_VERSION = "$(BUILD_NUMBER)";
- ENABLE_NS_ASSERTIONS = NO;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- MTL_ENABLE_DEBUG_INFO = NO;
- OTHER_SWIFT_FLAGS = "-DProfile";
- SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
- SWIFT_SWIFT3_OBJC_INFERENCE = Off;
- SWIFT_VERSION = 5.0;
- VALIDATE_PRODUCT = YES;
- VERSION_INFO_PREFIX = "";
- };
- name = Release;
- };
- BBB55AC71C8F80020050DDA9 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_MODULES = YES;
- CODE_SIGN_IDENTITY = "";
- "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
- DEFINES_MODULE = YES;
- DYLIB_INSTALL_NAME_BASE = "@rpath";
- INFOPLIST_FILE = Sources/Info.plist;
- INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
- PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_IDENTIFIER_BASE).$(PLATFORM_DISPLAY_NAME:rfc1034identifier)";
- PRODUCT_NAME = "$(PROJECT_NAME)";
- SDKROOT = iphoneos;
- SKIP_INSTALL = YES;
- SUPPORTS_MACCATALYST = YES;
- SWIFT_OPTIMIZATION_LEVEL = "-Onone";
- TARGETED_DEVICE_FAMILY = "1,2";
- };
- name = Debug;
- };
- BBB55AC81C8F80020050DDA9 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_MODULES = YES;
- CODE_SIGN_IDENTITY = "";
- "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
- DEFINES_MODULE = YES;
- DYLIB_INSTALL_NAME_BASE = "@rpath";
- INFOPLIST_FILE = Sources/Info.plist;
- INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
- PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_IDENTIFIER_BASE).$(PLATFORM_DISPLAY_NAME:rfc1034identifier)";
- PRODUCT_NAME = "$(PROJECT_NAME)";
- SDKROOT = iphoneos;
- SKIP_INSTALL = YES;
- SUPPORTS_MACCATALYST = YES;
- TARGETED_DEVICE_FAMILY = "1,2";
- };
- name = Release;
- };
- BBB55ACA1C8F80020050DDA9 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
- APPLICATION_EXTENSION_API_ONLY = NO;
- INFOPLIST_FILE = Tests/BigIntTests/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
- PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_IDENTIFIER_BASE).Tests";
- PRODUCT_NAME = "$(PROJECT_NAME)-Test";
- SDKROOT = iphoneos;
- };
- name = Debug;
- };
- BBB55ACB1C8F80020050DDA9 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
- APPLICATION_EXTENSION_API_ONLY = NO;
- INFOPLIST_FILE = Tests/BigIntTests/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
- PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_IDENTIFIER_BASE).Tests";
- PRODUCT_NAME = "$(PROJECT_NAME)-Test";
- SDKROOT = iphoneos;
- };
- name = Release;
- };
- BBB55AE61C8F88F20050DDA9 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_MODULES = YES;
- COMBINE_HIDPI_IMAGES = YES;
- DEFINES_MODULE = YES;
- DYLIB_INSTALL_NAME_BASE = "@rpath";
- FRAMEWORK_VERSION = A;
- INFOPLIST_FILE = Sources/Info.plist;
- INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
- PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_IDENTIFIER_BASE).$(PLATFORM_DISPLAY_NAME:rfc1034identifier)";
- PRODUCT_NAME = "$(PROJECT_NAME)";
- SDKROOT = macosx;
- SKIP_INSTALL = YES;
- SWIFT_OPTIMIZATION_LEVEL = "-Onone";
- };
- name = Debug;
- };
- BBB55AE71C8F88F20050DDA9 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_MODULES = YES;
- COMBINE_HIDPI_IMAGES = YES;
- DEFINES_MODULE = YES;
- DYLIB_INSTALL_NAME_BASE = "@rpath";
- FRAMEWORK_VERSION = A;
- INFOPLIST_FILE = Sources/Info.plist;
- INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
- PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_IDENTIFIER_BASE).$(PLATFORM_DISPLAY_NAME:rfc1034identifier)";
- PRODUCT_NAME = "$(PROJECT_NAME)";
- SDKROOT = macosx;
- SKIP_INSTALL = YES;
- };
- name = Release;
- };
- BBB55AE91C8F88F20050DDA9 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
- APPLICATION_EXTENSION_API_ONLY = NO;
- COMBINE_HIDPI_IMAGES = YES;
- INFOPLIST_FILE = Tests/BigIntTests/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
- PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_IDENTIFIER_BASE).Tests";
- PRODUCT_NAME = "$(PROJECT_NAME)-Test";
- SDKROOT = macosx;
- };
- name = Debug;
- };
- BBB55AEA1C8F88F20050DDA9 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
- APPLICATION_EXTENSION_API_ONLY = NO;
- COMBINE_HIDPI_IMAGES = YES;
- INFOPLIST_FILE = Tests/BigIntTests/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
- PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_IDENTIFIER_BASE).Tests";
- PRODUCT_NAME = "$(PROJECT_NAME)-Test";
- SDKROOT = macosx;
- };
- name = Release;
- };
- BBB55AF71C8F8BE00050DDA9 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_MODULES = YES;
- "CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
- DEFINES_MODULE = YES;
- DYLIB_INSTALL_NAME_BASE = "@rpath";
- INFOPLIST_FILE = Sources/Info.plist;
- INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
- PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_IDENTIFIER_BASE).$(PLATFORM_DISPLAY_NAME:rfc1034identifier)";
- PRODUCT_NAME = "$(PROJECT_NAME)";
- SDKROOT = watchos;
- SKIP_INSTALL = YES;
- SWIFT_OPTIMIZATION_LEVEL = "-Onone";
- TARGETED_DEVICE_FAMILY = 4;
- };
- name = Debug;
- };
- BBB55AF81C8F8BE00050DDA9 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_MODULES = YES;
- "CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
- DEFINES_MODULE = YES;
- DYLIB_INSTALL_NAME_BASE = "@rpath";
- INFOPLIST_FILE = Sources/Info.plist;
- INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
- PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_IDENTIFIER_BASE).$(PLATFORM_DISPLAY_NAME:rfc1034identifier)";
- PRODUCT_NAME = "$(PROJECT_NAME)";
- SDKROOT = watchos;
- SKIP_INSTALL = YES;
- TARGETED_DEVICE_FAMILY = 4;
- };
- name = Release;
- };
- BBB55B101C8F8CBC0050DDA9 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_MODULES = YES;
- "CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
- DEFINES_MODULE = YES;
- DYLIB_INSTALL_NAME_BASE = "@rpath";
- INFOPLIST_FILE = Sources/Info.plist;
- INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
- PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_IDENTIFIER_BASE).$(PLATFORM_DISPLAY_NAME:rfc1034identifier)";
- PRODUCT_NAME = "$(PROJECT_NAME)";
- SDKROOT = appletvos;
- SKIP_INSTALL = YES;
- SWIFT_OPTIMIZATION_LEVEL = "-Onone";
- TARGETED_DEVICE_FAMILY = 3;
- };
- name = Debug;
- };
- BBB55B111C8F8CBC0050DDA9 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_MODULES = YES;
- "CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
- DEFINES_MODULE = YES;
- DYLIB_INSTALL_NAME_BASE = "@rpath";
- INFOPLIST_FILE = Sources/Info.plist;
- INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
- PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_IDENTIFIER_BASE).$(PLATFORM_DISPLAY_NAME:rfc1034identifier)";
- PRODUCT_NAME = "$(PROJECT_NAME)";
- SDKROOT = appletvos;
- SKIP_INSTALL = YES;
- TARGETED_DEVICE_FAMILY = 3;
- };
- name = Release;
- };
- BBB55B131C8F8CBC0050DDA9 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
- APPLICATION_EXTENSION_API_ONLY = NO;
- FRAMEWORK_SEARCH_PATHS = "$(inherited)";
- INFOPLIST_FILE = Tests/BigIntTests/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
- PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_IDENTIFIER_BASE).Tests";
- PRODUCT_NAME = "$(PROJECT_NAME)-Test";
- SDKROOT = appletvos;
- };
- name = Debug;
- };
- BBB55B141C8F8CBC0050DDA9 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
- APPLICATION_EXTENSION_API_ONLY = NO;
- FRAMEWORK_SEARCH_PATHS = "$(inherited)";
- INFOPLIST_FILE = Tests/BigIntTests/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
- PRODUCT_BUNDLE_IDENTIFIER = "$(BUNDLE_IDENTIFIER_BASE).Tests";
- PRODUCT_NAME = "$(PROJECT_NAME)-Test";
- SDKROOT = appletvos;
- };
- name = Release;
- };
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
- BB241C671DDB70B00067F917 /* Build configuration list for PBXNativeTarget "BigInt Benchmark" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- BB241C681DDB70B00067F917 /* Debug */,
- BB241C691DDB70B00067F917 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- BBB55AAC1C8F80020050DDA9 /* Build configuration list for PBXProject "BigInt" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- BBB55AC41C8F80020050DDA9 /* Debug */,
- BBB55AC51C8F80020050DDA9 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- BBB55AC61C8F80020050DDA9 /* Build configuration list for PBXNativeTarget "BigInt-iOS" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- BBB55AC71C8F80020050DDA9 /* Debug */,
- BBB55AC81C8F80020050DDA9 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- BBB55AC91C8F80020050DDA9 /* Build configuration list for PBXNativeTarget "BigInt iOS Tests" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- BBB55ACA1C8F80020050DDA9 /* Debug */,
- BBB55ACB1C8F80020050DDA9 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- BBB55AE51C8F88F20050DDA9 /* Build configuration list for PBXNativeTarget "BigInt-macOS" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- BBB55AE61C8F88F20050DDA9 /* Debug */,
- BBB55AE71C8F88F20050DDA9 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- BBB55AE81C8F88F20050DDA9 /* Build configuration list for PBXNativeTarget "BigInt macOS Tests" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- BBB55AE91C8F88F20050DDA9 /* Debug */,
- BBB55AEA1C8F88F20050DDA9 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- BBB55AF61C8F8BE00050DDA9 /* Build configuration list for PBXNativeTarget "BigInt-watchOS" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- BBB55AF71C8F8BE00050DDA9 /* Debug */,
- BBB55AF81C8F8BE00050DDA9 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- BBB55B0F1C8F8CBC0050DDA9 /* Build configuration list for PBXNativeTarget "BigInt-tvOS" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- BBB55B101C8F8CBC0050DDA9 /* Debug */,
- BBB55B111C8F8CBC0050DDA9 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- BBB55B121C8F8CBC0050DDA9 /* Build configuration list for PBXNativeTarget "BigInt tvOS Tests" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- BBB55B131C8F8CBC0050DDA9 /* Debug */,
- BBB55B141C8F8CBC0050DDA9 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
-/* End XCConfigurationList section */
- };
- rootObject = BBB55AA91C8F80020050DDA9 /* Project object */;
-}
diff --git a/Carthage/Checkouts/BigInt/BigInt.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Carthage/Checkouts/BigInt/BigInt.xcodeproj/project.xcworkspace/contents.xcworkspacedata
deleted file mode 100644
index 0713bb13e..000000000
--- a/Carthage/Checkouts/BigInt/BigInt.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
diff --git a/Carthage/Checkouts/BigInt/BigInt.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Carthage/Checkouts/BigInt/BigInt.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
deleted file mode 100644
index 18d981003..000000000
--- a/Carthage/Checkouts/BigInt/BigInt.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
- IDEDidComputeMac32BitWarning
-
-
-
diff --git a/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcbaselines/BB241C601DDB70B00067F917.xcbaseline/3714311D-5102-4569-B213-8DC87DC6C2F3.plist b/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcbaselines/BB241C601DDB70B00067F917.xcbaseline/3714311D-5102-4569-B213-8DC87DC6C2F3.plist
deleted file mode 100644
index 096fe76f8..000000000
--- a/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcbaselines/BB241C601DDB70B00067F917.xcbaseline/3714311D-5102-4569-B213-8DC87DC6C2F3.plist
+++ /dev/null
@@ -1,92 +0,0 @@
-
-
-
-
- classNames
-
- ProfileTests
-
- testBalancedMultiplication()
-
- com.apple.XCTPerformanceMetric_WallClockTime
-
- baselineAverage
- 0.41604
- baselineIntegrationDisplayName
- 2016-11-15 18:19:04
-
-
- testDivision()
-
- com.apple.XCTPerformanceMetric_WallClockTime
-
- baselineAverage
- 0.70161
- baselineIntegrationDisplayName
- 2016-11-15 18:19:04
-
-
- testFibonacciAddition()
-
- com.apple.XCTPerformanceMetric_WallClockTime
-
- baselineAverage
- 2.3569
- baselineIntegrationDisplayName
- 2016-11-15 18:19:04
-
-
- testGCD()
-
- com.apple.XCTPerformanceMetric_WallClockTime
-
- baselineAverage
- 1.801
- baselineIntegrationDisplayName
- 2016-11-15 18:19:04
-
-
- testMersennePrimes()
-
- com.apple.XCTPerformanceMetric_WallClockTime
-
- baselineAverage
- 4.184
- baselineIntegrationDisplayName
- 2016-11-15 18:19:04
-
-
- testModularExponentiation()
-
- com.apple.XCTPerformanceMetric_WallClockTime
-
- baselineAverage
- 2.1938
- baselineIntegrationDisplayName
- 2016-11-15 18:19:04
-
-
- testMultiplicationByDigit()
-
- com.apple.XCTPerformanceMetric_WallClockTime
-
- baselineAverage
- 0.91891
- baselineIntegrationDisplayName
- 2016-11-15 18:19:04
-
-
- testSquareRoot()
-
- com.apple.XCTPerformanceMetric_WallClockTime
-
- baselineAverage
- 0.48118
- baselineIntegrationDisplayName
- 2016-11-15 18:19:04
-
-
-
-
-
-
diff --git a/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcbaselines/BB241C601DDB70B00067F917.xcbaseline/3B06D4DF-FC61-43AE-8115-CA5059B5AB1B.plist b/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcbaselines/BB241C601DDB70B00067F917.xcbaseline/3B06D4DF-FC61-43AE-8115-CA5059B5AB1B.plist
deleted file mode 100644
index d1b347466..000000000
--- a/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcbaselines/BB241C601DDB70B00067F917.xcbaseline/3B06D4DF-FC61-43AE-8115-CA5059B5AB1B.plist
+++ /dev/null
@@ -1,92 +0,0 @@
-
-
-
-
- classNames
-
- ProfileTests
-
- testBalancedMultiplication()
-
- com.apple.XCTPerformanceMetric_WallClockTime
-
- baselineAverage
- 0.31603
- baselineIntegrationDisplayName
- Jun 21, 2017, 5:03:36 PM
-
-
- testDivision()
-
- com.apple.XCTPerformanceMetric_WallClockTime
-
- baselineAverage
- 0.60765
- baselineIntegrationDisplayName
- Jun 21, 2017, 5:03:36 PM
-
-
- testFibonacciAddition()
-
- com.apple.XCTPerformanceMetric_WallClockTime
-
- baselineAverage
- 2.0927
- baselineIntegrationDisplayName
- Jun 21, 2017, 5:03:36 PM
-
-
- testGCD()
-
- com.apple.XCTPerformanceMetric_WallClockTime
-
- baselineAverage
- 1.3631
- baselineIntegrationDisplayName
- Jun 21, 2017, 5:03:36 PM
-
-
- testMersennePrimes()
-
- com.apple.XCTPerformanceMetric_WallClockTime
-
- baselineAverage
- 3.4959
- baselineIntegrationDisplayName
- Jun 21, 2017, 5:03:36 PM
-
-
- testModularExponentiation()
-
- com.apple.XCTPerformanceMetric_WallClockTime
-
- baselineAverage
- 1.7139
- baselineIntegrationDisplayName
- Jun 21, 2017, 5:03:36 PM
-
-
- testMultiplicationByDigit()
-
- com.apple.XCTPerformanceMetric_WallClockTime
-
- baselineAverage
- 0.60397
- baselineIntegrationDisplayName
- Jun 21, 2017, 5:03:36 PM
-
-
- testSquareRoot()
-
- com.apple.XCTPerformanceMetric_WallClockTime
-
- baselineAverage
- 0.40256
- baselineIntegrationDisplayName
- Jun 21, 2017, 5:03:36 PM
-
-
-
-
-
-
diff --git a/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcbaselines/BB241C601DDB70B00067F917.xcbaseline/E75E9014-DB8C-4424-B05B-83660CCFB7ED.plist b/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcbaselines/BB241C601DDB70B00067F917.xcbaseline/E75E9014-DB8C-4424-B05B-83660CCFB7ED.plist
deleted file mode 100644
index bf59955f7..000000000
--- a/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcbaselines/BB241C601DDB70B00067F917.xcbaseline/E75E9014-DB8C-4424-B05B-83660CCFB7ED.plist
+++ /dev/null
@@ -1,122 +0,0 @@
-
-
-
-
- classNames
-
- ProfileTests
-
- testBalancedFactorial()
-
- com.apple.XCTPerformanceMetric_WallClockTime
-
- baselineAverage
- 0.33337
- baselineIntegrationDisplayName
- Jul 23, 2017, 12:47:59
-
-
- testDivision()
-
- com.apple.XCTPerformanceMetric_WallClockTime
-
- baselineAverage
- 0.59507
- baselineIntegrationDisplayName
- Jul 23, 2017, 12:47:59
-
-
- testDivisionOfFactorial()
-
- com.apple.XCTPerformanceMetric_WallClockTime
-
- baselineAverage
- 3.6987
- baselineIntegrationDisplayName
- Jul 23, 2017, 12:47:59
-
-
- testFactorial()
-
- com.apple.XCTPerformanceMetric_WallClockTime
-
- baselineAverage
- 0.66551
- baselineIntegrationDisplayName
- Jul 23, 2017, 12:47:59
-
-
- testFibonacciAddition()
-
- com.apple.XCTPerformanceMetric_WallClockTime
-
- baselineAverage
- 2.0881
- baselineIntegrationDisplayName
- Jul 23, 2017, 12:47:59
-
-
- testGCD()
-
- com.apple.XCTPerformanceMetric_WallClockTime
-
- baselineAverage
- 1.3696
- baselineIntegrationDisplayName
- Jul 23, 2017, 12:47:59
-
-
- testMersennePrimes()
-
- com.apple.XCTPerformanceMetric_WallClockTime
-
- baselineAverage
- 3.71
- baselineIntegrationDisplayName
- Jul 23, 2017, 12:47:59
-
-
- testModularExponentiation()
-
- com.apple.XCTPerformanceMetric_WallClockTime
-
- baselineAverage
- 1.8318
- baselineIntegrationDisplayName
- Jul 23, 2017, 12:47:59
-
-
- testPrintingFactorial()
-
- com.apple.XCTPerformanceMetric_WallClockTime
-
- baselineAverage
- 0.95106
- baselineIntegrationDisplayName
- Jul 23, 2017, 12:47:59
-
-
- testReadingFactorial()
-
- com.apple.XCTPerformanceMetric_WallClockTime
-
- baselineAverage
- 0.48879
- baselineIntegrationDisplayName
- Jul 23, 2017, 12:47:59
-
-
- testSquareRoot()
-
- com.apple.XCTPerformanceMetric_WallClockTime
-
- baselineAverage
- 0.45393
- baselineIntegrationDisplayName
- Jul 23, 2017, 12:47:59
-
-
-
-
-
-
diff --git a/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcbaselines/BB241C601DDB70B00067F917.xcbaseline/Info.plist b/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcbaselines/BB241C601DDB70B00067F917.xcbaseline/Info.plist
deleted file mode 100644
index 3d624f11a..000000000
--- a/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcbaselines/BB241C601DDB70B00067F917.xcbaseline/Info.plist
+++ /dev/null
@@ -1,57 +0,0 @@
-
-
-
-
- runDestinationsByUUID
-
- 3714311D-5102-4569-B213-8DC87DC6C2F3
-
- localComputer
-
- busSpeedInMHz
- 100
- cpuCount
- 1
- cpuKind
- Intel Core i7
- cpuSpeedInMHz
- 2600
- logicalCPUCoresPerPackage
- 8
- modelCode
- MacBookPro10,1
- physicalCPUCoresPerPackage
- 4
- platformIdentifier
- com.apple.platform.macosx
-
- targetArchitecture
- x86_64
-
- E75E9014-DB8C-4424-B05B-83660CCFB7ED
-
- localComputer
-
- busSpeedInMHz
- 100
- cpuCount
- 1
- cpuKind
- Intel Core i7
- cpuSpeedInMHz
- 2900
- logicalCPUCoresPerPackage
- 8
- modelCode
- MacBookPro14,3
- physicalCPUCoresPerPackage
- 4
- platformIdentifier
- com.apple.platform.macosx
-
- targetArchitecture
- x86_64
-
-
-
-
diff --git a/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcschemes/BigInt Benchmark.xcscheme b/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcschemes/BigInt Benchmark.xcscheme
deleted file mode 100644
index 5b99a9330..000000000
--- a/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcschemes/BigInt Benchmark.xcscheme
+++ /dev/null
@@ -1,53 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcschemes/BigInt-iOS.xcscheme b/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcschemes/BigInt-iOS.xcscheme
deleted file mode 100644
index 0fc086a8d..000000000
--- a/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcschemes/BigInt-iOS.xcscheme
+++ /dev/null
@@ -1,96 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcschemes/BigInt-macOS.xcscheme b/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcschemes/BigInt-macOS.xcscheme
deleted file mode 100644
index 50d05aa75..000000000
--- a/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcschemes/BigInt-macOS.xcscheme
+++ /dev/null
@@ -1,96 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcschemes/BigInt-tvOS.xcscheme b/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcschemes/BigInt-tvOS.xcscheme
deleted file mode 100644
index 16589b0d4..000000000
--- a/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcschemes/BigInt-tvOS.xcscheme
+++ /dev/null
@@ -1,96 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcschemes/BigInt-watchOS.xcscheme b/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcschemes/BigInt-watchOS.xcscheme
deleted file mode 100644
index 784c3d88e..000000000
--- a/Carthage/Checkouts/BigInt/BigInt.xcodeproj/xcshareddata/xcschemes/BigInt-watchOS.xcscheme
+++ /dev/null
@@ -1,77 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Carthage/Checkouts/BigInt/BigInt.xcworkspace/contents.xcworkspacedata b/Carthage/Checkouts/BigInt/BigInt.xcworkspace/contents.xcworkspacedata
deleted file mode 100644
index 8fad35107..000000000
--- a/Carthage/Checkouts/BigInt/BigInt.xcworkspace/contents.xcworkspacedata
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
diff --git a/Carthage/Checkouts/BigInt/BigInt.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Carthage/Checkouts/BigInt/BigInt.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
deleted file mode 100644
index 18d981003..000000000
--- a/Carthage/Checkouts/BigInt/BigInt.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
- IDEDidComputeMac32BitWarning
-
-
-
diff --git a/Carthage/Checkouts/BigInt/CHANGELOG.md b/Carthage/Checkouts/BigInt/CHANGELOG.md
deleted file mode 100644
index c77eae6e3..000000000
--- a/Carthage/Checkouts/BigInt/CHANGELOG.md
+++ /dev/null
@@ -1,232 +0,0 @@
-# 5.3.0 (2021-09-06)
-
-This release contains the following changes:
-
-- Make access level for isZero the same for signed and unsigned types (#93)
-
-- NFC: Add protocol conformance to Comparable for BigInt for consistency (#88)
-
-# 5.2.1 (2020-11-15)
-
-This release contains the following changes:
-
-- Added a temporary fix for [SR-13491](https://bugs.swift.org/browse/SR-13491)
-
-# 5.2.0 (2020-08-24)
-
-This release contains the following changes:
-
-- Added support for the use of RandomNumberGenerator
-
-# 5.1.0 (2020-03-17)
-
-This release contains the following changes:
-
-- Added support to serialize/deserialize BigInt in a manner similar to BigUInt
-
-# 5.0.0 (2019-08-24)
-
-This release contains the following changes:
-
-- Swift 5 compatibility
-
-There were no functional changes.
-
-# 4.0.1 (2019-05-09)
-
-This release contains the following changes:
-
-- Cleaned warnings on Swift 5
-
-There were no functional changes.
-
-# 4.0.0 (2019-04-03)
-
-This release contains the following changes:
-
-- Swift 5.0 compatibility for Linux and macOS
-- Removed SipHash dependency
-
-There were no functional changes.
-
-# 3.1.0 (2018-06-08)
-
-This release contains the following changes:
-
-- Swift 4.1 compatibility for Linux and macOS
-- Fix warnings for Swift 4.1
-
-There were no functional changes.
-
-# 3.0.2 (2017-12-25)
-
-This release contains the following packaging fix:
-
-- Fixed product definitions in Package.swift not to create a duplicate library. (Issue #37)
-
-There were no functional changes.
-
-# 3.0.1 (2017-10-10)
-
-This release contains the following bug fixes:
-
-- Issue #27 — changing scope of `BigUInt` methods `kind` and `storage` to be `fileprivate`
-- Making `subscript` method of `BigUInt` public
-
-# 3.0.0 (2017-09-07)
-
-This is a major release upgrading BigInt to the new integer protocols introduced in Swift 4 as part of [SE-0104, Protocol-oriented integers][se-0104].
-
-[se-0104]: https://github.com/apple/swift-evolution/blob/master/proposals/0104-improved-integers.md
-
-- Adopting the new protocols involved major, breaking changes throughout the API. These aren't individually listed here.
-- The `BigUInt` struct now provides inline storage for big integers that fit inside two words. This optimization speeds up conversions from built-in fixed-width integer types, amongst other frequent operations.
-- `BigInt` and `BigUInt` implements the new `Codable` protocol. In both cases, values are encoded in an unkeyed container starting with a string indicating the sign (`"+"` or `"-"`), followed by a sequence of 64-bit unsigned integers representing component words, from least to most significant.
-- New method: `BigInt.modulo`, contributed by @FabioTacke.
-- `BigUInt` does not implement `Collection` in this release. The collection of words is available in the standard read-only `words` property. Direct public access to collection methods have been removed; if you have been manipulating big integers using collection methods, you need to rewrite your code. If you have a usecase that isn't covered by the public API, please submit a PR adding the missing functionality. (Public read-write access to the underlying storage inside `BigUInt` will not be restored, though.)
-
-BigInt is now part of the Attaswift project. The bundle identifiers in the supplied Xcode project have been updated accordingly.
-
-Note that the URL for the package's Git repository has changed; please update your references.
-
-# 2.2.0 (2017-06-20)
-
-This release contains the following changes:
-
-- `BigUInt.randomIntegerLessThan(_:)` was renamed to `BigUInt.randomInteger(lessThan:)` to match Swift 3 naming conventions. (The old name is still available for compatibility.)
-- The `ShiftOperations` protocol was merged into `BigDigit` and removed. It was previously public by accident. (Issue #9)
-- `BigInt.modulus(_:,_:)` is a new static method that returns the nonnegative modulus value of its two arguments. (PR #19 by @FabioTacke)
-
-
-# 2.1.2 (2017-02-03)
-
-This release contains the following bugfix:
-
-- Issue #12: The iOS target in the supplied Xcode project file no longer copies extraneous files
- as resources into the framework bundle. The set of such files included generate-docs.sh, which
- led to App Store rejections for apps that build BigInt using the project file.
- (Thanks to @arrrnas and @wuftymerguftyguff)
-
-No source-level changes were made.
-
-# 2.1.1 (2016-11-23)
-
-This release restores support for iOS 8.0 and macOS 10.9.
-
-# 2.1.0 (2016-11-15)
-
-This release contains the following changes:
-
-- BigInt now uses the SipHash hashing algorithm instead of implementing its own hashing.
-- The `SipHash` package has been added as a required dependency. I suggest you use a dependency manager.
-- Minimum deployment targets have been bumped to iOS 9.0 and macOS 10.0 to match those of `SipHash`.
-- BigInt now requires Swift 3.0.1, included in Xcode 8.1.
-- The Xcode project file has been regenerated from scratch, with new names for targets and schemes.
-- The bundle identifiers of frameworks generated from the Xcode project file have been changed to `hu.lorentey.BigInt.`.
-
-# 2.0.1 (2016-11-08)
-
-This release contains the following bugfixes:
-
-- The Swift version number is now correctly set in all targets (PR #7 by @mAu888).
-- BigInt now builds on Linux (PR #5 by @ratranqu).
-- Building BigInt with the Swift Package Manager bundled with Swift 3.0.1 works correctly.
-
-Additionally, Foundation imports that weren't actually needed were removed from sources.
-
-# 2.0.0 (2016-09-20)
-
-This release updates the project for Swift 3.0, including adapting the API to the new naming conventions.
-
-Further changes:
-
-- The behavior of `BigUInt.gcd` when one of the arguments is zero has been fixed; the result in this case is now equal to the other argument.
-- `BigInt` now conforms to `Strideable`, `IntegerArithmetic`, `SignedNumber` and `AbsoluteValuable`.
-- `BigUInt` now conforms to `Strideable`, `IntegerArithmetic` and `BitwiseOperations`.
-
-# 1.3.0 (2016-03-23)
-
-This release updates the project to require Swift 2.2 and Xcode 7.3. There have been no other changes.
-
-# 1.2.3 (2016-01-12)
-
-This release adds experimental support for the Swift Package Manager and Swift 2.2.
-There were no source-level changes.
-
-# 1.2.2 (2016-01-08)
-
-This release fixes version numbers embedded in build products.
-
-# 1.2.1 (2016-01-07)
-
-This release simply removes the stray LICENSE.md file from iOS builds.
-
-
-# 1.2.0 (2016-01-06)
-
-With this release, BigInt supports watchOS and tvOS in addition to OS X and iOS. Deployment targets are as follows:
-
-- OS X 10.9
-- iOS 8
-- watchOS 2
-- tvOS 9
-
-BigInt 1.2.0 also features support for both Carthage and CocoaPods deployments.
-
-
-# 1.1.0 (2016-01-06)
-
-`BigInt` now contains enough functionality to pretend it's a respectable big integer lib. Some of the new additions since 1.0.0:
-
-- Conversion to/from `NSData`
-- Vanilla exponentiation
-- Algorithm to find the multiplicative inverse of an integer in modulo arithmetic
-- An implementation of the Miller-Rabin primality test
-- Support for generating random big integers
-- Better support for playgrounds in Xcode
-- Documentation for all public API
-- Fun new calculation samples
-
-
-# 1.0.0 (2016-01-04)
-
-This is the first release of the BigInt module, providing arbitrary precision integer arithmetic operations
-in pure Swift.
-
-Two big integer types are included: `BigUInt` and `BigInt`, the latter being the signed variant.
-Both of these are Swift structs with copy-on-write value semantics, and they can be used much
-like any other integer type.
-
-The library provides implementations for some of the most frequently useful functions on
-big integers, including
-
-- All functionality from `Comparable` and `Hashable`
-- The full set of arithmetic operators: `+`, `-`, `*`, `/`, `%`, `+=`, `-=`, `*=`, `/=`, `%=`
-- Addition and subtraction have variants that allow for shifting the digits of the second
-operand on the fly.
-- Unsigned subtraction will trap when the result would be negative. (There are variants
-that return an overflow flag.)
-- Multiplication uses brute force for numbers up to 1024 digits, then switches to Karatsuba's recursive method.
-(This limit is configurable, see `BigUInt.directMultiplicationLimit`.)
-A fused multiply-add method is also available.
-- Division uses Knuth's Algorithm D, with its 3/2 digits wide quotient approximation.
-It will trap when the divisor is zero. `BigUInt.divmod` returns the quotient and
-remainder at once; this is faster than calculating them separately.
-- Bitwise operators: `~`, `|`, `&`, `^`, `|=`, `&=`, `^=`, plus the following read-only properties:
-- `width`: the minimum number of bits required to store the integer,
-- `trailingZeroBitCount`: the number of trailing zero bits in the binary representation,
-- `leadingZeroBitCount`: the number of leading zero bits (when the last digit isn't full),
-- Shift operators: `>>`, `<<`, `>>=`, `<<=`
-- Left shifts need to allocate memory to extend the digit array, so it's probably not a good idea
-to left shift a `BigUInt` by 2^50 bits.
-- Radix conversion between `String`s and big integers up to base 36 (using repeated divisions).
-- Big integers use this to implement `StringLiteralConvertible` (in base 10).
-- `sqrt(n)`: The square root of an integer (using Newton's method)
-- `BigUInt.gcd(n, m)`: The greatest common divisor of two integers (Stein's algorithm)
-- `BigUInt.powmod(base, exponent, modulus)`: Modular exponentiation (right-to-left binary method):
-
-The implementations are intended to be reasonably efficient, but they are unlikely to be
-competitive with GMP at all, even when I happened to implement an algorithm with same asymptotic
-behavior as GMP. (I haven't performed a comparison benchmark, though.)
-
-The library has 100% unit test coverage.
diff --git a/Carthage/Checkouts/BigInt/Demo.playground/Contents.o b/Carthage/Checkouts/BigInt/Demo.playground/Contents.o
deleted file mode 100644
index b8daafd61..000000000
Binary files a/Carthage/Checkouts/BigInt/Demo.playground/Contents.o and /dev/null differ
diff --git a/Carthage/Checkouts/BigInt/Demo.playground/Pages/Digits of Pi.xcplaygroundpage/Contents.swift b/Carthage/Checkouts/BigInt/Demo.playground/Pages/Digits of Pi.xcplaygroundpage/Contents.swift
deleted file mode 100644
index 092120fe7..000000000
--- a/Carthage/Checkouts/BigInt/Demo.playground/Pages/Digits of Pi.xcplaygroundpage/Contents.swift
+++ /dev/null
@@ -1,28 +0,0 @@
-//: [Previous](@previous)
-import BigInt
-//: ## Let's calculate the first thousand digits of π
-//:
-//: A fun application of BigInts is generating the digits of π.
-//: Let's implement [Jeremy Gibbon's spigot algorithm][spigot] as an infinite `GeneratorType`.
-//: This is a quite slow algorithm, but it makes up for it with its grooviness factor.
-//:
-//: [spigot]: http://www.cs.ox.ac.uk/jeremy.gibbons/publications/spigot.pdf
-func digitsOfPi() -> AnyIterator {
- var q: BigUInt = 1
- var r: BigUInt = 180
- var t: BigUInt = 60
- var i: UInt = 2 // Works until digit #826_566_842
- return AnyIterator {
- let u: UInt = 3 * (3 * i + 1) * (3 * i + 2)
- let y = (q.multiplied(byWord: 27 * i - 12) + 5 * r) / (5 * t)
- (q, r, t) = (
- 10 * q.multiplied(byWord: i * (2 * i - 1)),
- 10 * (q.multiplied(byWord: 5 * i - 2) + r - y * t).multiplied(byWord: u),
- t.multiplied(byWord: u))
- i += 1
- return Int(y.words[0])
- }
-}
-//: Well, that was surprisingly easy. Does it work? You bet:
-let digits = digitsOfPi().prefix(999).reduce("") { $0 + String($1) }
-//: [Next](@next)
diff --git a/Carthage/Checkouts/BigInt/Demo.playground/Pages/Factorials.xcplaygroundpage/Contents.swift b/Carthage/Checkouts/BigInt/Demo.playground/Pages/Factorials.xcplaygroundpage/Contents.swift
deleted file mode 100644
index 24e7992b3..000000000
--- a/Carthage/Checkouts/BigInt/Demo.playground/Pages/Factorials.xcplaygroundpage/Contents.swift
+++ /dev/null
@@ -1,30 +0,0 @@
-//: [Previous](@previous)
-import Foundation
-import BigInt
-//: The canonical way to demo big integers is with the factorial function. Here is a fancy definition for it:
-func fact(_ n: Int) -> BigInt {
- return (1 ... n).map { BigInt($0) }.reduce(BigInt(1), *)
-}
-
-let f1 = fact(1)
-let f2 = fact(2)
-let f3 = fact(3)
-let f4 = fact(4)
-let f10 = fact(10)
-let f100 = fact(100)
-let f1000 = fact(1000)
-//: That last value seems quite large. Just how many decimal digits is it? Let's convert it to a `String` to find out.
-let decimal = String(f1000)
-let digitCount = decimal.characters.count
-//: Wow. 2500 digits is peanuts for `BigInt`, but Xcode's playground tech isn't designed to perform well with much more loop iterations, so let's stay at this level for now.
-let ff2 = f1000 * f1000
-String(ff2).characters.count
-
-let ff4 = ff2 * ff2
-String(ff4).characters.count
-
-let ff8 = ff4 * ff4
-String(ff8).characters.count
-//: That last operation multiplied two 10000-digit numbers; you may have noticed it took a couple of seconds to compute that value. Converting such huge values to decimal isn't particularly cheap, either.
-//:
-//: [Next](@next)
diff --git a/Carthage/Checkouts/BigInt/Demo.playground/Pages/Generating Large Primes.xcplaygroundpage/Contents.swift b/Carthage/Checkouts/BigInt/Demo.playground/Pages/Generating Large Primes.xcplaygroundpage/Contents.swift
deleted file mode 100644
index bc08ca525..000000000
--- a/Carthage/Checkouts/BigInt/Demo.playground/Pages/Generating Large Primes.xcplaygroundpage/Contents.swift
+++ /dev/null
@@ -1,25 +0,0 @@
-//: [Previous](@previous)
-import Foundation
-import BigInt
-//: # Generating Large Prime Numbers
-//:
-//: `BigUInt` has an `isPrime()` method that does a [Miller-Rabin Primality Test][mrpt]. Let's use
-//: this to create a function that finds the next prime number after any integer:
-//:
-//: [mrpt]: https://en.wikipedia.org/wiki/Miller%2dRabin_primality_test
-func findNextPrime(after integer: BigUInt) -> BigUInt {
- var candidate = integer
- repeat {
- candidate.increment()
- } while !candidate.isPrime()
- return candidate
-}
-
-findNextPrime(after: 100)
-findNextPrime(after: 1000)
-findNextPrime(after: 10000)
-findNextPrime(after: 100000000000)
-findNextPrime(after: BigUInt(1) << 64)
-findNextPrime(after: BigUInt(1) << 128)
-findNextPrime(after: BigUInt(1) << 256)
-//: [Next](@next)
diff --git a/Carthage/Checkouts/BigInt/Demo.playground/Pages/Introduction.xcplaygroundpage/Contents.swift b/Carthage/Checkouts/BigInt/Demo.playground/Pages/Introduction.xcplaygroundpage/Contents.swift
deleted file mode 100644
index 375a30581..000000000
--- a/Carthage/Checkouts/BigInt/Demo.playground/Pages/Introduction.xcplaygroundpage/Contents.swift
+++ /dev/null
@@ -1,31 +0,0 @@
-//: # Introduction
-//:
-//: The `BigInt` module provides a `BigInt` type that implements an [https://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic](integer type of arbitrary width).
-//: These work much like `Int`s, but they don't have a preset maximum value---so they will never overflow.
-//: The only practical limit to their capacity is the amount of memory & address space that your computer has, and the
-//: amount of time you're willing to spend waiting for results---when their operands are truly huge,
-//: big integer operations can take a long time to execute.
-//: (`BigInt` represents integers in base 2^64, storing digits in an `Array`, so the theoretical
-//: maximum value it can store is (2^64)^`Int.max` - 1.)
-import Foundation
-import BigInt
-//: `BigInt` has several interesting initializers, but for now, the simplest way to create big integers is to use integer
-//: or string literals. The latter is useful when you want to create a number that's larger than `UIntMax.max`:
-let a: BigInt = 123
-let b: BigInt = 12345678
-let c: BigInt = 1234567890123456
-let d: BigInt = "12345678901234567890123456789012345678901234567890123456789012345678"
-//: To work with `BigInt`s, you use the same arithmetic operators as you do with everyday `Int` values:
-a + b
-b - a
--b
-a * b
-a * b * c
-a * b * c * d
-
-d / c
-d % c
-d / (c * c)
-d / (c * c * c)
-d / (c * c * c * c)
-//: [Next](@next)
diff --git a/Carthage/Checkouts/BigInt/Demo.playground/Pages/The RSA algorithm.xcplaygroundpage/Contents.swift b/Carthage/Checkouts/BigInt/Demo.playground/Pages/The RSA algorithm.xcplaygroundpage/Contents.swift
deleted file mode 100644
index 43e759411..000000000
--- a/Carthage/Checkouts/BigInt/Demo.playground/Pages/The RSA algorithm.xcplaygroundpage/Contents.swift
+++ /dev/null
@@ -1,57 +0,0 @@
-//: [Previous](@previous)
-import Foundation
-import BigInt
-//: # RSA cryptography
-//:
-//: Another useful thing to have is a function that finds a random n-bit prime number:
-func generatePrime(ofWidth width: Int) -> BigUInt {
- while true {
- var random = BigUInt.randomInteger(withExactWidth: width)
- random |= BigUInt(1)
- if random.isPrime() {
- return random
- }
- }
-}
-//: For instance, here are two random 1024-bit prime numbers:
-let p = generatePrime(ofWidth: 1024)
-let q = generatePrime(ofWidth: 1024)
-//: We know their product isn't prime, and `BigInt`'s primality test agrees:
-let n = p * q
-n.isPrime()
-//: But we'd be in serious trouble if we had to get `p` and `q` back by factoring `n`---and this observation is
-//: what makes RSA work.
-//:
-//: So let's derive a public/private RSA keypair out of these two primes:
-//:
-//: (Note though that in a real RSA cryptosystem, primes are chosen much more carefully.)
-let phi = (p - 1) * (q - 1)
-let e: BigUInt = 65537
-let d = e.inverse(phi)!
-
-d * e % phi
-
-typealias Key = (modulus: BigUInt, exponent: BigUInt)
-
-let publicKey: Key = (n, e)
-let privateKey: Key = (n, d)
-//: Given a key and a message, encryption is simply a modular exponentiation:
-//: (Again, this is an oversimplification. In the real RSA system, the message is first transformed by a
-//: [complex padding scheme][oaep].)
-//:
-//: [oaep]: https://en.wikipedia.org/wiki/Optimal_asymmetric_encryption_padding
-func encrypt(_ message: BigUInt, key: Key) -> BigUInt {
- return message.power(key.exponent, modulus: key.modulus)
-}
-//: Let's try encrypting some message with the public key.
-let secret: BigUInt = BigUInt("Arbitrary precision arithmetic is fun!".data(using: .utf8)!)
-
-let cyphertext = encrypt(secret, key: publicKey)
-//: Well that was easy. In theory, we can decrypt the cyphertext by simply encrypting it with the private key.
-//: But does it really work? Yep:
-let plaintext = encrypt(cyphertext, key: privateKey)
-
-let message = String(data: plaintext.serialize(), encoding: .utf8)
-//: Isn't that awesome?
-//:
-//: [Next](@next)
diff --git a/Carthage/Checkouts/BigInt/Demo.playground/contents.xcplayground b/Carthage/Checkouts/BigInt/Demo.playground/contents.xcplayground
deleted file mode 100644
index 5a1e6af0e..000000000
--- a/Carthage/Checkouts/BigInt/Demo.playground/contents.xcplayground
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Carthage/Checkouts/BigInt/LICENSE.md b/Carthage/Checkouts/BigInt/LICENSE.md
deleted file mode 100644
index 18cefd118..000000000
--- a/Carthage/Checkouts/BigInt/LICENSE.md
+++ /dev/null
@@ -1,20 +0,0 @@
-
-Copyright (c) 2016-2017 Károly Lőrentey
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/Carthage/Checkouts/BigInt/LinuxMain.swift b/Carthage/Checkouts/BigInt/LinuxMain.swift
deleted file mode 100644
index 1d6ba3763..000000000
--- a/Carthage/Checkouts/BigInt/LinuxMain.swift
+++ /dev/null
@@ -1,7 +0,0 @@
-import XCTest
-@testable import BigIntTests
-
-XCTMain([
- testCase(BigIntTests.allTests),
- testCase(BigUIntTests.allTests),
-])
diff --git a/Carthage/Checkouts/BigInt/Package.swift b/Carthage/Checkouts/BigInt/Package.swift
deleted file mode 100644
index 7bc0b9771..000000000
--- a/Carthage/Checkouts/BigInt/Package.swift
+++ /dev/null
@@ -1,21 +0,0 @@
-// swift-tools-version:5.0
-//
-// Package.swift
-// BigInt
-//
-// Created by Károly Lőrentey on 2016-01-12.
-// Copyright © 2016-2017 Károly Lőrentey.
-//
-
-import PackageDescription
-
-let package = Package(
- name: "BigInt",
- products: [
- .library(name: "BigInt", targets: ["BigInt"])
- ],
- targets: [
- .target(name: "BigInt", path: "Sources"),
- .testTarget(name: "BigIntTests", dependencies: ["BigInt"], path: "Tests")
- ]
-)
diff --git a/Carthage/Checkouts/BigInt/README.md b/Carthage/Checkouts/BigInt/README.md
deleted file mode 100644
index 66061769b..000000000
--- a/Carthage/Checkouts/BigInt/README.md
+++ /dev/null
@@ -1,431 +0,0 @@
-[](https://github.com/attaswift/BigInt)
-
-* [Overview](#overview)
-* [API Documentation](#api)
-* [License](#license)
-* [Requirements and Integration](#integration)
-* [Implementation Notes](#notes)
- * [Full-width multiplication and division primitives](#fullwidth)
- * [Why is there no generic `BigInt` type?](#generics)
-* [Calculation Samples](#samples)
- * [Obligatory factorial demo](#factorial)
- * [RSA Cryptography](#rsa)
- * [Calculating the Digits of π](#pi)
-
-[](https://developer.apple.com/swift/)
-[](http://cocoapods.org/pods/BigInt)
-[](http://cocoapods.org/pods/BigInt)
-
-
-[](https://codecov.io/github/attaswift/BigInt?branch=master)
-[](https://attaswift.github.io/BigInt/)
-[](https://github.com/Carthage/Carthage)
-[](http://cocoapods.org/pods/BigInt)
-
-## Overview
-
-This repository provides [integer types of arbitrary width][wiki] implemented
-in 100% pure Swift. The underlying representation is in base 2^64, using `Array`.
-
-[wiki]: https://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic
-
-This module is handy when you need an integer type that's wider than `UIntMax`, but
-you don't want to add [The GNU Multiple Precision Arithmetic Library][GMP]
-as a dependency.
-
-[GMP]: https://gmplib.org
-
-Two big integer types are included: [`BigUInt`][BigUInt] and [`BigInt`][BigInt],
-the latter being the signed variant.
-Both of these are Swift structs with copy-on-write value semantics, and they can be used much
-like any other integer type.
-
-The library provides implementations for some of the most frequently useful functions on
-big integers, including
-
-- All functionality from [`Comparable`][comparison] and [`Hashable`][hashing]
-
-- [The full set of arithmetic operators][addition]: `+`, `-`, `*`, `/`, `%`, `+=`, `-=`, `*=`, `/=`, `%=`
- - [Addition][addition] and [subtraction][subtraction] have variants that allow for
- shifting the digits of the second operand on the fly.
- - Unsigned subtraction will trap when the result would be negative.
- ([There are variants][subtraction] that return an overflow flag.)
- - [Multiplication][mul] uses brute force for numbers up to 1024 digits, then switches to Karatsuba's recursive method.
- (This limit is configurable, see `BigUInt.directMultiplicationLimit`.)
- - A [fused multiply-add][fused] method is also available, along with other [special-case variants][multiplication].
- - [Division][division] uses Knuth's Algorithm D, with its 3/2 digits wide quotient approximation.
- It will trap when the divisor is zero.
- - [`BigUInt.divide`][divide] returns the quotient and
- remainder at once; this is faster than calculating them separately.
-
-- [Bitwise operators][bitwise]: `~`, `|`, `&`, `^`, `|=`, `&=`, `^=`, plus the following read-only properties:
- - [`width`][width]: the minimum number of bits required to store the integer,
- - [`trailingZeroBitCount`][trailingZeroBitCount]: the number of trailing zero bits in the binary representation,
- - [`leadingZeroBitCount`][leadingZeroBitCount]: the number of leading zero bits (when the last digit isn't full),
-
-- [Shift operators][shift]: `>>`, `<<`, `>>=`, `<<=`
-
-- Methods to [convert `NSData` to big integers][data] and vice versa.
-
-- Support for [generating random integers][random] of specified maximum width or magnitude.
-
-- Radix conversion to/from [`String`s][radix1] and [big integers][radix2] up to base 36 (using repeated divisions).
- - Big integers use this to implement `StringLiteralConvertible` (in base 10).
-
-- [`sqrt(n)`][sqrt]: The square root of an integer (using Newton's method).
-
-- [`BigUInt.gcd(n, m)`][GCD]: The greatest common divisor of two integers (Stein's algorithm).
-
-- [`base.power(exponent, modulus)`][powmod]: Modular exponentiation (right-to-left binary method).
- [Vanilla exponentiation][power] is also available.
-- [`n.inverse(modulus)`][inverse]: Multiplicative inverse in modulo arithmetic (extended Euclidean algorithm).
-- [`n.isPrime()`][prime]: Miller–Rabin primality test.
-
-The implementations are intended to be reasonably efficient, but they are unlikely to be
-competitive with GMP at all, even when I happened to implement an algorithm with same asymptotic
-behavior as GMP. (I haven't performed a comparison benchmark, though.)
-
-The library has 100% unit test coverage. Sadly this does not imply that there are no bugs
-in it.
-
-## API Documentation
-
-Generated API docs are available at https://attaswift.github.io/BigInt/.
-
-## License
-
-BigInt can be used, distributed and modified under [the MIT license][license].
-
-## Requirements and Integration
-
-BigInt 4.0.0 requires Swift 4.2 (The last version with support for Swift 3.x was BigInt 2.1.0.
-The last version with support for Swift 2 was BigInt 1.3.0.)
-
-| Swift Version | last BigInt Version|
-| ------------- |:-------------------|
-| 3.x | 2.1.0 |
-| 4.0 | 3.1.0 |
-| 4.2 | 4.0.0 |
-| 5.x | 5.3.0 |
-
-BigInt deploys to macOS 10.10, iOS 9, watchOS 2 and tvOS 9.
-It has been tested on the latest OS releases only---however, as the module uses very few platform-provided APIs,
-there should be very few issues with earlier versions.
-
-BigInt uses no APIs specific to Apple platforms, so
-it should be easy to port it to other operating systems.
-
-Setup instructions:
-
-- **Swift Package Manager:**
- Although the Package Manager is still in its infancy, BigInt provides experimental support for it.
- Add this to the dependency section of your `Package.swift` manifest:
-
- ```Swift
- .package(url: "https://github.com/attaswift/BigInt.git", from: "5.3.0")
- ```
-
-- **CocoaPods:** Put this in your `Podfile`:
-
- ```Ruby
- pod 'BigInt', '~> 5.3'
- ```
-
-- **Carthage:** Put this in your `Cartfile`:
-
- ```
- github "attaswift/BigInt" ~> 5.3
- ```
-
-## Implementation notes
-
-[`BigUInt`][BigUInt] is a `MutableCollectionType` of its 64-bit digits, with the least significant
-digit at index 0. As a convenience, [`BigUInt`][BigUInt] allows you to subscript it with indexes at
-or above its `count`. [The subscript operator][subscript] returns 0 for out-of-bound `get`s and
-automatically extends the array on out-of-bound `set`s. This makes memory management simpler.
-
-[`BigInt`][BigInt] is just a tiny wrapper around a `BigUInt` [absolute value][magnitude] and a
-[sign bit][negative], both of which are accessible as public read-write properties.
-
-### Why is there no generic `BigInt` type?
-
-The types provided by `BigInt` are not parametric—this is very much intentional, as
-Swift generics cost us dearly at runtime in this use case. In every approach I tried,
-making arbitrary-precision arithmetic operations work with a generic `Digit` type parameter
-resulted in code that was literally *ten times slower*. If you can make the algorithms generic
-without such a huge performance hit, [please enlighten me][twitter]!
-
-This is an area that I plan to investigate more, as it would be useful to have generic
-implementations for arbitrary-width arithmetic operations. (Polynomial division and decimal bases
-are two examples.) The library already implements double-digit multiplication and division as
-extension methods on a protocol with an associated type requirement; this has not measurably affected
-performance. Unfortunately, the same is not true for `BigUInt`'s methods.
-
-Of course, as a last resort, we could just duplicate the code to create a separate
-generic variant that was slower but more flexible.
-
-[license]: https://github.com/attaswift/BigInt/blob/master/LICENSE.md
-[twitter]: https://twitter.com/lorentey
-[BigUInt]: http://attaswift.github.io/BigInt/Structs/BigUInt.html
-[BigInt]: http://attaswift.github.io/BigInt/Structs/BigInt.html
-[comparison]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/Comparison
-[hashing]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/Hashing
-[addition]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/Addition
-[subtraction]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/Subtraction
-[mul]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/s:ZFV6BigInt7BigUIntoi1mFTS0_S0__S0_
-[fused]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/s:FV6BigInt7BigUInt14multiplyAndAddFTS0_Vs6UInt6410atPositionSi_T_
-[multiplication]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/Multiplication
-[division]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/Division
-[divide]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/s:FV6BigInt7BigUInt7dividedFT2byS0__T8quotientS0_9remainderS0__
-[bitwise]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/Bitwise%20Operations
-[width]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/s:vV6BigInt7BigUInt5widthSi
-[leadingZeroBitCount]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/s:vV6BigInt7BigUInt13leadingZeroBitCountSi
-[trailingZeroBitCount]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/s:vV6BigInt7BigUInt14trailingZeroBitCountSi
-[shift]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/Shift%20Operators
-[data]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/NSData%20Conversion
-[random]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/Random%20Integers
-[radix1]: http://attaswift.github.io/BigInt/Extensions/String.html#/s:FE6BigIntSScFTVS_7BigUInt5radixSi9uppercaseSb_SS
-[radix2]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/s:FV6BigInt7BigUIntcFTSS5radixSi_GSqS0__
-[sqrt]: http://attaswift.github.io/BigInt/Functions.html#/s:F6BigInt4sqrtFVS_7BigUIntS0_
-[GCD]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/s:ZFV6BigInt7BigUInt3gcdFTS0_S0__S0_
-[powmod]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/s:FV6BigInt7BigUInt5powerFTS0_7modulusS0__S0_
-[power]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/s:FV6BigInt7BigUInt5powerFSiS0_
-[inverse]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/s:FV6BigInt7BigUInt7inverseFS0_GSqS0__
-[prime]: http://attaswift.github.io/BigInt/Structs/BigUInt.html#/Primality%20Testing
-[abs]: http://attaswift.github.io/BigInt/Structs/BigInt.html#/s:vV6BigInt6BigInt3absVS_7BigUInt
-[negative]: http://attaswift.github.io/BigInt/Structs/BigInt.html#/s:vV6BigInt6BigInt8negativeSb
-[subscript]: https://github.com/attaswift/BigInt/blob/v2.0.0/Sources/BigUInt.swift#L216-L239
-[fullmuldiv]: https://github.com/attaswift/BigInt/blob/v2.0.0/Sources/BigDigit.swift#L96-L167
-
-
-## Calculation Samples
-
-### Obligatory Factorial Demo
-
-It is easy to use `BigInt` to calculate the factorial function for any integer:
-
-```Swift
-import BigInt
-
-func factorial(_ n: Int) -> BigInt {
- return (1 ... n).map { BigInt($0) }.reduce(BigInt(1), *)
-}
-
-print(factorial(10))
-==> 362880
-
-print(factorial(100))
-==> 93326215443944152681699238856266700490715968264381621468592963895217599993229915
- 6089414639761565182862536979208272237582511852109168640000000000000000000000
-
-print(factorial(1000))
-==> 40238726007709377354370243392300398571937486421071463254379991042993851239862902
- 05920442084869694048004799886101971960586316668729948085589013238296699445909974
- 24504087073759918823627727188732519779505950995276120874975462497043601418278094
- 64649629105639388743788648733711918104582578364784997701247663288983595573543251
- 31853239584630755574091142624174743493475534286465766116677973966688202912073791
- 43853719588249808126867838374559731746136085379534524221586593201928090878297308
- 43139284440328123155861103697680135730421616874760967587134831202547858932076716
- 91324484262361314125087802080002616831510273418279777047846358681701643650241536
- 91398281264810213092761244896359928705114964975419909342221566832572080821333186
- 11681155361583654698404670897560290095053761647584772842188967964624494516076535
- 34081989013854424879849599533191017233555566021394503997362807501378376153071277
- 61926849034352625200015888535147331611702103968175921510907788019393178114194545
- 25722386554146106289218796022383897147608850627686296714667469756291123408243920
- 81601537808898939645182632436716167621791689097799119037540312746222899880051954
- 44414282012187361745992642956581746628302955570299024324153181617210465832036786
- 90611726015878352075151628422554026517048330422614397428693306169089796848259012
- 54583271682264580665267699586526822728070757813918581788896522081643483448259932
- 66043367660176999612831860788386150279465955131156552036093988180612138558600301
- 43569452722420634463179746059468257310379008402443243846565724501440282188525247
- 09351906209290231364932734975655139587205596542287497740114133469627154228458623
- 77387538230483865688976461927383814900140767310446640259899490222221765904339901
- 88601856652648506179970235619389701786004081188972991831102117122984590164192106
- 88843871218556461249607987229085192968193723886426148396573822911231250241866493
- 53143970137428531926649875337218940694281434118520158014123344828015051399694290
- 15348307764456909907315243327828826986460278986432113908350621709500259738986355
- 42771967428222487575867657523442202075736305694988250879689281627538488633969099
- 59826280956121450994871701244516461260379029309120889086942028510640182154399457
- 15680594187274899809425474217358240106367740459574178516082923013535808184009699
- 63725242305608559037006242712434169090041536901059339838357779394109700277534720
- 00000000000000000000000000000000000000000000000000000000000000000000000000000000
- 00000000000000000000000000000000000000000000000000000000000000000000000000000000
- 00000000000000000000000000000000000000000000000000000000000000000000000000000000
- 00000
-```
-
-Well, I guess that's all right, but it's not very interesting. Let's try something more useful.
-
-### RSA Cryptography
-
-The `BigInt` module provides all necessary parts to implement an (overly)
-simple [RSA cryptography system][RSA].
-
-[RSA]: https://en.wikipedia.org/wiki/RSA_(cryptosystem)
-
-Let's start with a simple function that generates a random n-bit prime. The module
-includes a function to generate random integers of a specific size, and also an
-`isPrime` method that performs the Miller–Rabin primality test. These are all we need:
-
-```Swift
-func generatePrime(_ width: Int) -> BigUInt {
- while true {
- var random = BigUInt.randomInteger(withExactWidth: width)
- random |= BigUInt(1)
- if random.isPrime() {
- return random
- }
- }
-}
-
-let p = generatePrime(1024)
-==> 13308187650642192396256419911012544845370493728424936791561478318443071617242872
- 81980956747087187419914435169914161116601678883358611076800743580556055714173922
- 08406194264346635072293912609713085260354070700055888678514690878149253177960273
- 775659537560220378850112471985434373425534121373466492101182463962031
-
-let q = generatePrime(1024)
-==> 17072954422657145489547308812333368925007949054501204983863958355897172093173783
- 10108226596943999553784252564650624766276133157586733504784616138305701168410157
- 80784336308507083874651158029602582993233111593356512531869546706885170044355115
- 669728424124141763799008880327106952436883614887277350838425336156327
-```
-
-Cool! Now that we have two large primes, we can produce an RSA public/private keypair
-out of them.
-
-```Swift
-typealias Key = (modulus: BigUInt, exponent: BigUInt)
-
-let n = p * q
-==> 22721008120758282530010953362926306641542233757318103044313144976976529789946696
- 15454966720907712515917481418981591379647635391260569349099666410127279690367978
- 81184375533755888994370640857883754985364288413796100527262763202679037134021810
- 57933883525572232242690805678883227791774442041516929419640051653934584376704034
- 63953169772816907280591934423237977258358097846511079947337857778137177570668391
- 57455417707100275487770399281417352829897118140972240757708561027087217205975220
- 02207275447810167397968435583004676293892340103729490987263776871467057582629588
- 916498579594964478080508868267360515953225283461208420137
-
-let e: BigUInt = 65537
-let phi = (p - 1) * (q - 1)
-let d = e.inverse(phi)! // d * e % phi == 1
-==> 13964664343869014759736350480776837992604500903989703383202366291905558996277719
- 77822086142456362972689566985925179681282432115598451765899180050962461295573831
- 37069237934291884106584820998146965085531433195106686745474222222620986858696591
- 69836532468835154412554521152103642453158895363417640676611704542784576974374954
- 45789456921660619938185093118762690200980720312508614337759620606992462563490422
- 76669559556568917533268479190948959560397579572761529852891246283539604545691244
- 89999692877158676643042118662613875863504016129837099223040687512684532694527109
- 80742873307409704484365002175294665608486688146261327793
-
-let publicKey: Key = (n, e)
-let privateKey: Key = (n, d)
-```
-
-In RSA, modular exponentiation is used to encrypt (and decrypt) messages.
-
-```Swift
-func encrypt(_ message: BigUInt, key: Key) -> BigUInt {
- return message.power(key.exponent, modulus: key.modulus)
-}
-```
-
-Let's try out our new keypair by converting a string into UTF-8, interpreting
-the resulting binary representation as a big integer, and encrypting it with the
-public key. `BigUInt` has an initializer that takes an `NSData`, so this is pretty
-easy to do:
-
-```Swift
-let secret: BigUInt = BigUInt("Arbitrary precision arithmetic is fun!".dataUsingEncoding(NSUTF8StringEncoding)!)
-==> 83323446846105976078466731524728681905293067701804838925389198929123912971229457
- 68818568737
-
-let cyphertext = encrypt(secret, key: publicKey)
-==> 95186982543485985200666516508066093880038842892337880561554910904277290917831453
- 54854954722744805432145474047391353716305176389470779020645959135298322520888633
- 61674945129099575943384767330342554525120384485469428048962027149169876127890306
- 77028183904699491962050888974524603226290836984166164759586952419343589385279641
- 47999991283152843977988979846238236160274201261075188190509539751990119132013021
- 74866638595734222867005089157198503204192264814750832072844208520394603054901706
- 06024394731371973402595826456435944968439153664617188570808940022471990638468783
- 49208193955207336172861151720299024935127021719852700882
-```
-
-Well, it looks encrypted all right, but can we get the original message back?
-In theory, encrypting the cyphertext with the private key returns the original message.
-Let's see:
-
-```Swift
-let plaintext = encrypt(cyphertext, key: privateKey)
-==> 83323446846105976078466731524728681905293067701804838925389198929123912971229457
- 68818568737
-
-let received = String(data: plaintext.serialize(), encoding: NSUTF8StringEncoding)
-==> "Arbitrary precision arithmetic is fun!"
-```
-
-Yay! This is truly terrific, but please don't use this example code in an actual
-cryptography system. RSA has lots of subtle (and some not so subtle) complications
-that we ignored to keep this example short.
-
-### Calculating the Digits of π
-
-Another fun activity to try with `BigInt`s is to generate the digits of π.
-Let's try implementing [Jeremy Gibbon's spigot algorithm][spigot].
-This is a rather slow algorithm as π-generators go, but it makes up for it with its grooviness
-factor: it's remarkably short, it only uses (big) integer arithmetic, and every iteration
-produces a single new digit in the base-10 representation of π. This naturally leads to an
-implementation as an infinite `GeneratorType`:
-
-[spigot]: http://www.cs.ox.ac.uk/jeremy.gibbons/publications/spigot.pdf
-
-```Swift
-func digitsOfPi() -> AnyGenerator {
- var q: BigUInt = 1
- var r: BigUInt = 180
- var t: BigUInt = 60
- var i: UInt64 = 2 // Does not overflow until digit #826_566_842
- return AnyIterator {
- let u: UInt64 = 3 * (3 * i + 1) * (3 * i + 2)
- let y = (q.multiplied(byDigit: 27 * i - 12) + 5 * r) / (5 * t)
- (q, r, t) = (
- 10 * q.multiplied(byDigit: i * (2 * i - 1)),
- 10 * (q.multiplied(byDigit: 5 * i - 2) + r - y * t).multiplied(byDigit: u),
- t.multiplied(byDigit: u))
- i += 1
- return Int(y[0])
- }
-}
-```
-
-Well, that was surprisingly easy. But does it work? Of course it does!
-
-```Swift
-var digits = "π ≈ "
-var count = 0
-for digit in digitsOfPi() {
- assert(digit < 10)
- digits += String(digit)
- count += 1
- if count == 1 { digits += "." }
- if count == 1000 { break }
-}
-
-digits
-==> π ≈ 3.14159265358979323846264338327950288419716939937510582097494459230781640628
- 62089986280348253421170679821480865132823066470938446095505822317253594081284811
- 17450284102701938521105559644622948954930381964428810975665933446128475648233786
- 78316527120190914564856692346034861045432664821339360726024914127372458700660631
- 55881748815209209628292540917153643678925903600113305305488204665213841469519415
- 11609433057270365759591953092186117381932611793105118548074462379962749567351885
- 75272489122793818301194912983367336244065664308602139494639522473719070217986094
- 37027705392171762931767523846748184676694051320005681271452635608277857713427577
- 89609173637178721468440901224953430146549585371050792279689258923542019956112129
- 02196086403441815981362977477130996051870721134999999837297804995105973173281609
- 63185950244594553469083026425223082533446850352619311881710100031378387528865875
- 33208381420617177669147303598253490428755468731159562863882353787593751957781857
- 780532171226806613001927876611195909216420198
-```
-
-Now go and have some fun with big integers on your own!
diff --git a/Carthage/Checkouts/BigInt/Sources/Addition.swift b/Carthage/Checkouts/BigInt/Sources/Addition.swift
deleted file mode 100644
index 34f4d44e8..000000000
--- a/Carthage/Checkouts/BigInt/Sources/Addition.swift
+++ /dev/null
@@ -1,126 +0,0 @@
-//
-// Addition.swift
-// BigInt
-//
-// Created by Károly Lőrentey on 2016-01-03.
-// Copyright © 2016-2017 Károly Lőrentey.
-//
-
-extension BigUInt {
- //MARK: Addition
-
- /// Add `word` to this integer in place.
- /// `word` is shifted `shift` words to the left before being added.
- ///
- /// - Complexity: O(max(count, shift))
- internal mutating func addWord(_ word: Word, shiftedBy shift: Int = 0) {
- precondition(shift >= 0)
- var carry = word
- var i = shift
- while carry > 0 {
- let (d, c) = self[i].addingReportingOverflow(carry)
- self[i] = d
- carry = (c ? 1 : 0)
- i += 1
- }
- }
-
- /// Add the digit `d` to this integer and return the result.
- /// `d` is shifted `shift` words to the left before being added.
- ///
- /// - Complexity: O(max(count, shift))
- internal func addingWord(_ word: Word, shiftedBy shift: Int = 0) -> BigUInt {
- var r = self
- r.addWord(word, shiftedBy: shift)
- return r
- }
-
- /// Add `b` to this integer in place.
- /// `b` is shifted `shift` words to the left before being added.
- ///
- /// - Complexity: O(max(count, b.count + shift))
- internal mutating func add(_ b: BigUInt, shiftedBy shift: Int = 0) {
- precondition(shift >= 0)
- var carry = false
- var bi = 0
- let bc = b.count
- while bi < bc || carry {
- let ai = shift + bi
- let (d, c) = self[ai].addingReportingOverflow(b[bi])
- if carry {
- let (d2, c2) = d.addingReportingOverflow(1)
- self[ai] = d2
- carry = c || c2
- }
- else {
- self[ai] = d
- carry = c
- }
- bi += 1
- }
- }
-
- /// Add `b` to this integer and return the result.
- /// `b` is shifted `shift` words to the left before being added.
- ///
- /// - Complexity: O(max(count, b.count + shift))
- internal func adding(_ b: BigUInt, shiftedBy shift: Int = 0) -> BigUInt {
- var r = self
- r.add(b, shiftedBy: shift)
- return r
- }
-
- /// Increment this integer by one. If `shift` is non-zero, it selects
- /// the word that is to be incremented.
- ///
- /// - Complexity: O(count + shift)
- internal mutating func increment(shiftedBy shift: Int = 0) {
- self.addWord(1, shiftedBy: shift)
- }
-
- /// Add `a` and `b` together and return the result.
- ///
- /// - Complexity: O(max(a.count, b.count))
- public static func +(a: BigUInt, b: BigUInt) -> BigUInt {
- return a.adding(b)
- }
-
- /// Add `a` and `b` together, and store the sum in `a`.
- ///
- /// - Complexity: O(max(a.count, b.count))
- public static func +=(a: inout BigUInt, b: BigUInt) {
- a.add(b, shiftedBy: 0)
- }
-}
-
-extension BigInt {
- /// Add `a` to `b` and return the result.
- public static func +(a: BigInt, b: BigInt) -> BigInt {
- switch (a.sign, b.sign) {
- case (.plus, .plus):
- return BigInt(sign: .plus, magnitude: a.magnitude + b.magnitude)
- case (.minus, .minus):
- return BigInt(sign: .minus, magnitude: a.magnitude + b.magnitude)
- case (.plus, .minus):
- if a.magnitude >= b.magnitude {
- return BigInt(sign: .plus, magnitude: a.magnitude - b.magnitude)
- }
- else {
- return BigInt(sign: .minus, magnitude: b.magnitude - a.magnitude)
- }
- case (.minus, .plus):
- if b.magnitude >= a.magnitude {
- return BigInt(sign: .plus, magnitude: b.magnitude - a.magnitude)
- }
- else {
- return BigInt(sign: .minus, magnitude: a.magnitude - b.magnitude)
- }
- }
- }
-
- /// Add `b` to `a` in place.
- public static func +=(a: inout BigInt, b: BigInt) {
- a = a + b
- }
-}
-
diff --git a/Carthage/Checkouts/BigInt/Sources/BigInt.swift b/Carthage/Checkouts/BigInt/Sources/BigInt.swift
deleted file mode 100644
index 8119bad50..000000000
--- a/Carthage/Checkouts/BigInt/Sources/BigInt.swift
+++ /dev/null
@@ -1,74 +0,0 @@
-//
-// BigInt.swift
-// BigInt
-//
-// Created by Károly Lőrentey on 2015-12-27.
-// Copyright © 2016-2017 Károly Lőrentey.
-//
-
-//MARK: BigInt
-
-/// An arbitary precision signed integer type, also known as a "big integer".
-///
-/// Operations on big integers never overflow, but they might take a long time to execute.
-/// The amount of memory (and address space) available is the only constraint to the magnitude of these numbers.
-///
-/// This particular big integer type uses base-2^64 digits to represent integers.
-///
-/// `BigInt` is essentially a tiny wrapper that extends `BigUInt` with a sign bit and provides signed integer
-/// operations. Both the underlying absolute value and the negative/positive flag are available as read-write
-/// properties.
-///
-/// Not all algorithms of `BigUInt` are available for `BigInt` values; for example, there is no square root or
-/// primality test for signed integers. When you need to call one of these, just extract the absolute value:
-///
-/// ```Swift
-/// BigInt(255).magnitude.isPrime() // Returns false
-/// ```
-///
-public struct BigInt: SignedInteger {
- public enum Sign {
- case plus
- case minus
- }
-
- public typealias Magnitude = BigUInt
-
- /// The type representing a digit in `BigInt`'s underlying number system.
- public typealias Word = BigUInt.Word
-
- public static var isSigned: Bool {
- return true
- }
-
- /// The absolute value of this integer.
- public var magnitude: BigUInt
-
- /// True iff the value of this integer is negative.
- public var sign: Sign
-
- /// Initializes a new big integer with the provided absolute number and sign flag.
- public init(sign: Sign, magnitude: BigUInt) {
- self.sign = (magnitude.isZero ? .plus : sign)
- self.magnitude = magnitude
- }
-
- /// Return true iff this integer is zero.
- ///
- /// - Complexity: O(1)
- public var isZero: Bool {
- return magnitude.isZero
- }
-
- /// Returns `-1` if this value is negative and `1` if it’s positive; otherwise, `0`.
- ///
- /// - Returns: The sign of this number, expressed as an integer of the same type.
- public func signum() -> BigInt {
- switch sign {
- case .plus:
- return isZero ? 0 : 1
- case .minus:
- return -1
- }
- }
-}
diff --git a/Carthage/Checkouts/BigInt/Sources/BigUInt.swift b/Carthage/Checkouts/BigInt/Sources/BigUInt.swift
deleted file mode 100644
index 759f2aa74..000000000
--- a/Carthage/Checkouts/BigInt/Sources/BigUInt.swift
+++ /dev/null
@@ -1,386 +0,0 @@
-//
-// BigUInt.swift
-// BigInt
-//
-// Created by Károly Lőrentey on 2015-12-26.
-// Copyright © 2016-2017 Károly Lőrentey.
-//
-
-/// An arbitary precision unsigned integer type, also known as a "big integer".
-///
-/// Operations on big integers never overflow, but they may take a long time to execute.
-/// The amount of memory (and address space) available is the only constraint to the magnitude of these numbers.
-///
-/// This particular big integer type uses base-2^64 digits to represent integers; you can think of it as a wrapper
-/// around `Array`. (In fact, `BigUInt` only uses an array if there are more than two digits.)
-public struct BigUInt: UnsignedInteger {
- /// The type representing a digit in `BigUInt`'s underlying number system.
- public typealias Word = UInt
-
- /// The storage variants of a `BigUInt`.
- enum Kind {
- /// Value consists of the two specified words (low and high). Either or both words may be zero.
- case inline(Word, Word)
- /// Words are stored in a slice of the storage array.
- case slice(from: Int, to: Int)
- /// Words are stored in the storage array.
- case array
- }
-
- internal fileprivate (set) var kind: Kind // Internal for testing only
- internal fileprivate (set) var storage: [Word] // Internal for testing only; stored separately to prevent COW copies
-
- /// Initializes a new BigUInt with value 0.
- public init() {
- self.kind = .inline(0, 0)
- self.storage = []
- }
-
- internal init(word: Word) {
- self.kind = .inline(word, 0)
- self.storage = []
- }
-
- internal init(low: Word, high: Word) {
- self.kind = .inline(low, high)
- self.storage = []
- }
-
- /// Initializes a new BigUInt with the specified digits. The digits are ordered from least to most significant.
- public init(words: [Word]) {
- self.kind = .array
- self.storage = words
- normalize()
- }
-
- internal init(words: [Word], from startIndex: Int, to endIndex: Int) {
- self.kind = .slice(from: startIndex, to: endIndex)
- self.storage = words
- normalize()
- }
-}
-
-extension BigUInt {
- public static var isSigned: Bool {
- return false
- }
-
- /// Return true iff this integer is zero.
- ///
- /// - Complexity: O(1)
- public var isZero: Bool {
- switch kind {
- case .inline(0, 0): return true
- case .array: return storage.isEmpty
- default:
- return false
- }
- }
-
- /// Returns `1` if this value is, positive; otherwise, `0`.
- ///
- /// - Returns: The sign of this number, expressed as an integer of the same type.
- public func signum() -> BigUInt {
- return isZero ? 0 : 1
- }
-}
-
-extension BigUInt {
- mutating func ensureArray() {
- switch kind {
- case let .inline(w0, w1):
- kind = .array
- storage = w1 != 0 ? [w0, w1]
- : w0 != 0 ? [w0]
- : []
- case let .slice(from: start, to: end):
- kind = .array
- storage = Array(storage[start ..< end])
- case .array:
- break
- }
- }
-
- var capacity: Int {
- guard case .array = kind else { return 0 }
- return storage.capacity
- }
-
- mutating func reserveCapacity(_ minimumCapacity: Int) {
- switch kind {
- case let .inline(w0, w1):
- kind = .array
- storage.reserveCapacity(minimumCapacity)
- if w1 != 0 {
- storage.append(w0)
- storage.append(w1)
- }
- else if w0 != 0 {
- storage.append(w0)
- }
- case let .slice(from: start, to: end):
- kind = .array
- var words: [Word] = []
- words.reserveCapacity(Swift.max(end - start, minimumCapacity))
- words.append(contentsOf: storage[start ..< end])
- storage = words
- case .array:
- storage.reserveCapacity(minimumCapacity)
- }
- }
-
- /// Gets rid of leading zero digits in the digit array and converts slices into inline digits when possible.
- internal mutating func normalize() {
- switch kind {
- case .slice(from: let start, to: var end):
- assert(start >= 0 && end <= storage.count && start <= end)
- while start < end, storage[end - 1] == 0 {
- end -= 1
- }
- switch end - start {
- case 0:
- kind = .inline(0, 0)
- storage = []
- case 1:
- kind = .inline(storage[start], 0)
- storage = []
- case 2:
- kind = .inline(storage[start], storage[start + 1])
- storage = []
- case storage.count:
- assert(start == 0)
- kind = .array
- default:
- kind = .slice(from: start, to: end)
- }
- case .array where storage.last == 0:
- while storage.last == 0 {
- storage.removeLast()
- }
- default:
- break
- }
- }
-
- /// Set this integer to 0 without releasing allocated storage capacity (if any).
- mutating func clear() {
- self.load(0)
- }
-
- /// Set this integer to `value` by copying its digits without releasing allocated storage capacity (if any).
- mutating func load(_ value: BigUInt) {
- switch kind {
- case .inline, .slice:
- self = value
- case .array:
- self.storage.removeAll(keepingCapacity: true)
- self.storage.append(contentsOf: value.words)
- }
- }
-}
-
-extension BigUInt {
- //MARK: Collection-like members
-
- /// The number of digits in this integer, excluding leading zero digits.
- var count: Int {
- switch kind {
- case let .inline(w0, w1):
- return w1 != 0 ? 2
- : w0 != 0 ? 1
- : 0
- case let .slice(from: start, to: end):
- return end - start
- case .array:
- return storage.count
- }
- }
-
- /// Get or set a digit at a given index.
- ///
- /// - Note: Unlike a normal collection, it is OK for the index to be greater than or equal to `endIndex`.
- /// The subscripting getter returns zero for indexes beyond the most significant digit.
- /// Setting these extended digits automatically appends new elements to the underlying digit array.
- /// - Requires: index >= 0
- /// - Complexity: The getter is O(1). The setter is O(1) if the conditions below are true; otherwise it's O(count).
- /// - The integer's storage is not shared with another integer
- /// - The integer wasn't created as a slice of another integer
- /// - `index < count`
- subscript(_ index: Int) -> Word {
- get {
- precondition(index >= 0)
- switch (kind, index) {
- case (.inline(let w0, _), 0): return w0
- case (.inline(_, let w1), 1): return w1
- case (.slice(from: let start, to: let end), _) where index < end - start:
- return storage[start + index]
- case (.array, _) where index < storage.count:
- return storage[index]
- default:
- return 0
- }
- }
- set(word) {
- precondition(index >= 0)
- switch (kind, index) {
- case let (.inline(_, w1), 0):
- kind = .inline(word, w1)
- case let (.inline(w0, _), 1):
- kind = .inline(w0, word)
- case let (.slice(from: start, to: end), _) where index < end - start:
- replace(at: index, with: word)
- case (.array, _) where index < storage.count:
- replace(at: index, with: word)
- default:
- extend(at: index, with: word)
- }
- }
- }
-
- private mutating func replace(at index: Int, with word: Word) {
- ensureArray()
- precondition(index < storage.count)
- storage[index] = word
- if word == 0, index == storage.count - 1 {
- normalize()
- }
- }
-
- private mutating func extend(at index: Int, with word: Word) {
- guard word != 0 else { return }
- reserveCapacity(index + 1)
- precondition(index >= storage.count)
- storage.append(contentsOf: repeatElement(0, count: index - storage.count))
- storage.append(word)
- }
-
- /// Returns an integer built from the digits of this integer in the given range.
- internal func extract(_ bounds: Range) -> BigUInt {
- switch kind {
- case let .inline(w0, w1):
- let bounds = bounds.clamped(to: 0 ..< 2)
- if bounds == 0 ..< 2 {
- return BigUInt(low: w0, high: w1)
- }
- else if bounds == 0 ..< 1 {
- return BigUInt(word: w0)
- }
- else if bounds == 1 ..< 2 {
- return BigUInt(word: w1)
- }
- else {
- return BigUInt()
- }
- case let .slice(from: start, to: end):
- let s = Swift.min(end, start + Swift.max(bounds.lowerBound, 0))
- let e = Swift.max(s, (bounds.upperBound > end - start ? end : start + bounds.upperBound))
- return BigUInt(words: storage, from: s, to: e)
- case .array:
- let b = bounds.clamped(to: storage.startIndex ..< storage.endIndex)
- return BigUInt(words: storage, from: b.lowerBound, to: b.upperBound)
- }
- }
-
- internal func extract(_ bounds: Bounds) -> BigUInt where Bounds.Bound == Int {
- return self.extract(bounds.relative(to: 0 ..< Int.max))
- }
-}
-
-extension BigUInt {
- internal mutating func shiftRight(byWords amount: Int) {
- assert(amount >= 0)
- guard amount > 0 else { return }
- switch kind {
- case let .inline(_, w1) where amount == 1:
- kind = .inline(w1, 0)
- case .inline(_, _):
- kind = .inline(0, 0)
- case let .slice(from: start, to: end):
- let s = start + amount
- if s >= end {
- kind = .inline(0, 0)
- }
- else {
- kind = .slice(from: s, to: end)
- normalize()
- }
- case .array:
- if amount >= storage.count {
- storage.removeAll(keepingCapacity: true)
- }
- else {
- storage.removeFirst(amount)
- }
- }
- }
-
- internal mutating func shiftLeft(byWords amount: Int) {
- assert(amount >= 0)
- guard amount > 0 else { return }
- guard !isZero else { return }
- switch kind {
- case let .inline(w0, 0) where amount == 1:
- kind = .inline(0, w0)
- case let .inline(w0, w1):
- let c = (w1 == 0 ? 1 : 2)
- storage.reserveCapacity(amount + c)
- storage.append(contentsOf: repeatElement(0, count: amount))
- storage.append(w0)
- if w1 != 0 {
- storage.append(w1)
- }
- kind = .array
- case let .slice(from: start, to: end):
- var words: [Word] = []
- words.reserveCapacity(amount + count)
- words.append(contentsOf: repeatElement(0, count: amount))
- words.append(contentsOf: storage[start ..< end])
- storage = words
- kind = .array
- case .array:
- storage.insert(contentsOf: repeatElement(0, count: amount), at: 0)
- }
- }
-}
-
-extension BigUInt {
- //MARK: Low and High
-
- /// Split this integer into a high-order and a low-order part.
- ///
- /// - Requires: count > 1
- /// - Returns: `(low, high)` such that
- /// - `self == low.add(high, shiftedBy: middleIndex)`
- /// - `high.width <= floor(width / 2)`
- /// - `low.width <= ceil(width / 2)`
- /// - Complexity: Typically O(1), but O(count) in the worst case, because high-order zero digits need to be removed after the split.
- internal var split: (high: BigUInt, low: BigUInt) {
- precondition(count > 1)
- let mid = middleIndex
- return (self.extract(mid...), self.extract(.. 1
- internal var low: BigUInt {
- return self.extract(0 ..< middleIndex)
- }
-
- /// The high-order half of this BigUInt.
- ///
- /// - Returns: `self[middleIndex ..< count]`
- /// - Requires: count > 1
- internal var high: BigUInt {
- return self.extract(middleIndex ..< count)
- }
-}
-
diff --git a/Carthage/Checkouts/BigInt/Sources/Bitwise Ops.swift b/Carthage/Checkouts/BigInt/Sources/Bitwise Ops.swift
deleted file mode 100644
index 0d00148bd..000000000
--- a/Carthage/Checkouts/BigInt/Sources/Bitwise Ops.swift
+++ /dev/null
@@ -1,121 +0,0 @@
-//
-// Bitwise Ops.swift
-// BigInt
-//
-// Created by Károly Lőrentey on 2016-01-03.
-// Copyright © 2016-2017 Károly Lőrentey.
-//
-
-//MARK: Bitwise Operations
-
-extension BigUInt {
- /// Return the ones' complement of `a`.
- ///
- /// - Complexity: O(a.count)
- public static prefix func ~(a: BigUInt) -> BigUInt {
- return BigUInt(words: a.words.map { ~$0 })
- }
-
- /// Calculate the bitwise OR of `a` and `b`, and store the result in `a`.
- ///
- /// - Complexity: O(max(a.count, b.count))
- public static func |= (a: inout BigUInt, b: BigUInt) {
- a.reserveCapacity(b.count)
- for i in 0 ..< b.count {
- a[i] |= b[i]
- }
- }
-
- /// Calculate the bitwise AND of `a` and `b` and return the result.
- ///
- /// - Complexity: O(max(a.count, b.count))
- public static func &= (a: inout BigUInt, b: BigUInt) {
- for i in 0 ..< Swift.max(a.count, b.count) {
- a[i] &= b[i]
- }
- }
-
- /// Calculate the bitwise XOR of `a` and `b` and return the result.
- ///
- /// - Complexity: O(max(a.count, b.count))
- public static func ^= (a: inout BigUInt, b: BigUInt) {
- a.reserveCapacity(b.count)
- for i in 0 ..< b.count {
- a[i] ^= b[i]
- }
- }
-}
-
-extension BigInt {
- public static prefix func ~(x: BigInt) -> BigInt {
- switch x.sign {
- case .plus:
- return BigInt(sign: .minus, magnitude: x.magnitude + 1)
- case .minus:
- return BigInt(sign: .plus, magnitude: x.magnitude - 1)
- }
- }
-
- public static func &(lhs: inout BigInt, rhs: BigInt) -> BigInt {
- let left = lhs.words
- let right = rhs.words
- // Note we aren't using left.count/right.count here; we account for the sign bit separately later.
- let count = Swift.max(lhs.magnitude.count, rhs.magnitude.count)
- var words: [UInt] = []
- words.reserveCapacity(count)
- for i in 0 ..< count {
- words.append(left[i] & right[i])
- }
- if lhs.sign == .minus && rhs.sign == .minus {
- words.twosComplement()
- return BigInt(sign: .minus, magnitude: BigUInt(words: words))
- }
- return BigInt(sign: .plus, magnitude: BigUInt(words: words))
- }
-
- public static func |(lhs: inout BigInt, rhs: BigInt) -> BigInt {
- let left = lhs.words
- let right = rhs.words
- // Note we aren't using left.count/right.count here; we account for the sign bit separately later.
- let count = Swift.max(lhs.magnitude.count, rhs.magnitude.count)
- var words: [UInt] = []
- words.reserveCapacity(count)
- for i in 0 ..< count {
- words.append(left[i] | right[i])
- }
- if lhs.sign == .minus || rhs.sign == .minus {
- words.twosComplement()
- return BigInt(sign: .minus, magnitude: BigUInt(words: words))
- }
- return BigInt(sign: .plus, magnitude: BigUInt(words: words))
- }
-
- public static func ^(lhs: inout BigInt, rhs: BigInt) -> BigInt {
- let left = lhs.words
- let right = rhs.words
- // Note we aren't using left.count/right.count here; we account for the sign bit separately later.
- let count = Swift.max(lhs.magnitude.count, rhs.magnitude.count)
- var words: [UInt] = []
- words.reserveCapacity(count)
- for i in 0 ..< count {
- words.append(left[i] ^ right[i])
- }
- if (lhs.sign == .minus) != (rhs.sign == .minus) {
- words.twosComplement()
- return BigInt(sign: .minus, magnitude: BigUInt(words: words))
- }
- return BigInt(sign: .plus, magnitude: BigUInt(words: words))
- }
-
- public static func &=(lhs: inout BigInt, rhs: BigInt) {
- lhs = lhs & rhs
- }
-
- public static func |=(lhs: inout BigInt, rhs: BigInt) {
- lhs = lhs | rhs
- }
-
- public static func ^=(lhs: inout BigInt, rhs: BigInt) {
- lhs = lhs ^ rhs
- }
-}
diff --git a/Carthage/Checkouts/BigInt/Sources/Codable.swift b/Carthage/Checkouts/BigInt/Sources/Codable.swift
deleted file mode 100644
index b53b30be5..000000000
--- a/Carthage/Checkouts/BigInt/Sources/Codable.swift
+++ /dev/null
@@ -1,155 +0,0 @@
-//
-// Codable.swift
-// BigInt
-//
-// Created by Károly Lőrentey on 2017-8-11.
-// Copyright © 2016-2017 Károly Lőrentey.
-//
-
-
-// Little-endian to big-endian
-struct Units: RandomAccessCollection
-where Words.Element: FixedWidthInteger, Words.Index == Int {
- typealias Word = Words.Element
- let words: Words
- init(of type: Unit.Type, _ words: Words) {
- precondition(Word.bitWidth % Unit.bitWidth == 0 || Unit.bitWidth % Word.bitWidth == 0)
- self.words = words
- }
- var count: Int { return (words.count * Word.bitWidth + Unit.bitWidth - 1) / Unit.bitWidth }
- var startIndex: Int { return 0 }
- var endIndex: Int { return count }
- subscript(_ index: Int) -> Unit {
- let index = count - 1 - index
- if Unit.bitWidth == Word.bitWidth {
- return Unit(words[index])
- }
- else if Unit.bitWidth > Word.bitWidth {
- let c = Unit.bitWidth / Word.bitWidth
- var unit: Unit = 0
- var j = 0
- for i in (c * index) ..< Swift.min(c * (index + 1), words.endIndex) {
- unit |= Unit(words[i]) << j
- j += Word.bitWidth
- }
- return unit
- }
- // Unit.bitWidth < Word.bitWidth
- let c = Word.bitWidth / Unit.bitWidth
- let i = index / c
- let j = index % c
- return Unit(truncatingIfNeeded: words[i] >> (j * Unit.bitWidth))
- }
-}
-
-extension Array where Element: FixedWidthInteger {
- // Big-endian to little-endian
- init(count: Int?, generator: () throws -> Unit?) rethrows {
- typealias Word = Element
- precondition(Word.bitWidth % Unit.bitWidth == 0 || Unit.bitWidth % Word.bitWidth == 0)
- self = []
- if Unit.bitWidth == Word.bitWidth {
- if let count = count {
- self.reserveCapacity(count)
- }
- while let unit = try generator() {
- self.append(Word(unit))
- }
- }
- else if Unit.bitWidth > Word.bitWidth {
- let wordsPerUnit = Unit.bitWidth / Word.bitWidth
- if let count = count {
- self.reserveCapacity(count * wordsPerUnit)
- }
- while let unit = try generator() {
- var shift = Unit.bitWidth - Word.bitWidth
- while shift >= 0 {
- self.append(Word(truncatingIfNeeded: unit >> shift))
- shift -= Word.bitWidth
- }
- }
- }
- else {
- let unitsPerWord = Word.bitWidth / Unit.bitWidth
- if let count = count {
- self.reserveCapacity((count + unitsPerWord - 1) / unitsPerWord)
- }
- var word: Word = 0
- var c = 0
- while let unit = try generator() {
- word <<= Unit.bitWidth
- word |= Word(unit)
- c += Unit.bitWidth
- if c == Word.bitWidth {
- self.append(word)
- word = 0
- c = 0
- }
- }
- if c > 0 {
- self.append(word << c)
- var shifted: Word = 0
- for i in self.indices {
- let word = self[i]
- self[i] = shifted | (word >> c)
- shifted = word << (Word.bitWidth - c)
- }
- }
- }
- self.reverse()
- }
-}
-
-extension BigInt: Codable {
- public init(from decoder: Decoder) throws {
- var container = try decoder.unkeyedContainer()
-
- // Decode sign
- let sign: BigInt.Sign
- switch try container.decode(String.self) {
- case "+":
- sign = .plus
- case "-":
- sign = .minus
- default:
- throw DecodingError.dataCorrupted(.init(codingPath: container.codingPath,
- debugDescription: "Invalid big integer sign"))
- }
-
- // Decode magnitude
- let words = try [UInt](count: container.count?.advanced(by: -1)) { () -> UInt64? in
- guard !container.isAtEnd else { return nil }
- return try container.decode(UInt64.self)
- }
- let magnitude = BigUInt(words: words)
-
- self.init(sign: sign, magnitude: magnitude)
- }
-
- public func encode(to encoder: Encoder) throws {
- var container = encoder.unkeyedContainer()
- try container.encode(sign == .plus ? "+" : "-")
- let units = Units(of: UInt64.self, self.magnitude.words)
- if units.isEmpty {
- try container.encode(0 as UInt64)
- }
- else {
- try container.encode(contentsOf: units)
- }
- }
-}
-
-extension BigUInt: Codable {
- public init(from decoder: Decoder) throws {
- let value = try BigInt(from: decoder)
- guard value.sign == .plus else {
- throw DecodingError.dataCorrupted(.init(codingPath: decoder.codingPath,
- debugDescription: "BigUInt cannot hold a negative value"))
- }
- self = value.magnitude
- }
-
- public func encode(to encoder: Encoder) throws {
- try BigInt(sign: .plus, magnitude: self).encode(to: encoder)
- }
-}
diff --git a/Carthage/Checkouts/BigInt/Sources/Comparable.swift b/Carthage/Checkouts/BigInt/Sources/Comparable.swift
deleted file mode 100644
index a5c98ffe3..000000000
--- a/Carthage/Checkouts/BigInt/Sources/Comparable.swift
+++ /dev/null
@@ -1,63 +0,0 @@
-//
-// Comparable.swift
-// BigInt
-//
-// Created by Károly Lőrentey on 2016-01-03.
-// Copyright © 2016-2017 Károly Lőrentey.
-//
-
-import Foundation
-
-extension BigUInt: Comparable {
- //MARK: Comparison
-
- /// Compare `a` to `b` and return an `NSComparisonResult` indicating their order.
- ///
- /// - Complexity: O(count)
- public static func compare(_ a: BigUInt, _ b: BigUInt) -> ComparisonResult {
- if a.count != b.count { return a.count > b.count ? .orderedDescending : .orderedAscending }
- for i in (0 ..< a.count).reversed() {
- let ad = a[i]
- let bd = b[i]
- if ad != bd { return ad > bd ? .orderedDescending : .orderedAscending }
- }
- return .orderedSame
- }
-
- /// Return true iff `a` is equal to `b`.
- ///
- /// - Complexity: O(count)
- public static func ==(a: BigUInt, b: BigUInt) -> Bool {
- return BigUInt.compare(a, b) == .orderedSame
- }
-
- /// Return true iff `a` is less than `b`.
- ///
- /// - Complexity: O(count)
- public static func <(a: BigUInt, b: BigUInt) -> Bool {
- return BigUInt.compare(a, b) == .orderedAscending
- }
-}
-
-extension BigInt: Comparable {
- /// Return true iff `a` is equal to `b`.
- public static func ==(a: BigInt, b: BigInt) -> Bool {
- return a.sign == b.sign && a.magnitude == b.magnitude
- }
-
- /// Return true iff `a` is less than `b`.
- public static func <(a: BigInt, b: BigInt) -> Bool {
- switch (a.sign, b.sign) {
- case (.plus, .plus):
- return a.magnitude < b.magnitude
- case (.plus, .minus):
- return false
- case (.minus, .plus):
- return true
- case (.minus, .minus):
- return a.magnitude > b.magnitude
- }
- }
-}
-
-
diff --git a/Carthage/Checkouts/BigInt/Sources/Data Conversion.swift b/Carthage/Checkouts/BigInt/Sources/Data Conversion.swift
deleted file mode 100644
index 25c65521d..000000000
--- a/Carthage/Checkouts/BigInt/Sources/Data Conversion.swift
+++ /dev/null
@@ -1,179 +0,0 @@
-//
-// Data Conversion.swift
-// BigInt
-//
-// Created by Károly Lőrentey on 2016-01-04.
-// Copyright © 2016-2017 Károly Lőrentey.
-//
-
-import Foundation
-
-extension BigUInt {
- //MARK: NSData Conversion
-
- /// Initialize a BigInt from bytes accessed from an UnsafeRawBufferPointer
- public init(_ buffer: UnsafeRawBufferPointer) {
- // This assumes Word is binary.
- precondition(Word.bitWidth % 8 == 0)
-
- self.init()
-
- let length = buffer.count
- guard length > 0 else { return }
- let bytesPerDigit = Word.bitWidth / 8
- var index = length / bytesPerDigit
- var c = bytesPerDigit - length % bytesPerDigit
- if c == bytesPerDigit {
- c = 0
- index -= 1
- }
-
- var word: Word = 0
- for byte in buffer {
- word <<= 8
- word += Word(byte)
- c += 1
- if c == bytesPerDigit {
- self[index] = word
- index -= 1
- c = 0
- word = 0
- }
- }
- assert(c == 0 && word == 0 && index == -1)
- }
-
-
- /// Initializes an integer from the bits stored inside a piece of `Data`.
- /// The data is assumed to be in network (big-endian) byte order.
- public init(_ data: Data) {
- // This assumes Word is binary.
- precondition(Word.bitWidth % 8 == 0)
-
- self.init()
-
- let length = data.count
- guard length > 0 else { return }
- let bytesPerDigit = Word.bitWidth / 8
- var index = length / bytesPerDigit
- var c = bytesPerDigit - length % bytesPerDigit
- if c == bytesPerDigit {
- c = 0
- index -= 1
- }
- let word: Word = data.withUnsafeBytes { buffPtr in
- var word: Word = 0
- let p = buffPtr.bindMemory(to: UInt8.self)
- for byte in p {
- word <<= 8
- word += Word(byte)
- c += 1
- if c == bytesPerDigit {
- self[index] = word
- index -= 1
- c = 0
- word = 0
- }
- }
- return word
- }
- assert(c == 0 && word == 0 && index == -1)
- }
-
- /// Return a `Data` value that contains the base-256 representation of this integer, in network (big-endian) byte order.
- public func serialize() -> Data {
- // This assumes Digit is binary.
- precondition(Word.bitWidth % 8 == 0)
-
- let byteCount = (self.bitWidth + 7) / 8
-
- guard byteCount > 0 else { return Data() }
-
- var data = Data(count: byteCount)
- data.withUnsafeMutableBytes { buffPtr in
- let p = buffPtr.bindMemory(to: UInt8.self)
- var i = byteCount - 1
- for var word in self.words {
- for _ in 0 ..< Word.bitWidth / 8 {
- p[i] = UInt8(word & 0xFF)
- word >>= 8
- if i == 0 {
- assert(word == 0)
- break
- }
- i -= 1
- }
- }
- }
- return data
- }
-}
-
-extension BigInt {
-
- /// Initialize a BigInt from bytes accessed from an UnsafeRawBufferPointer,
- /// where the first byte indicates sign (0 for positive, 1 for negative)
- public init(_ buffer: UnsafeRawBufferPointer) {
- // This assumes Word is binary.
- precondition(Word.bitWidth % 8 == 0)
-
- self.init()
-
- let length = buffer.count
-
- // Serialized data for a BigInt should contain at least 2 bytes: one representing
- // the sign, and another for the non-zero magnitude. Zero is represented by an
- // empty Data struct, and negative zero is not supported.
- guard length > 1, let firstByte = buffer.first else { return }
-
- // The first byte gives the sign
- // This byte is compared to a bitmask to allow additional functionality to be added
- // to this byte in the future.
- self.sign = firstByte & 0b1 == 0 ? .plus : .minus
-
- self.magnitude = BigUInt(UnsafeRawBufferPointer(rebasing: buffer.dropFirst(1)))
- }
-
- /// Initializes an integer from the bits stored inside a piece of `Data`.
- /// The data is assumed to be in network (big-endian) byte order with a first
- /// byte to represent the sign (0 for positive, 1 for negative)
- public init(_ data: Data) {
- // This assumes Word is binary.
- // This is the same assumption made when initializing BigUInt from Data
- precondition(Word.bitWidth % 8 == 0)
-
- self.init()
-
- // Serialized data for a BigInt should contain at least 2 bytes: one representing
- // the sign, and another for the non-zero magnitude. Zero is represented by an
- // empty Data struct, and negative zero is not supported.
- guard data.count > 1, let firstByte = data.first else { return }
-
- // The first byte gives the sign
- // This byte is compared to a bitmask to allow additional functionality to be added
- // to this byte in the future.
- self.sign = firstByte & 0b1 == 0 ? .plus : .minus
-
- // The remaining bytes are read and stored as the magnitude
- self.magnitude = BigUInt(data.dropFirst(1))
- }
-
- /// Return a `Data` value that contains the base-256 representation of this integer, in network (big-endian) byte order and a prepended byte to indicate the sign (0 for positive, 1 for negative)
- public func serialize() -> Data {
- // Create a data object for the magnitude portion of the BigInt
- let magnitudeData = self.magnitude.serialize()
-
- // Similar to BigUInt, a value of 0 should return an initialized, empty Data struct
- guard magnitudeData.count > 0 else { return magnitudeData }
-
- // Create a new Data struct for the signed BigInt value
- var data = Data(capacity: magnitudeData.count + 1)
-
- // The first byte should be 0 for a positive value, or 1 for a negative value
- // i.e., the sign bit is the LSB
- data.append(self.sign == .plus ? 0 : 1)
-
- data.append(magnitudeData)
- return data
- }
-}
diff --git a/Carthage/Checkouts/BigInt/Sources/Division.swift b/Carthage/Checkouts/BigInt/Sources/Division.swift
deleted file mode 100644
index 4b30dbb56..000000000
--- a/Carthage/Checkouts/BigInt/Sources/Division.swift
+++ /dev/null
@@ -1,375 +0,0 @@
-//
-// Division.swift
-// BigInt
-//
-// Created by Károly Lőrentey on 2016-01-03.
-// Copyright © 2016-2017 Károly Lőrentey.
-//
-
-//MARK: Full-width multiplication and division
-
-// TODO: Return to `where Magnitude == Self` when SR-13491 is resolved
-extension FixedWidthInteger {
- private var halfShift: Self {
- return Self(Self.bitWidth / 2)
-
- }
- private var high: Self {
- return self &>> halfShift
- }
-
- private var low: Self {
- let mask: Self = 1 &<< halfShift - 1
- return self & mask
- }
-
- private var upshifted: Self {
- return self &<< halfShift
- }
-
- private var split: (high: Self, low: Self) {
- return (self.high, self.low)
- }
-
- private init(_ value: (high: Self, low: Self)) {
- self = value.high.upshifted + value.low
- }
-
- /// Divide the double-width integer `dividend` by `self` and return the quotient and remainder.
- ///
- /// - Requires: `dividend.high < self`, so that the result will fit in a single digit.
- /// - Complexity: O(1) with 2 divisions, 6 multiplications and ~12 or so additions/subtractions.
- internal func fastDividingFullWidth(_ dividend: (high: Self, low: Self.Magnitude)) -> (quotient: Self, remainder: Self) {
- // Division is complicated; doing it with single-digit operations is maddeningly complicated.
- // This is a Swift adaptation for "divlu2" in Hacker's Delight,
- // which is in turn a C adaptation of Knuth's Algorithm D (TAOCP vol 2, 4.3.1).
- precondition(dividend.high < self)
-
- // This replaces the implementation in stdlib, which is much slower.
- // FIXME: Speed up stdlib. It should use full-width idiv on Intel processors, and
- // fall back to a reasonably fast algorithm elsewhere.
-
- // The trick here is that we're actually implementing a 4/2 long division using half-words,
- // with the long division loop unrolled into two 3/2 half-word divisions.
- // Luckily, 3/2 half-word division can be approximated by a single full-word division operation
- // that, when the divisor is normalized, differs from the correct result by at most 2.
-
- /// Find the half-word quotient in `u / vn`, which must be normalized.
- /// `u` contains three half-words in the two halves of `u.high` and the lower half of
- /// `u.low`. (The weird distribution makes for a slightly better fit with the input.)
- /// `vn` contains the normalized divisor, consisting of two half-words.
- ///
- /// - Requires: u.high < vn && u.low.high == 0 && vn.leadingZeroBitCount == 0
- func quotient(dividing u: (high: Self, low: Self), by vn: Self) -> Self {
- let (vn1, vn0) = vn.split
- // Get approximate quotient.
- let (q, r) = u.high.quotientAndRemainder(dividingBy: vn1)
- let p = q * vn0
- // q is often already correct, but sometimes the approximation overshoots by at most 2.
- // The code that follows checks for this while being careful to only perform single-digit operations.
- if q.high == 0 && p <= r.upshifted + u.low { return q }
- let r2 = r + vn1
- if r2.high != 0 { return q - 1 }
- if (q - 1).high == 0 && p - vn0 <= r2.upshifted + u.low { return q - 1 }
- //assert((r + 2 * vn1).high != 0 || p - 2 * vn0 <= (r + 2 * vn1).upshifted + u.low)
- return q - 2
- }
- /// Divide 3 half-digits by 2 half-digits to get a half-digit quotient and a full-digit remainder.
- ///
- /// - Requires: u.high < v && u.low.high == 0 && vn.width = width(Digit)
- func quotientAndRemainder(dividing u: (high: Self, low: Self), by v: Self) -> (quotient: Self, remainder: Self) {
- let q = quotient(dividing: u, by: v)
- // Note that `uh.low` masks off a couple of bits, and `q * v` and the
- // subtraction are likely to overflow. Despite this, the end result (remainder) will
- // still be correct and it will fit inside a single (full) Digit.
- let r = Self(u) &- q &* v
- assert(r < v)
- return (q, r)
- }
-
- // Normalize the dividend and the divisor (self) such that the divisor has no leading zeroes.
- let z = Self(self.leadingZeroBitCount)
- let w = Self(Self.bitWidth) - z
- let vn = self << z
-
- let un32 = (z == 0 ? dividend.high : (dividend.high &<< z) | ((dividend.low as! Self) &>> w)) // No bits are lost
- let un10 = dividend.low &<< z
- let (un1, un0) = un10.split
-
- // Divide `(un32,un10)` by `vn`, splitting the full 4/2 division into two 3/2 ones.
- let (q1, un21) = quotientAndRemainder(dividing: (un32, (un1 as! Self)), by: vn)
- let (q0, rn) = quotientAndRemainder(dividing: (un21, (un0 as! Self)), by: vn)
-
- // Undo normalization of the remainder and combine the two halves of the quotient.
- let mod = rn >> z
- let div = Self((q1, q0))
- return (div, mod)
- }
-
- /// Return the quotient of the 3/2-word division `x/y` as a single word.
- ///
- /// - Requires: (x.0, x.1) <= y && y.0.high != 0
- /// - Returns: The exact value when it fits in a single word, otherwise `Self`.
- static func approximateQuotient(dividing x: (Self, Self, Self), by y: (Self, Self)) -> Self {
- // Start with q = (x.0, x.1) / y.0, (or Word.max on overflow)
- var q: Self
- var r: Self
- if x.0 == y.0 {
- q = Self.max
- let (s, o) = x.0.addingReportingOverflow(x.1)
- if o { return q }
- r = s
- }
- else {
- (q, r) = y.0.fastDividingFullWidth((x.0, (x.1 as! Magnitude)))
- }
- // Now refine q by considering x.2 and y.1.
- // Note that since y is normalized, q * y - x is between 0 and 2.
- let (ph, pl) = q.multipliedFullWidth(by: y.1)
- if ph < r || (ph == r && pl <= x.2) { return q }
-
- let (r1, ro) = r.addingReportingOverflow(y.0)
- if ro { return q - 1 }
-
- let (pl1, so) = pl.subtractingReportingOverflow((y.1 as! Magnitude))
- let ph1 = (so ? ph - 1 : ph)
-
- if ph1 < r1 || (ph1 == r1 && pl1 <= x.2) { return q - 1 }
- return q - 2
- }
-}
-
-extension BigUInt {
- //MARK: Division
-
- /// Divide this integer by the word `y`, leaving the quotient in its place and returning the remainder.
- ///
- /// - Requires: y > 0
- /// - Complexity: O(count)
- internal mutating func divide(byWord y: Word) -> Word {
- precondition(y > 0)
- if y == 1 { return 0 }
-
- var remainder: Word = 0
- for i in (0 ..< count).reversed() {
- let u = self[i]
- (self[i], remainder) = y.fastDividingFullWidth((remainder, u))
- }
- return remainder
- }
-
- /// Divide this integer by the word `y` and return the resulting quotient and remainder.
- ///
- /// - Requires: y > 0
- /// - Returns: (quotient, remainder) where quotient = floor(x/y), remainder = x - quotient * y
- /// - Complexity: O(x.count)
- internal func quotientAndRemainder(dividingByWord y: Word) -> (quotient: BigUInt, remainder: Word) {
- var div = self
- let mod = div.divide(byWord: y)
- return (div, mod)
- }
-
- /// Divide `x` by `y`, putting the quotient in `x` and the remainder in `y`.
- /// Reusing integers like this reduces the number of allocations during the calculation.
- static func divide(_ x: inout BigUInt, by y: inout BigUInt) {
- // This is a Swift adaptation of "divmnu" from Hacker's Delight, which is in
- // turn a C adaptation of Knuth's Algorithm D (TAOCP vol 2, 4.3.1).
-
- precondition(!y.isZero)
-
- // First, let's take care of the easy cases.
- if x < y {
- (x, y) = (0, x)
- return
- }
- if y.count == 1 {
- // The single-word case reduces to a simpler loop.
- y = BigUInt(x.divide(byWord: y[0]))
- return
- }
-
- // In the hard cases, we will perform the long division algorithm we learned in school.
- // It works by successively calculating the single-word quotient of the top y.count + 1
- // words of x divided by y, replacing the top of x with the remainder, and repeating
- // the process one word lower.
- //
- // The tricky part is that the algorithm needs to be able to do n+1/n word divisions,
- // but we only have a primitive for dividing two words by a single
- // word. (Remember that this step is also tricky when we do it on paper!)
- //
- // The solution is that the long division can be approximated by a single full division
- // using just the most significant words. We can then use multiplications and
- // subtractions to refine the approximation until we get the correct quotient word.
- //
- // We could do this by doing a simple 2/1 full division, but Knuth goes one step further,
- // and implements a 3/2 division. This results in an exact approximation in the
- // vast majority of cases, eliminating an extra subtraction over big integers.
- //
- // The function `approximateQuotient` above implements Knuth's 3/2 division algorithm.
- // It requires that the divisor's most significant word is larger than
- // Word.max / 2. This ensures that the approximation has tiny error bounds,
- // which is what makes this entire approach viable.
- // To satisfy this requirement, we will normalize the division by multiplying
- // both the divisor and the dividend by the same (small) factor.
- let z = y.leadingZeroBitCount
- y <<= z
- x <<= z // We'll calculate the remainder in the normalized dividend.
- var quotient = BigUInt()
- assert(y.leadingZeroBitCount == 0)
-
- // We're ready to start the long division!
- let dc = y.count
- let d1 = y[dc - 1]
- let d0 = y[dc - 2]
- var product: BigUInt = 0
- for j in (dc ... x.count).reversed() {
- // Approximate dividing the top dc+1 words of `remainder` using the topmost 3/2 words.
- let r2 = x[j]
- let r1 = x[j - 1]
- let r0 = x[j - 2]
- let q = Word.approximateQuotient(dividing: (r2, r1, r0), by: (d1, d0))
-
- // Multiply the entire divisor with `q` and subtract the result from remainder.
- // Normalization ensures the 3/2 quotient will either be exact for the full division, or
- // it may overshoot by at most 1, in which case the product will be greater
- // than the remainder.
- product.load(y)
- product.multiply(byWord: q)
- if product <= x.extract(j - dc ..< j + 1) {
- x.subtract(product, shiftedBy: j - dc)
- quotient[j - dc] = q
- }
- else {
- // This case is extremely rare -- it has a probability of 1/2^(Word.bitWidth - 1).
- x.add(y, shiftedBy: j - dc)
- x.subtract(product, shiftedBy: j - dc)
- quotient[j - dc] = q - 1
- }
- }
- // The remainder's normalization needs to be undone, but otherwise we're done.
- x >>= z
- y = x
- x = quotient
- }
-
- /// Divide `x` by `y`, putting the remainder in `x`.
- mutating func formRemainder(dividingBy y: BigUInt, normalizedBy shift: Int) {
- precondition(!y.isZero)
- assert(y.leadingZeroBitCount == 0)
- if y.count == 1 {
- let remainder = self.divide(byWord: y[0] >> shift)
- self.load(BigUInt(remainder))
- return
- }
- self <<= shift
- if self >= y {
- let dc = y.count
- let d1 = y[dc - 1]
- let d0 = y[dc - 2]
- var product: BigUInt = 0
- for j in (dc ... self.count).reversed() {
- let r2 = self[j]
- let r1 = self[j - 1]
- let r0 = self[j - 2]
- let q = Word.approximateQuotient(dividing: (r2, r1, r0), by: (d1, d0))
- product.load(y)
- product.multiply(byWord: q)
- if product <= self.extract(j - dc ..< j + 1) {
- self.subtract(product, shiftedBy: j - dc)
- }
- else {
- self.add(y, shiftedBy: j - dc)
- self.subtract(product, shiftedBy: j - dc)
- }
- }
- }
- self >>= shift
- }
-
-
- /// Divide this integer by `y` and return the resulting quotient and remainder.
- ///
- /// - Requires: `y > 0`
- /// - Returns: `(quotient, remainder)` where `quotient = floor(self/y)`, `remainder = self - quotient * y`
- /// - Complexity: O(count^2)
- public func quotientAndRemainder(dividingBy y: BigUInt) -> (quotient: BigUInt, remainder: BigUInt) {
- var x = self
- var y = y
- BigUInt.divide(&x, by: &y)
- return (x, y)
- }
-
- /// Divide `x` by `y` and return the quotient.
- ///
- /// - Note: Use `divided(by:)` if you also need the remainder.
- public static func /(x: BigUInt, y: BigUInt) -> BigUInt {
- return x.quotientAndRemainder(dividingBy: y).quotient
- }
-
- /// Divide `x` by `y` and return the remainder.
- ///
- /// - Note: Use `divided(by:)` if you also need the remainder.
- public static func %(x: BigUInt, y: BigUInt) -> BigUInt {
- var x = x
- let shift = y.leadingZeroBitCount
- x.formRemainder(dividingBy: y << shift, normalizedBy: shift)
- return x
- }
-
- /// Divide `x` by `y` and store the quotient in `x`.
- ///
- /// - Note: Use `divided(by:)` if you also need the remainder.
- public static func /=(x: inout BigUInt, y: BigUInt) {
- var y = y
- BigUInt.divide(&x, by: &y)
- }
-
- /// Divide `x` by `y` and store the remainder in `x`.
- ///
- /// - Note: Use `divided(by:)` if you also need the remainder.
- public static func %=(x: inout BigUInt, y: BigUInt) {
- let shift = y.leadingZeroBitCount
- x.formRemainder(dividingBy: y << shift, normalizedBy: shift)
- }
-}
-
-extension BigInt {
- /// Divide this integer by `y` and return the resulting quotient and remainder.
- ///
- /// - Requires: `y > 0`
- /// - Returns: `(quotient, remainder)` where `quotient = floor(self/y)`, `remainder = self - quotient * y`
- /// - Complexity: O(count^2)
- public func quotientAndRemainder(dividingBy y: BigInt) -> (quotient: BigInt, remainder: BigInt) {
- var a = self.magnitude
- var b = y.magnitude
- BigUInt.divide(&a, by: &b)
- return (BigInt(sign: self.sign == y.sign ? .plus : .minus, magnitude: a),
- BigInt(sign: self.sign, magnitude: b))
- }
-
- /// Divide `a` by `b` and return the quotient. Traps if `b` is zero.
- public static func /(a: BigInt, b: BigInt) -> BigInt {
- return BigInt(sign: a.sign == b.sign ? .plus : .minus, magnitude: a.magnitude / b.magnitude)
- }
-
- /// Divide `a` by `b` and return the remainder. The result has the same sign as `a`.
- public static func %(a: BigInt, b: BigInt) -> BigInt {
- return BigInt(sign: a.sign, magnitude: a.magnitude % b.magnitude)
- }
-
- /// Return the result of `a` mod `b`. The result is always a nonnegative integer that is less than the absolute value of `b`.
- public func modulus(_ mod: BigInt) -> BigInt {
- let remainder = self.magnitude % mod.magnitude
- return BigInt(
- self.sign == .minus && !remainder.isZero
- ? mod.magnitude - remainder
- : remainder)
- }
-}
-
-extension BigInt {
- /// Divide `a` by `b` storing the quotient in `a`.
- public static func /=(a: inout BigInt, b: BigInt) { a = a / b }
- /// Divide `a` by `b` storing the remainder in `a`.
- public static func %=(a: inout BigInt, b: BigInt) { a = a % b }
-}
diff --git a/Carthage/Checkouts/BigInt/Sources/Exponentiation.swift b/Carthage/Checkouts/BigInt/Sources/Exponentiation.swift
deleted file mode 100644
index 9d7ee85da..000000000
--- a/Carthage/Checkouts/BigInt/Sources/Exponentiation.swift
+++ /dev/null
@@ -1,119 +0,0 @@
-//
-// Exponentiation.swift
-// BigInt
-//
-// Created by Károly Lőrentey on 2016-01-03.
-// Copyright © 2016-2017 Károly Lőrentey.
-//
-
-extension BigUInt {
- //MARK: Exponentiation
-
- /// Returns this integer raised to the power `exponent`.
- ///
- /// This function calculates the result by [successively squaring the base while halving the exponent][expsqr].
- ///
- /// [expsqr]: https://en.wikipedia.org/wiki/Exponentiation_by_squaring
- ///
- /// - Note: This function can be unreasonably expensive for large exponents, which is why `exponent` is
- /// a simple integer value. If you want to calculate big exponents, you'll probably need to use
- /// the modulo arithmetic variant.
- /// - Returns: 1 if `exponent == 0`, otherwise `self` raised to `exponent`. (This implies that `0.power(0) == 1`.)
- /// - SeeAlso: `BigUInt.power(_:, modulus:)`
- /// - Complexity: O((exponent * self.count)^log2(3)) or somesuch. The result may require a large amount of memory, too.
- public func power(_ exponent: Int) -> BigUInt {
- if exponent == 0 { return 1 }
- if exponent == 1 { return self }
- if exponent < 0 {
- precondition(!self.isZero)
- return self == 1 ? 1 : 0
- }
- if self <= 1 { return self }
- var result = BigUInt(1)
- var b = self
- var e = exponent
- while e > 0 {
- if e & 1 == 1 {
- result *= b
- }
- e >>= 1
- b *= b
- }
- return result
- }
-
- /// Returns the remainder of this integer raised to the power `exponent` in modulo arithmetic under `modulus`.
- ///
- /// Uses the [right-to-left binary method][rtlb].
- ///
- /// [rtlb]: https://en.wikipedia.org/wiki/Modular_exponentiation#Right-to-left_binary_method
- ///
- /// - Complexity: O(exponent.count * modulus.count^log2(3)) or somesuch
- public func power(_ exponent: BigUInt, modulus: BigUInt) -> BigUInt {
- precondition(!modulus.isZero)
- if modulus == (1 as BigUInt) { return 0 }
- let shift = modulus.leadingZeroBitCount
- let normalizedModulus = modulus << shift
- var result = BigUInt(1)
- var b = self
- b.formRemainder(dividingBy: normalizedModulus, normalizedBy: shift)
- for var e in exponent.words {
- for _ in 0 ..< Word.bitWidth {
- if e & 1 == 1 {
- result *= b
- result.formRemainder(dividingBy: normalizedModulus, normalizedBy: shift)
- }
- e >>= 1
- b *= b
- b.formRemainder(dividingBy: normalizedModulus, normalizedBy: shift)
- }
- }
- return result
- }
-}
-
-extension BigInt {
- /// Returns this integer raised to the power `exponent`.
- ///
- /// This function calculates the result by [successively squaring the base while halving the exponent][expsqr].
- ///
- /// [expsqr]: https://en.wikipedia.org/wiki/Exponentiation_by_squaring
- ///
- /// - Note: This function can be unreasonably expensive for large exponents, which is why `exponent` is
- /// a simple integer value. If you want to calculate big exponents, you'll probably need to use
- /// the modulo arithmetic variant.
- /// - Returns: 1 if `exponent == 0`, otherwise `self` raised to `exponent`. (This implies that `0.power(0) == 1`.)
- /// - SeeAlso: `BigUInt.power(_:, modulus:)`
- /// - Complexity: O((exponent * self.count)^log2(3)) or somesuch. The result may require a large amount of memory, too.
- public func power(_ exponent: Int) -> BigInt {
- return BigInt(sign: self.sign == .minus && exponent & 1 != 0 ? .minus : .plus,
- magnitude: self.magnitude.power(exponent))
- }
-
- /// Returns the remainder of this integer raised to the power `exponent` in modulo arithmetic under `modulus`.
- ///
- /// Uses the [right-to-left binary method][rtlb].
- ///
- /// [rtlb]: https://en.wikipedia.org/wiki/Modular_exponentiation#Right-to-left_binary_method
- ///
- /// - Complexity: O(exponent.count * modulus.count^log2(3)) or somesuch
- public func power(_ exponent: BigInt, modulus: BigInt) -> BigInt {
- precondition(!modulus.isZero)
- if modulus.magnitude == 1 { return 0 }
- if exponent.isZero { return 1 }
- if exponent == 1 { return self.modulus(modulus) }
- if exponent < 0 {
- precondition(!self.isZero)
- guard magnitude == 1 else { return 0 }
- guard sign == .minus else { return 1 }
- guard exponent.magnitude[0] & 1 != 0 else { return 1 }
- return BigInt(modulus.magnitude - 1)
- }
- let power = self.magnitude.power(exponent.magnitude,
- modulus: modulus.magnitude)
- if self.sign == .plus || exponent.magnitude[0] & 1 == 0 || power.isZero {
- return BigInt(power)
- }
- return BigInt(modulus.magnitude - power)
- }
-}
diff --git a/Carthage/Checkouts/BigInt/Sources/Floating Point Conversion.swift b/Carthage/Checkouts/BigInt/Sources/Floating Point Conversion.swift
deleted file mode 100644
index 6c2395a31..000000000
--- a/Carthage/Checkouts/BigInt/Sources/Floating Point Conversion.swift
+++ /dev/null
@@ -1,73 +0,0 @@
-//
-// Floating Point Conversion.swift
-// BigInt
-//
-// Created by Károly Lőrentey on 2017-08-11.
-// Copyright © 2016-2017 Károly Lőrentey.
-//
-
-extension BigUInt {
- public init?(exactly source: T) {
- guard source.isFinite else { return nil }
- guard !source.isZero else { self = 0; return }
- guard source.sign == .plus else { return nil }
- let value = source.rounded(.towardZero)
- guard value == source else { return nil }
- assert(value.floatingPointClass == .positiveNormal)
- assert(value.exponent >= 0)
- let significand = value.significandBitPattern
- self = (BigUInt(1) << value.exponent) + BigUInt(significand) >> (T.significandBitCount - Int(value.exponent))
- }
-
- public init(_ source: T) {
- self.init(exactly: source.rounded(.towardZero))!
- }
-}
-
-extension BigInt {
- public init?(exactly source: T) {
- switch source.sign{
- case .plus:
- guard let magnitude = BigUInt(exactly: source) else { return nil }
- self = BigInt(sign: .plus, magnitude: magnitude)
- case .minus:
- guard let magnitude = BigUInt(exactly: -source) else { return nil }
- self = BigInt(sign: .minus, magnitude: magnitude)
- }
- }
-
- public init(_ source: T) {
- self.init(exactly: source.rounded(.towardZero))!
- }
-}
-
-extension BinaryFloatingPoint where RawExponent: FixedWidthInteger, RawSignificand: FixedWidthInteger {
- public init(_ value: BigInt) {
- guard !value.isZero else { self = 0; return }
- let v = value.magnitude
- let bitWidth = v.bitWidth
- var exponent = bitWidth - 1
- let shift = bitWidth - Self.significandBitCount - 1
- var significand = value.magnitude >> (shift - 1)
- if significand[0] & 3 == 3 { // Handle rounding
- significand >>= 1
- significand += 1
- if significand.trailingZeroBitCount >= Self.significandBitCount {
- exponent += 1
- }
- }
- else {
- significand >>= 1
- }
- let bias = 1 << (Self.exponentBitCount - 1) - 1
- guard exponent <= bias else { self = Self.infinity; return }
- significand &= 1 << Self.significandBitCount - 1
- self = Self.init(sign: value.sign == .plus ? .plus : .minus,
- exponentBitPattern: RawExponent(bias + exponent),
- significandBitPattern: RawSignificand(significand))
- }
-
- public init(_ value: BigUInt) {
- self.init(BigInt(sign: .plus, magnitude: value))
- }
-}
diff --git a/Carthage/Checkouts/BigInt/Sources/GCD.swift b/Carthage/Checkouts/BigInt/Sources/GCD.swift
deleted file mode 100644
index d55605dce..000000000
--- a/Carthage/Checkouts/BigInt/Sources/GCD.swift
+++ /dev/null
@@ -1,80 +0,0 @@
-//
-// GCD.swift
-// BigInt
-//
-// Created by Károly Lőrentey on 2016-01-03.
-// Copyright © 2016-2017 Károly Lőrentey.
-//
-
-extension BigUInt {
- //MARK: Greatest Common Divisor
-
- /// Returns the greatest common divisor of `self` and `b`.
- ///
- /// - Complexity: O(count^2) where count = max(self.count, b.count)
- public func greatestCommonDivisor(with b: BigUInt) -> BigUInt {
- // This is Stein's algorithm: https://en.wikipedia.org/wiki/Binary_GCD_algorithm
- if self.isZero { return b }
- if b.isZero { return self }
-
- let az = self.trailingZeroBitCount
- let bz = b.trailingZeroBitCount
- let twos = Swift.min(az, bz)
-
- var (x, y) = (self >> az, b >> bz)
- if x < y { swap(&x, &y) }
-
- while !x.isZero {
- x >>= x.trailingZeroBitCount
- if x < y { swap(&x, &y) }
- x -= y
- }
- return y << twos
- }
-
- /// Returns the [multiplicative inverse of this integer in modulo `modulus` arithmetic][inverse],
- /// or `nil` if there is no such number.
- ///
- /// [inverse]: https://en.wikipedia.org/wiki/Extended_Euclidean_algorithm#Modular_integers
- ///
- /// - Returns: If `gcd(self, modulus) == 1`, the value returned is an integer `a < modulus` such that `(a * self) % modulus == 1`. If `self` and `modulus` aren't coprime, the return value is `nil`.
- /// - Requires: modulus > 1
- /// - Complexity: O(count^3)
- public func inverse(_ modulus: BigUInt) -> BigUInt? {
- precondition(modulus > 1)
- var t1 = BigInt(0)
- var t2 = BigInt(1)
- var r1 = modulus
- var r2 = self
- while !r2.isZero {
- let quotient = r1 / r2
- (t1, t2) = (t2, t1 - BigInt(quotient) * t2)
- (r1, r2) = (r2, r1 - quotient * r2)
- }
- if r1 > 1 { return nil }
- if t1.sign == .minus { return modulus - t1.magnitude }
- return t1.magnitude
- }
-}
-
-extension BigInt {
- /// Returns the greatest common divisor of `a` and `b`.
- ///
- /// - Complexity: O(count^2) where count = max(a.count, b.count)
- public func greatestCommonDivisor(with b: BigInt) -> BigInt {
- return BigInt(self.magnitude.greatestCommonDivisor(with: b.magnitude))
- }
-
- /// Returns the [multiplicative inverse of this integer in modulo `modulus` arithmetic][inverse],
- /// or `nil` if there is no such number.
- ///
- /// [inverse]: https://en.wikipedia.org/wiki/Extended_Euclidean_algorithm#Modular_integers
- ///
- /// - Returns: If `gcd(self, modulus) == 1`, the value returned is an integer `a < modulus` such that `(a * self) % modulus == 1`. If `self` and `modulus` aren't coprime, the return value is `nil`.
- /// - Requires: modulus.magnitude > 1
- /// - Complexity: O(count^3)
- public func inverse(_ modulus: BigInt) -> BigInt? {
- guard let inv = self.magnitude.inverse(modulus.magnitude) else { return nil }
- return BigInt(self.sign == .plus || inv.isZero ? inv : modulus.magnitude - inv)
- }
-}
diff --git a/Carthage/Checkouts/BigInt/Sources/Hashable.swift b/Carthage/Checkouts/BigInt/Sources/Hashable.swift
deleted file mode 100644
index c5dc0e642..000000000
--- a/Carthage/Checkouts/BigInt/Sources/Hashable.swift
+++ /dev/null
@@ -1,26 +0,0 @@
-//
-// Hashable.swift
-// BigInt
-//
-// Created by Károly Lőrentey on 2016-01-03.
-// Copyright © 2016-2017 Károly Lőrentey.
-//
-
-extension BigUInt: Hashable {
- //MARK: Hashing
-
- /// Append this `BigUInt` to the specified hasher.
- public func hash(into hasher: inout Hasher) {
- for word in self.words {
- hasher.combine(word)
- }
- }
-}
-
-extension BigInt: Hashable {
- /// Append this `BigInt` to the specified hasher.
- public func hash(into hasher: inout Hasher) {
- hasher.combine(sign)
- hasher.combine(magnitude)
- }
-}
diff --git a/Carthage/Checkouts/BigInt/Sources/Info.plist b/Carthage/Checkouts/BigInt/Sources/Info.plist
deleted file mode 100644
index 63135fb1e..000000000
--- a/Carthage/Checkouts/BigInt/Sources/Info.plist
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
- CFBundleDevelopmentRegion
- en
- CFBundleExecutable
- $(EXECUTABLE_NAME)
- CFBundleIdentifier
- $(PRODUCT_BUNDLE_IDENTIFIER)
- CFBundleInfoDictionaryVersion
- 6.0
- CFBundleName
- $(PRODUCT_NAME)
- CFBundlePackageType
- FMWK
- CFBundleShortVersionString
- $(VERSION_STRING)
- CFBundleSignature
- ????
- CFBundleVersion
- $(CURRENT_PROJECT_VERSION)
- NSPrincipalClass
-
- NSHumanReadableCopyright
- Copyright © 2016 Károly Lőrentey.
-
-
diff --git a/Carthage/Checkouts/BigInt/Sources/Integer Conversion.swift b/Carthage/Checkouts/BigInt/Sources/Integer Conversion.swift
deleted file mode 100644
index 9a210e4a4..000000000
--- a/Carthage/Checkouts/BigInt/Sources/Integer Conversion.swift
+++ /dev/null
@@ -1,89 +0,0 @@
-//
-// Integer Conversion.swift
-// BigInt
-//
-// Created by Károly Lőrentey on 2017-08-11.
-// Copyright © 2016-2017 Károly Lőrentey.
-//
-
-extension BigUInt {
- public init?(exactly source: T) {
- guard source >= (0 as T) else { return nil }
- if source.bitWidth <= 2 * Word.bitWidth {
- var it = source.words.makeIterator()
- self.init(low: it.next() ?? 0, high: it.next() ?? 0)
- precondition(it.next() == nil, "Length of BinaryInteger.words is greater than its bitWidth")
- }
- else {
- self.init(words: source.words)
- }
- }
-
- public init(_ source: T) {
- precondition(source >= (0 as T), "BigUInt cannot represent negative values")
- self.init(exactly: source)!
- }
-
- public init(truncatingIfNeeded source: T) {
- self.init(words: source.words)
- }
-
- public init(clamping source: T) {
- if source <= (0 as T) {
- self.init()
- }
- else {
- self.init(words: source.words)
- }
- }
-}
-
-extension BigInt {
- public init() {
- self.init(sign: .plus, magnitude: 0)
- }
-
- /// Initializes a new signed big integer with the same value as the specified unsigned big integer.
- public init(_ integer: BigUInt) {
- self.magnitude = integer
- self.sign = .plus
- }
-
- public init(_ source: T) where T : BinaryInteger {
- if source >= (0 as T) {
- self.init(sign: .plus, magnitude: BigUInt(source))
- }
- else {
- var words = Array(source.words)
- words.twosComplement()
- self.init(sign: .minus, magnitude: BigUInt(words: words))
- }
- }
-
- public init?(exactly source: T) where T : BinaryInteger {
- self.init(source)
- }
-
- public init(clamping source: T) where T : BinaryInteger {
- self.init(source)
- }
-
- public init(truncatingIfNeeded source: T) where T : BinaryInteger {
- self.init(source)
- }
-}
-
-extension BigUInt: ExpressibleByIntegerLiteral {
- /// Initialize a new big integer from an integer literal.
- public init(integerLiteral value: UInt64) {
- self.init(value)
- }
-}
-
-extension BigInt: ExpressibleByIntegerLiteral {
- /// Initialize a new big integer from an integer literal.
- public init(integerLiteral value: Int64) {
- self.init(value)
- }
-}
-
diff --git a/Carthage/Checkouts/BigInt/Sources/Multiplication.swift b/Carthage/Checkouts/BigInt/Sources/Multiplication.swift
deleted file mode 100644
index 635c36a5f..000000000
--- a/Carthage/Checkouts/BigInt/Sources/Multiplication.swift
+++ /dev/null
@@ -1,165 +0,0 @@
-//
-// Multiplication.swift
-// BigInt
-//
-// Created by Károly Lőrentey on 2016-01-03.
-// Copyright © 2016-2017 Károly Lőrentey.
-//
-
-extension BigUInt {
-
- //MARK: Multiplication
-
- /// Multiply this big integer by a single word, and store the result in place of the original big integer.
- ///
- /// - Complexity: O(count)
- public mutating func multiply(byWord y: Word) {
- guard y != 0 else { self = 0; return }
- guard y != 1 else { return }
- var carry: Word = 0
- let c = self.count
- for i in 0 ..< c {
- let (h, l) = self[i].multipliedFullWidth(by: y)
- let (low, o) = l.addingReportingOverflow(carry)
- self[i] = low
- carry = (o ? h + 1 : h)
- }
- self[c] = carry
- }
-
- /// Multiply this big integer by a single Word, and return the result.
- ///
- /// - Complexity: O(count)
- public func multiplied(byWord y: Word) -> BigUInt {
- var r = self
- r.multiply(byWord: y)
- return r
- }
-
- /// Multiply `x` by `y`, and add the result to this integer, optionally shifted `shift` words to the left.
- ///
- /// - Note: This is the fused multiply/shift/add operation; it is more efficient than doing the components
- /// individually. (The fused operation doesn't need to allocate space for temporary big integers.)
- /// - Returns: `self` is set to `self + (x * y) << (shift * 2^Word.bitWidth)`
- /// - Complexity: O(count)
- public mutating func multiplyAndAdd(_ x: BigUInt, _ y: Word, shiftedBy shift: Int = 0) {
- precondition(shift >= 0)
- guard y != 0 && x.count > 0 else { return }
- guard y != 1 else { self.add(x, shiftedBy: shift); return }
- var mulCarry: Word = 0
- var addCarry = false
- let xc = x.count
- var xi = 0
- while xi < xc || addCarry || mulCarry > 0 {
- let (h, l) = x[xi].multipliedFullWidth(by: y)
- let (low, o) = l.addingReportingOverflow(mulCarry)
- mulCarry = (o ? h + 1 : h)
-
- let ai = shift + xi
- let (sum1, so1) = self[ai].addingReportingOverflow(low)
- if addCarry {
- let (sum2, so2) = sum1.addingReportingOverflow(1)
- self[ai] = sum2
- addCarry = so1 || so2
- }
- else {
- self[ai] = sum1
- addCarry = so1
- }
- xi += 1
- }
- }
-
- /// Multiply this integer by `y` and return the result.
- ///
- /// - Note: This uses the naive O(n^2) multiplication algorithm unless both arguments have more than
- /// `BigUInt.directMultiplicationLimit` words.
- /// - Complexity: O(n^log2(3))
- public func multiplied(by y: BigUInt) -> BigUInt {
- // This method is mostly defined for symmetry with the rest of the arithmetic operations.
- return self * y
- }
-
- /// Multiplication switches to an asymptotically better recursive algorithm when arguments have more words than this limit.
- public static var directMultiplicationLimit: Int = 1024
-
- /// Multiply `a` by `b` and return the result.
- ///
- /// - Note: This uses the naive O(n^2) multiplication algorithm unless both arguments have more than
- /// `BigUInt.directMultiplicationLimit` words.
- /// - Complexity: O(n^log2(3))
- public static func *(x: BigUInt, y: BigUInt) -> BigUInt {
- let xc = x.count
- let yc = y.count
- if xc == 0 { return BigUInt() }
- if yc == 0 { return BigUInt() }
- if yc == 1 { return x.multiplied(byWord: y[0]) }
- if xc == 1 { return y.multiplied(byWord: x[0]) }
-
- if Swift.min(xc, yc) <= BigUInt.directMultiplicationLimit {
- // Long multiplication.
- let left = (xc < yc ? y : x)
- let right = (xc < yc ? x : y)
- var result = BigUInt()
- for i in (0 ..< right.count).reversed() {
- result.multiplyAndAdd(left, right[i], shiftedBy: i)
- }
- return result
- }
-
- if yc < xc {
- let (xh, xl) = x.split
- var r = xl * y
- r.add(xh * y, shiftedBy: x.middleIndex)
- return r
- }
- else if xc < yc {
- let (yh, yl) = y.split
- var r = yl * x
- r.add(yh * x, shiftedBy: y.middleIndex)
- return r
- }
-
- let shift = x.middleIndex
-
- // Karatsuba multiplication:
- // x * y = * = (ignoring carry)
- let (a, b) = x.split
- let (c, d) = y.split
-
- let high = a * c
- let low = b * d
- let xp = a >= b
- let yp = c >= d
- let xm = (xp ? a - b : b - a)
- let ym = (yp ? c - d : d - c)
- let m = xm * ym
-
- var r = low
- r.add(high, shiftedBy: 2 * shift)
- r.add(low, shiftedBy: shift)
- r.add(high, shiftedBy: shift)
- if xp == yp {
- r.subtract(m, shiftedBy: shift)
- }
- else {
- r.add(m, shiftedBy: shift)
- }
- return r
- }
-
- /// Multiply `a` by `b` and store the result in `a`.
- public static func *=(a: inout BigUInt, b: BigUInt) {
- a = a * b
- }
-}
-
-extension BigInt {
- /// Multiply `a` with `b` and return the result.
- public static func *(a: BigInt, b: BigInt) -> BigInt {
- return BigInt(sign: a.sign == b.sign ? .plus : .minus, magnitude: a.magnitude * b.magnitude)
- }
-
- /// Multiply `a` with `b` in place.
- public static func *=(a: inout BigInt, b: BigInt) { a = a * b }
-}
diff --git a/Carthage/Checkouts/BigInt/Sources/Prime Test.swift b/Carthage/Checkouts/BigInt/Sources/Prime Test.swift
deleted file mode 100644
index 7f1871104..000000000
--- a/Carthage/Checkouts/BigInt/Sources/Prime Test.swift
+++ /dev/null
@@ -1,153 +0,0 @@
-//
-// Prime Test.swift
-// BigInt
-//
-// Created by Károly Lőrentey on 2016-01-04.
-// Copyright © 2016-2017 Károly Lőrentey.
-//
-
-/// The first several [prime numbers][primes].
-///
-/// [primes]: https://oeis.org/A000040
-let primes: [BigUInt.Word] = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41]
-
-/// The ith element in this sequence is the smallest composite number that passes the strong probable prime test
-/// for all of the first (i+1) primes.
-///
-/// This is sequence [A014233](http://oeis.org/A014233) on the [Online Encyclopaedia of Integer Sequences](http://oeis.org).
-let pseudoPrimes: [BigUInt] = [
- /* 2 */ 2_047,
- /* 3 */ 1_373_653,
- /* 5 */ 25_326_001,
- /* 7 */ 3_215_031_751,
- /* 11 */ 2_152_302_898_747,
- /* 13 */ 3_474_749_660_383,
- /* 17 */ 341_550_071_728_321,
- /* 19 */ 341_550_071_728_321,
- /* 23 */ 3_825_123_056_546_413_051,
- /* 29 */ 3_825_123_056_546_413_051,
- /* 31 */ 3_825_123_056_546_413_051,
- /* 37 */ "318665857834031151167461",
- /* 41 */ "3317044064679887385961981",
-]
-
-extension BigUInt {
- //MARK: Primality Testing
-
- /// Returns true iff this integer passes the [strong probable prime test][sppt] for the specified base.
- ///
- /// [sppt]: https://en.wikipedia.org/wiki/Probable_prime
- public func isStrongProbablePrime(_ base: BigUInt) -> Bool {
- precondition(base > (1 as BigUInt))
- precondition(self > (0 as BigUInt))
- let dec = self - 1
-
- let r = dec.trailingZeroBitCount
- let d = dec >> r
-
- var test = base.power(d, modulus: self)
- if test == 1 || test == dec { return true }
-
- if r > 0 {
- let shift = self.leadingZeroBitCount
- let normalized = self << shift
- for _ in 1 ..< r {
- test *= test
- test.formRemainder(dividingBy: normalized, normalizedBy: shift)
- if test == 1 {
- return false
- }
- if test == dec { return true }
- }
- }
- return false
- }
-
- /// Returns true if this integer is probably prime. Returns false if this integer is definitely not prime.
- ///
- /// This function performs a probabilistic [Miller-Rabin Primality Test][mrpt], consisting of `rounds` iterations,
- /// each calculating the strong probable prime test for a random base. The number of rounds is 10 by default,
- /// but you may specify your own choice.
- ///
- /// To speed things up, the function checks if `self` is divisible by the first few prime numbers before
- /// diving into (slower) Miller-Rabin testing.
- ///
- /// Also, when `self` is less than 82 bits wide, `isPrime` does a deterministic test that is guaranteed to
- /// return a correct result.
- ///
- /// [mrpt]: https://en.wikipedia.org/wiki/Miller–Rabin_primality_test
- public func isPrime(rounds: Int = 10) -> Bool {
- if count <= 1 && self[0] < 2 { return false }
- if count == 1 && self[0] < 4 { return true }
-
- // Even numbers above 2 aren't prime.
- if self[0] & 1 == 0 { return false }
-
- // Quickly check for small primes.
- for i in 1 ..< primes.count {
- let p = primes[i]
- if self.count == 1 && self[0] == p {
- return true
- }
- if self.quotientAndRemainder(dividingByWord: p).remainder == 0 {
- return false
- }
- }
-
- /// Give an exact answer when we can.
- if self < pseudoPrimes.last! {
- for i in 0 ..< pseudoPrimes.count {
- guard isStrongProbablePrime(BigUInt(primes[i])) else {
- break
- }
- if self < pseudoPrimes[i] {
- // `self` is below the lowest pseudoprime corresponding to the prime bases we tested. It's a prime!
- return true
- }
- }
- return false
- }
-
- /// Otherwise do as many rounds of random SPPT as required.
- for _ in 0 ..< rounds {
- let random = BigUInt.randomInteger(lessThan: self - 2) + 2
- guard isStrongProbablePrime(random) else {
- return false
- }
- }
-
- // Well, it smells primey to me.
- return true
- }
-}
-
-extension BigInt {
- //MARK: Primality Testing
-
- /// Returns true iff this integer passes the [strong probable prime test][sppt] for the specified base.
- ///
- /// [sppt]: https://en.wikipedia.org/wiki/Probable_prime
- public func isStrongProbablePrime(_ base: BigInt) -> Bool {
- precondition(base.sign == .plus)
- if self.sign == .minus { return false }
- return self.magnitude.isStrongProbablePrime(base.magnitude)
- }
-
- /// Returns true if this integer is probably prime. Returns false if this integer is definitely not prime.
- ///
- /// This function performs a probabilistic [Miller-Rabin Primality Test][mrpt], consisting of `rounds` iterations,
- /// each calculating the strong probable prime test for a random base. The number of rounds is 10 by default,
- /// but you may specify your own choice.
- ///
- /// To speed things up, the function checks if `self` is divisible by the first few prime numbers before
- /// diving into (slower) Miller-Rabin testing.
- ///
- /// Also, when `self` is less than 82 bits wide, `isPrime` does a deterministic test that is guaranteed to
- /// return a correct result.
- ///
- /// [mrpt]: https://en.wikipedia.org/wiki/Miller–Rabin_primality_test
- public func isPrime(rounds: Int = 10) -> Bool {
- if self.sign == .minus { return false }
- return self.magnitude.isPrime(rounds: rounds)
- }
-}
diff --git a/Carthage/Checkouts/BigInt/Sources/Random.swift b/Carthage/Checkouts/BigInt/Sources/Random.swift
deleted file mode 100644
index bea98caf0..000000000
--- a/Carthage/Checkouts/BigInt/Sources/Random.swift
+++ /dev/null
@@ -1,101 +0,0 @@
-//
-// Random.swift
-// BigInt
-//
-// Created by Károly Lőrentey on 2016-01-04.
-// Copyright © 2016-2017 Károly Lőrentey.
-//
-
-extension BigUInt {
- /// Create a big unsigned integer consisting of `width` uniformly distributed random bits.
- ///
- /// - Parameter width: The maximum number of one bits in the result.
- /// - Parameter generator: The source of randomness.
- /// - Returns: A big unsigned integer less than `1 << width`.
- public static func randomInteger(withMaximumWidth width: Int, using generator: inout RNG) -> BigUInt {
- var result = BigUInt.zero
- var bitsLeft = width
- var i = 0
- let wordsNeeded = (width + Word.bitWidth - 1) / Word.bitWidth
- if wordsNeeded > 2 {
- result.reserveCapacity(wordsNeeded)
- }
- while bitsLeft >= Word.bitWidth {
- result[i] = generator.next()
- i += 1
- bitsLeft -= Word.bitWidth
- }
- if bitsLeft > 0 {
- let mask: Word = (1 << bitsLeft) - 1
- result[i] = (generator.next() as Word) & mask
- }
- return result
- }
-
- /// Create a big unsigned integer consisting of `width` uniformly distributed random bits.
- ///
- /// - Note: I use a `SystemRandomGeneratorGenerator` as the source of randomness.
- ///
- /// - Parameter width: The maximum number of one bits in the result.
- /// - Returns: A big unsigned integer less than `1 << width`.
- public static func randomInteger(withMaximumWidth width: Int) -> BigUInt {
- var rng = SystemRandomNumberGenerator()
- return randomInteger(withMaximumWidth: width, using: &rng)
- }
-
- /// Create a big unsigned integer consisting of `width-1` uniformly distributed random bits followed by a one bit.
- ///
- /// - Note: If `width` is zero, the result is zero.
- ///
- /// - Parameter width: The number of bits required to represent the answer.
- /// - Parameter generator: The source of randomness.
- /// - Returns: A random big unsigned integer whose width is `width`.
- public static func randomInteger(withExactWidth width: Int, using generator: inout RNG) -> BigUInt {
- // width == 0 -> return 0 because there is no room for a one bit.
- // width == 1 -> return 1 because there is no room for any random bits.
- guard width > 1 else { return BigUInt(width) }
- var result = randomInteger(withMaximumWidth: width - 1, using: &generator)
- result[(width - 1) / Word.bitWidth] |= 1 << Word((width - 1) % Word.bitWidth)
- return result
- }
-
- /// Create a big unsigned integer consisting of `width-1` uniformly distributed random bits followed by a one bit.
- ///
- /// - Note: If `width` is zero, the result is zero.
- /// - Note: I use a `SystemRandomGeneratorGenerator` as the source of randomness.
- ///
- /// - Returns: A random big unsigned integer whose width is `width`.
- public static func randomInteger(withExactWidth width: Int) -> BigUInt {
- var rng = SystemRandomNumberGenerator()
- return randomInteger(withExactWidth: width, using: &rng)
- }
-
- /// Create a uniformly distributed random unsigned integer that's less than the specified limit.
- ///
- /// - Precondition: `limit > 0`.
- ///
- /// - Parameter limit: The upper bound on the result.
- /// - Parameter generator: The source of randomness.
- /// - Returns: A random big unsigned integer that is less than `limit`.
- public static func randomInteger(lessThan limit: BigUInt, using generator: inout RNG) -> BigUInt {
- precondition(limit > 0, "\(#function): 0 is not a valid limit")
- let width = limit.bitWidth
- var random = randomInteger(withMaximumWidth: width, using: &generator)
- while random >= limit {
- random = randomInteger(withMaximumWidth: width, using: &generator)
- }
- return random
- }
-
- /// Create a uniformly distributed random unsigned integer that's less than the specified limit.
- ///
- /// - Precondition: `limit > 0`.
- /// - Note: I use a `SystemRandomGeneratorGenerator` as the source of randomness.
- ///
- /// - Parameter limit: The upper bound on the result.
- /// - Returns: A random big unsigned integer that is less than `limit`.
- public static func randomInteger(lessThan limit: BigUInt) -> BigUInt {
- var rng = SystemRandomNumberGenerator()
- return randomInteger(lessThan: limit, using: &rng)
- }
-}
diff --git a/Carthage/Checkouts/BigInt/Sources/Shifts.swift b/Carthage/Checkouts/BigInt/Sources/Shifts.swift
deleted file mode 100644
index e676e4143..000000000
--- a/Carthage/Checkouts/BigInt/Sources/Shifts.swift
+++ /dev/null
@@ -1,211 +0,0 @@
-//
-// Shifts.swift
-// BigInt
-//
-// Created by Károly Lőrentey on 2016-01-03.
-// Copyright © 2016-2017 Károly Lőrentey.
-//
-
-extension BigUInt {
-
- //MARK: Shift Operators
-
- internal func shiftedLeft(by amount: Word) -> BigUInt {
- guard amount > 0 else { return self }
-
- let ext = Int(amount / Word(Word.bitWidth)) // External shift amount (new words)
- let up = Word(amount % Word(Word.bitWidth)) // Internal shift amount (subword shift)
- let down = Word(Word.bitWidth) - up
-
- var result = BigUInt()
- if up > 0 {
- var i = 0
- var lowbits: Word = 0
- while i < self.count || lowbits > 0 {
- let word = self[i]
- result[i + ext] = word << up | lowbits
- lowbits = word >> down
- i += 1
- }
- }
- else {
- for i in 0 ..< self.count {
- result[i + ext] = self[i]
- }
- }
- return result
- }
-
- internal mutating func shiftLeft(by amount: Word) {
- guard amount > 0 else { return }
-
- let ext = Int(amount / Word(Word.bitWidth)) // External shift amount (new words)
- let up = Word(amount % Word(Word.bitWidth)) // Internal shift amount (subword shift)
- let down = Word(Word.bitWidth) - up
-
- if up > 0 {
- var i = 0
- var lowbits: Word = 0
- while i < self.count || lowbits > 0 {
- let word = self[i]
- self[i] = word << up | lowbits
- lowbits = word >> down
- i += 1
- }
- }
- if ext > 0 && self.count > 0 {
- self.shiftLeft(byWords: ext)
- }
- }
-
- internal func shiftedRight(by amount: Word) -> BigUInt {
- guard amount > 0 else { return self }
- guard amount < self.bitWidth else { return 0 }
-
- let ext = Int(amount / Word(Word.bitWidth)) // External shift amount (new words)
- let down = Word(amount % Word(Word.bitWidth)) // Internal shift amount (subword shift)
- let up = Word(Word.bitWidth) - down
-
- var result = BigUInt()
- if down > 0 {
- var highbits: Word = 0
- for i in (ext ..< self.count).reversed() {
- let word = self[i]
- result[i - ext] = highbits | word >> down
- highbits = word << up
- }
- }
- else {
- for i in (ext ..< self.count).reversed() {
- result[i - ext] = self[i]
- }
- }
- return result
- }
-
- internal mutating func shiftRight(by amount: Word) {
- guard amount > 0 else { return }
- guard amount < self.bitWidth else { self.clear(); return }
-
- let ext = Int(amount / Word(Word.bitWidth)) // External shift amount (new words)
- let down = Word(amount % Word(Word.bitWidth)) // Internal shift amount (subword shift)
- let up = Word(Word.bitWidth) - down
-
- if ext > 0 {
- self.shiftRight(byWords: ext)
- }
- if down > 0 {
- var i = self.count - 1
- var highbits: Word = 0
- while i >= 0 {
- let word = self[i]
- self[i] = highbits | word >> down
- highbits = word << up
- i -= 1
- }
- }
- }
-
- public static func >>=(lhs: inout BigUInt, rhs: Other) {
- if rhs < (0 as Other) {
- lhs <<= (0 - rhs)
- }
- else if rhs >= lhs.bitWidth {
- lhs.clear()
- }
- else {
- lhs.shiftRight(by: UInt(rhs))
- }
- }
-
- public static func <<=(lhs: inout BigUInt, rhs: Other) {
- if rhs < (0 as Other) {
- lhs >>= (0 - rhs)
- return
- }
- lhs.shiftLeft(by: Word(exactly: rhs)!)
- }
-
- public static func >>(lhs: BigUInt, rhs: Other) -> BigUInt {
- if rhs < (0 as Other) {
- return lhs << (0 - rhs)
- }
- if rhs > Word.max {
- return 0
- }
- return lhs.shiftedRight(by: UInt(rhs))
- }
-
- public static func <<(lhs: BigUInt, rhs: Other) -> BigUInt {
- if rhs < (0 as Other) {
- return lhs >> (0 - rhs)
- }
- return lhs.shiftedLeft(by: Word(exactly: rhs)!)
- }
-}
-
-extension BigInt {
- func shiftedLeft(by amount: Word) -> BigInt {
- return BigInt(sign: self.sign, magnitude: self.magnitude.shiftedLeft(by: amount))
- }
-
- mutating func shiftLeft(by amount: Word) {
- self.magnitude.shiftLeft(by: amount)
- }
-
- func shiftedRight(by amount: Word) -> BigInt {
- let m = self.magnitude.shiftedRight(by: amount)
- return BigInt(sign: self.sign, magnitude: self.sign == .minus && m.isZero ? 1 : m)
- }
-
- mutating func shiftRight(by amount: Word) {
- magnitude.shiftRight(by: amount)
- if sign == .minus, magnitude.isZero {
- magnitude.load(1)
- }
- }
-
- public static func &<<(left: BigInt, right: BigInt) -> BigInt {
- return left.shiftedLeft(by: right.words[0])
- }
-
- public static func &<<=(left: inout BigInt, right: BigInt) {
- left.shiftLeft(by: right.words[0])
- }
-
- public static func &>>(left: BigInt, right: BigInt) -> BigInt {
- return left.shiftedRight(by: right.words[0])
- }
-
- public static func &>>=(left: inout BigInt, right: BigInt) {
- left.shiftRight(by: right.words[0])
- }
-
- public static func <<(lhs: BigInt, rhs: Other) -> BigInt {
- guard rhs >= (0 as Other) else { return lhs >> (0 - rhs) }
- return lhs.shiftedLeft(by: Word(rhs))
- }
-
- public static func <<=(lhs: inout BigInt, rhs: Other) {
- if rhs < (0 as Other) {
- lhs >>= (0 - rhs)
- }
- else {
- lhs.shiftLeft(by: Word(rhs))
- }
- }
-
- public static func >>(lhs: BigInt, rhs: Other) -> BigInt {
- guard rhs >= (0 as Other) else { return lhs << (0 - rhs) }
- return lhs.shiftedRight(by: Word(rhs))
- }
-
- public static func >>=(lhs: inout BigInt, rhs: Other) {
- if rhs < (0 as Other) {
- lhs <<= (0 - rhs)
- }
- else {
- lhs.shiftRight(by: Word(rhs))
- }
- }
-}
diff --git a/Carthage/Checkouts/BigInt/Sources/Square Root.swift b/Carthage/Checkouts/BigInt/Sources/Square Root.swift
deleted file mode 100644
index 68db0691c..000000000
--- a/Carthage/Checkouts/BigInt/Sources/Square Root.swift
+++ /dev/null
@@ -1,41 +0,0 @@
-//
-// Square Root.swift
-// BigInt
-//
-// Created by Károly Lőrentey on 2016-01-03.
-// Copyright © 2016-2017 Károly Lőrentey.
-//
-
-//MARK: Square Root
-
-extension BigUInt {
- /// Returns the integer square root of a big integer; i.e., the largest integer whose square isn't greater than `value`.
- ///
- /// - Returns: floor(sqrt(self))
- public func squareRoot() -> BigUInt {
- // This implementation uses Newton's method.
- guard !self.isZero else { return BigUInt() }
- var x = BigUInt(1) << ((self.bitWidth + 1) / 2)
- var y: BigUInt = 0
- while true {
- y.load(self)
- y /= x
- y += x
- y >>= 1
- if x == y || x == y - 1 { break }
- x = y
- }
- return x
- }
-}
-
-extension BigInt {
- /// Returns the integer square root of a big integer; i.e., the largest integer whose square isn't greater than `value`.
- ///
- /// - Requires: self >= 0
- /// - Returns: floor(sqrt(self))
- public func squareRoot() -> BigInt {
- precondition(self.sign == .plus)
- return BigInt(sign: .plus, magnitude: self.magnitude.squareRoot())
- }
-}
diff --git a/Carthage/Checkouts/BigInt/Sources/Strideable.swift b/Carthage/Checkouts/BigInt/Sources/Strideable.swift
deleted file mode 100644
index 2b79babd1..000000000
--- a/Carthage/Checkouts/BigInt/Sources/Strideable.swift
+++ /dev/null
@@ -1,38 +0,0 @@
-//
-// Strideable.swift
-// BigInt
-//
-// Created by Károly Lőrentey on 2017-08-11.
-// Copyright © 2016-2017 Károly Lőrentey.
-//
-
-extension BigUInt: Strideable {
- /// A type that can represent the distance between two values ofa `BigUInt`.
- public typealias Stride = BigInt
-
- /// Adds `n` to `self` and returns the result. Traps if the result would be less than zero.
- public func advanced(by n: BigInt) -> BigUInt {
- return n.sign == .minus ? self - n.magnitude : self + n.magnitude
- }
-
- /// Returns the (potentially negative) difference between `self` and `other` as a `BigInt`. Never traps.
- public func distance(to other: BigUInt) -> BigInt {
- return BigInt(other) - BigInt(self)
- }
-}
-
-extension BigInt: Strideable {
- public typealias Stride = BigInt
-
- /// Returns `self + n`.
- public func advanced(by n: Stride) -> BigInt {
- return self + n
- }
-
- /// Returns `other - self`.
- public func distance(to other: BigInt) -> Stride {
- return other - self
- }
-}
-
-
diff --git a/Carthage/Checkouts/BigInt/Sources/String Conversion.swift b/Carthage/Checkouts/BigInt/Sources/String Conversion.swift
deleted file mode 100644
index d6f340c93..000000000
--- a/Carthage/Checkouts/BigInt/Sources/String Conversion.swift
+++ /dev/null
@@ -1,236 +0,0 @@
-//
-// String Conversion.swift
-// BigInt
-//
-// Created by Károly Lőrentey on 2016-01-03.
-// Copyright © 2016-2017 Károly Lőrentey.
-//
-
-extension BigUInt {
-
- //MARK: String Conversion
-
- /// Calculates the number of numerals in a given radix that fit inside a single `Word`.
- ///
- /// - Returns: (chars, power) where `chars` is highest that satisfy `radix^chars <= 2^Word.bitWidth`. `power` is zero
- /// if radix is a power of two; otherwise `power == radix^chars`.
- fileprivate static func charsPerWord(forRadix radix: Int) -> (chars: Int, power: Word) {
- var power: Word = 1
- var overflow = false
- var count = 0
- while !overflow {
- let (p, o) = power.multipliedReportingOverflow(by: Word(radix))
- overflow = o
- if !o || p == 0 {
- count += 1
- power = p
- }
- }
- return (count, power)
- }
-
- /// Initialize a big integer from an ASCII representation in a given radix. Numerals above `9` are represented by
- /// letters from the English alphabet.
- ///
- /// - Requires: `radix > 1 && radix < 36`
- /// - Parameter `text`: A string consisting of characters corresponding to numerals in the given radix. (0-9, a-z, A-Z)
- /// - Parameter `radix`: The base of the number system to use, or 10 if unspecified.
- /// - Returns: The integer represented by `text`, or nil if `text` contains a character that does not represent a numeral in `radix`.
- public init?(_ text: S, radix: Int = 10) {
- precondition(radix > 1)
- let (charsPerWord, power) = BigUInt.charsPerWord(forRadix: radix)
-
- var words: [Word] = []
- var end = text.endIndex
- var start = end
- var count = 0
- while start != text.startIndex {
- start = text.index(before: start)
- count += 1
- if count == charsPerWord {
- guard let d = Word.init(text[start ..< end], radix: radix) else { return nil }
- words.append(d)
- end = start
- count = 0
- }
- }
- if start != end {
- guard let d = Word.init(text[start ..< end], radix: radix) else { return nil }
- words.append(d)
- }
-
- if power == 0 {
- self.init(words: words)
- }
- else {
- self.init()
- for d in words.reversed() {
- self.multiply(byWord: power)
- self.addWord(d)
- }
- }
- }
-}
-
-extension BigInt {
- /// Initialize a big integer from an ASCII representation in a given radix. Numerals above `9` are represented by
- /// letters from the English alphabet.
- ///
- /// - Requires: `radix > 1 && radix < 36`
- /// - Parameter `text`: A string optionally starting with "-" or "+" followed by characters corresponding to numerals in the given radix. (0-9, a-z, A-Z)
- /// - Parameter `radix`: The base of the number system to use, or 10 if unspecified.
- /// - Returns: The integer represented by `text`, or nil if `text` contains a character that does not represent a numeral in `radix`.
- public init?(_ text: S, radix: Int = 10) {
- var magnitude: BigUInt?
- var sign: Sign = .plus
- if text.first == "-" {
- sign = .minus
- let text = text.dropFirst()
- magnitude = BigUInt(text, radix: radix)
- }
- else if text.first == "+" {
- let text = text.dropFirst()
- magnitude = BigUInt(text, radix: radix)
- }
- else {
- magnitude = BigUInt(text, radix: radix)
- }
- guard let m = magnitude else { return nil }
- self.magnitude = m
- self.sign = sign
- }
-}
-
-extension String {
- /// Initialize a new string with the base-10 representation of an unsigned big integer.
- ///
- /// - Complexity: O(v.count^2)
- public init(_ v: BigUInt) { self.init(v, radix: 10, uppercase: false) }
-
- /// Initialize a new string representing an unsigned big integer in the given radix (base).
- ///
- /// Numerals greater than 9 are represented as letters from the English alphabet,
- /// starting with `a` if `uppercase` is false or `A` otherwise.
- ///
- /// - Requires: radix > 1 && radix <= 36
- /// - Complexity: O(count) when radix is a power of two; otherwise O(count^2).
- public init(_ v: BigUInt, radix: Int, uppercase: Bool = false) {
- precondition(radix > 1)
- let (charsPerWord, power) = BigUInt.charsPerWord(forRadix: radix)
-
- guard !v.isZero else { self = "0"; return }
-
- var parts: [String]
- if power == 0 {
- parts = v.words.map { String($0, radix: radix, uppercase: uppercase) }
- }
- else {
- parts = []
- var rest = v
- while !rest.isZero {
- let mod = rest.divide(byWord: power)
- parts.append(String(mod, radix: radix, uppercase: uppercase))
- }
- }
- assert(!parts.isEmpty)
-
- self = ""
- var first = true
- for part in parts.reversed() {
- let zeroes = charsPerWord - part.count
- assert(zeroes >= 0)
- if !first && zeroes > 0 {
- // Insert leading zeroes for mid-Words
- self += String(repeating: "0", count: zeroes)
- }
- first = false
- self += part
- }
- }
-
- /// Initialize a new string representing a signed big integer in the given radix (base).
- ///
- /// Numerals greater than 9 are represented as letters from the English alphabet,
- /// starting with `a` if `uppercase` is false or `A` otherwise.
- ///
- /// - Requires: radix > 1 && radix <= 36
- /// - Complexity: O(count) when radix is a power of two; otherwise O(count^2).
- public init(_ value: BigInt, radix: Int = 10, uppercase: Bool = false) {
- self = String(value.magnitude, radix: radix, uppercase: uppercase)
- if value.sign == .minus {
- self = "-" + self
- }
- }
-}
-
-extension BigUInt: ExpressibleByStringLiteral {
- /// Initialize a new big integer from a Unicode scalar.
- /// The scalar must represent a decimal digit.
- public init(unicodeScalarLiteral value: UnicodeScalar) {
- self = BigUInt(String(value), radix: 10)!
- }
-
- /// Initialize a new big integer from an extended grapheme cluster.
- /// The cluster must consist of a decimal digit.
- public init(extendedGraphemeClusterLiteral value: String) {
- self = BigUInt(value, radix: 10)!
- }
-
- /// Initialize a new big integer from a decimal number represented by a string literal of arbitrary length.
- /// The string must contain only decimal digits.
- public init(stringLiteral value: StringLiteralType) {
- self = BigUInt(value, radix: 10)!
- }
-}
-
-extension BigInt: ExpressibleByStringLiteral {
- /// Initialize a new big integer from a Unicode scalar.
- /// The scalar must represent a decimal digit.
- public init(unicodeScalarLiteral value: UnicodeScalar) {
- self = BigInt(String(value), radix: 10)!
- }
-
- /// Initialize a new big integer from an extended grapheme cluster.
- /// The cluster must consist of a decimal digit.
- public init(extendedGraphemeClusterLiteral value: String) {
- self = BigInt(value, radix: 10)!
- }
-
- /// Initialize a new big integer from a decimal number represented by a string literal of arbitrary length.
- /// The string must contain only decimal digits.
- public init(stringLiteral value: StringLiteralType) {
- self = BigInt(value, radix: 10)!
- }
-}
-
-extension BigUInt: CustomStringConvertible {
- /// Return the decimal representation of this integer.
- public var description: String {
- return String(self, radix: 10)
- }
-}
-
-extension BigInt: CustomStringConvertible {
- /// Return the decimal representation of this integer.
- public var description: String {
- return String(self, radix: 10)
- }
-}
-
-extension BigUInt: CustomPlaygroundDisplayConvertible {
-
- /// Return the playground quick look representation of this integer.
- public var playgroundDescription: Any {
- let text = String(self)
- return text + " (\(self.bitWidth) bits)"
- }
-}
-
-extension BigInt: CustomPlaygroundDisplayConvertible {
-
- /// Return the playground quick look representation of this integer.
- public var playgroundDescription: Any {
- let text = String(self)
- return text + " (\(self.magnitude.bitWidth) bits)"
- }
-}
diff --git a/Carthage/Checkouts/BigInt/Sources/Subtraction.swift b/Carthage/Checkouts/BigInt/Sources/Subtraction.swift
deleted file mode 100644
index 5ac872e65..000000000
--- a/Carthage/Checkouts/BigInt/Sources/Subtraction.swift
+++ /dev/null
@@ -1,169 +0,0 @@
-//
-// Subtraction.swift
-// BigInt
-//
-// Created by Károly Lőrentey on 2016-01-03.
-// Copyright © 2016-2017 Károly Lőrentey.
-//
-
-extension BigUInt {
- //MARK: Subtraction
-
- /// Subtract `word` from this integer in place, returning a flag indicating if the operation
- /// caused an arithmetic overflow. `word` is shifted `shift` words to the left before being subtracted.
- ///
- /// - Note: If the result indicates an overflow, then `self` becomes the two's complement of the absolute difference.
- /// - Complexity: O(count)
- internal mutating func subtractWordReportingOverflow(_ word: Word, shiftedBy shift: Int = 0) -> Bool {
- precondition(shift >= 0)
- var carry: Word = word
- var i = shift
- let count = self.count
- while carry > 0 && i < count {
- let (d, c) = self[i].subtractingReportingOverflow(carry)
- self[i] = d
- carry = (c ? 1 : 0)
- i += 1
- }
- return carry > 0
- }
-
- /// Subtract `word` from this integer, returning the difference and a flag that is true if the operation
- /// caused an arithmetic overflow. `word` is shifted `shift` words to the left before being subtracted.
- ///
- /// - Note: If `overflow` is true, then the returned value is the two's complement of the absolute difference.
- /// - Complexity: O(count)
- internal func subtractingWordReportingOverflow(_ word: Word, shiftedBy shift: Int = 0) -> (partialValue: BigUInt, overflow: Bool) {
- var result = self
- let overflow = result.subtractWordReportingOverflow(word, shiftedBy: shift)
- return (result, overflow)
- }
-
- /// Subtract a digit `d` from this integer in place.
- /// `d` is shifted `shift` digits to the left before being subtracted.
- ///
- /// - Requires: self >= d * 2^shift
- /// - Complexity: O(count)
- internal mutating func subtractWord(_ word: Word, shiftedBy shift: Int = 0) {
- let overflow = subtractWordReportingOverflow(word, shiftedBy: shift)
- precondition(!overflow)
- }
-
- /// Subtract a digit `d` from this integer and return the result.
- /// `d` is shifted `shift` digits to the left before being subtracted.
- ///
- /// - Requires: self >= d * 2^shift
- /// - Complexity: O(count)
- internal func subtractingWord(_ word: Word, shiftedBy shift: Int = 0) -> BigUInt {
- var result = self
- result.subtractWord(word, shiftedBy: shift)
- return result
- }
-
- /// Subtract `other` from this integer in place, and return a flag indicating if the operation caused an
- /// arithmetic overflow. `other` is shifted `shift` digits to the left before being subtracted.
- ///
- /// - Note: If the result indicates an overflow, then `self` becomes the twos' complement of the absolute difference.
- /// - Complexity: O(count)
- public mutating func subtractReportingOverflow(_ b: BigUInt, shiftedBy shift: Int = 0) -> Bool {
- precondition(shift >= 0)
- var carry = false
- var bi = 0
- let bc = b.count
- let count = self.count
- while bi < bc || (shift + bi < count && carry) {
- let ai = shift + bi
- let (d, c) = self[ai].subtractingReportingOverflow(b[bi])
- if carry {
- let (d2, c2) = d.subtractingReportingOverflow(1)
- self[ai] = d2
- carry = c || c2
- }
- else {
- self[ai] = d
- carry = c
- }
- bi += 1
- }
- return carry
- }
-
- /// Subtract `other` from this integer, returning the difference and a flag indicating arithmetic overflow.
- /// `other` is shifted `shift` digits to the left before being subtracted.
- ///
- /// - Note: If `overflow` is true, then the result value is the twos' complement of the absolute value of the difference.
- /// - Complexity: O(count)
- public func subtractingReportingOverflow(_ other: BigUInt, shiftedBy shift: Int) -> (partialValue: BigUInt, overflow: Bool) {
- var result = self
- let overflow = result.subtractReportingOverflow(other, shiftedBy: shift)
- return (result, overflow)
- }
-
- /// Subtracts `other` from `self`, returning the result and a flag indicating arithmetic overflow.
- ///
- /// - Note: When the operation overflows, then `partialValue` is the twos' complement of the absolute value of the difference.
- /// - Complexity: O(count)
- public func subtractingReportingOverflow(_ other: BigUInt) -> (partialValue: BigUInt, overflow: Bool) {
- return self.subtractingReportingOverflow(other, shiftedBy: 0)
- }
-
- /// Subtract `other` from this integer in place.
- /// `other` is shifted `shift` digits to the left before being subtracted.
- ///
- /// - Requires: self >= other * 2^shift
- /// - Complexity: O(count)
- public mutating func subtract(_ other: BigUInt, shiftedBy shift: Int = 0) {
- let overflow = subtractReportingOverflow(other, shiftedBy: shift)
- precondition(!overflow)
- }
-
- /// Subtract `b` from this integer, and return the difference.
- /// `b` is shifted `shift` digits to the left before being subtracted.
- ///
- /// - Requires: self >= b * 2^shift
- /// - Complexity: O(count)
- public func subtracting(_ other: BigUInt, shiftedBy shift: Int = 0) -> BigUInt {
- var result = self
- result.subtract(other, shiftedBy: shift)
- return result
- }
-
- /// Decrement this integer by one.
- ///
- /// - Requires: !isZero
- /// - Complexity: O(count)
- public mutating func decrement(shiftedBy shift: Int = 0) {
- self.subtract(1, shiftedBy: shift)
- }
-
- /// Subtract `b` from `a` and return the result.
- ///
- /// - Requires: a >= b
- /// - Complexity: O(a.count)
- public static func -(a: BigUInt, b: BigUInt) -> BigUInt {
- return a.subtracting(b)
- }
-
- /// Subtract `b` from `a` and store the result in `a`.
- ///
- /// - Requires: a >= b
- /// - Complexity: O(a.count)
- public static func -=(a: inout BigUInt, b: BigUInt) {
- a.subtract(b)
- }
-}
-
-extension BigInt {
- public mutating func negate() {
- guard !magnitude.isZero else { return }
- self.sign = self.sign == .plus ? .minus : .plus
- }
-
- /// Subtract `b` from `a` and return the result.
- public static func -(a: BigInt, b: BigInt) -> BigInt {
- return a + -b
- }
-
- /// Subtract `b` from `a` in place.
- public static func -=(a: inout BigInt, b: BigInt) { a = a - b }
-}
diff --git a/Carthage/Checkouts/BigInt/Sources/Words and Bits.swift b/Carthage/Checkouts/BigInt/Sources/Words and Bits.swift
deleted file mode 100644
index 4543c1bc8..000000000
--- a/Carthage/Checkouts/BigInt/Sources/Words and Bits.swift
+++ /dev/null
@@ -1,202 +0,0 @@
-//
-// Words and Bits.swift
-// BigInt
-//
-// Created by Károly Lőrentey on 2017-08-11.
-// Copyright © 2016-2017 Károly Lőrentey.
-//
-
-extension Array where Element == UInt {
- mutating func twosComplement() {
- var increment = true
- for i in 0 ..< self.count {
- if increment {
- (self[i], increment) = (~self[i]).addingReportingOverflow(1)
- }
- else {
- self[i] = ~self[i]
- }
- }
- }
-}
-
-extension BigUInt {
- public subscript(bitAt index: Int) -> Bool {
- get {
- precondition(index >= 0)
- let (i, j) = index.quotientAndRemainder(dividingBy: Word.bitWidth)
- return self[i] & (1 << j) != 0
- }
- set {
- precondition(index >= 0)
- let (i, j) = index.quotientAndRemainder(dividingBy: Word.bitWidth)
- if newValue {
- self[i] |= 1 << j
- }
- else {
- self[i] &= ~(1 << j)
- }
- }
- }
-}
-
-extension BigUInt {
- /// The minimum number of bits required to represent this integer in binary.
- ///
- /// - Returns: floor(log2(2 * self + 1))
- /// - Complexity: O(1)
- public var bitWidth: Int {
- guard count > 0 else { return 0 }
- return count * Word.bitWidth - self[count - 1].leadingZeroBitCount
- }
-
- /// The number of leading zero bits in the binary representation of this integer in base `2^(Word.bitWidth)`.
- /// This is useful when you need to normalize a `BigUInt` such that the top bit of its most significant word is 1.
- ///
- /// - Note: 0 is considered to have zero leading zero bits.
- /// - Returns: A value in `0...(Word.bitWidth - 1)`.
- /// - SeeAlso: width
- /// - Complexity: O(1)
- public var leadingZeroBitCount: Int {
- guard count > 0 else { return 0 }
- return self[count - 1].leadingZeroBitCount
- }
-
- /// The number of trailing zero bits in the binary representation of this integer.
- ///
- /// - Note: 0 is considered to have zero trailing zero bits.
- /// - Returns: A value in `0...width`.
- /// - Complexity: O(count)
- public var trailingZeroBitCount: Int {
- guard count > 0 else { return 0 }
- let i = self.words.firstIndex { $0 != 0 }!
- return i * Word.bitWidth + self[i].trailingZeroBitCount
- }
-}
-
-extension BigInt {
- public var bitWidth: Int {
- guard !magnitude.isZero else { return 0 }
- return magnitude.bitWidth + 1
- }
-
- public var trailingZeroBitCount: Int {
- // Amazingly, this works fine for negative numbers
- return magnitude.trailingZeroBitCount
- }
-}
-
-extension BigUInt {
- public struct Words: RandomAccessCollection {
- private let value: BigUInt
-
- fileprivate init(_ value: BigUInt) { self.value = value }
-
- public var startIndex: Int { return 0 }
- public var endIndex: Int { return value.count }
-
- public subscript(_ index: Int) -> Word {
- return value[index]
- }
- }
-
- public var words: Words { return Words(self) }
-
- public init(words: Words) where Words.Element == Word {
- let uc = words.underestimatedCount
- if uc > 2 {
- self.init(words: Array(words))
- }
- else {
- var it = words.makeIterator()
- guard let w0 = it.next() else {
- self.init()
- return
- }
- guard let w1 = it.next() else {
- self.init(word: w0)
- return
- }
- if let w2 = it.next() {
- var words: [UInt] = []
- words.reserveCapacity(Swift.max(3, uc))
- words.append(w0)
- words.append(w1)
- words.append(w2)
- while let word = it.next() {
- words.append(word)
- }
- self.init(words: words)
- }
- else {
- self.init(low: w0, high: w1)
- }
- }
- }
-}
-
-extension BigInt {
- public struct Words: RandomAccessCollection {
- public typealias Indices = CountableRange
-
- private let value: BigInt
- private let decrementLimit: Int
-
- fileprivate init(_ value: BigInt) {
- self.value = value
- switch value.sign {
- case .plus:
- self.decrementLimit = 0
- case .minus:
- assert(!value.magnitude.isZero)
- self.decrementLimit = value.magnitude.words.firstIndex(where: { $0 != 0 })!
- }
- }
-
- public var count: Int {
- switch value.sign {
- case .plus:
- if let high = value.magnitude.words.last, high >> (Word.bitWidth - 1) != 0 {
- return value.magnitude.count + 1
- }
- return value.magnitude.count
- case .minus:
- let high = value.magnitude.words.last!
- if high >> (Word.bitWidth - 1) != 0 {
- return value.magnitude.count + 1
- }
- return value.magnitude.count
- }
- }
-
- public var indices: Indices { return 0 ..< count }
- public var startIndex: Int { return 0 }
- public var endIndex: Int { return count }
-
- public subscript(_ index: Int) -> UInt {
- // Note that indices above `endIndex` are accepted.
- if value.sign == .plus {
- return value.magnitude[index]
- }
- if index <= decrementLimit {
- return ~(value.magnitude[index] &- 1)
- }
- return ~value.magnitude[index]
- }
- }
-
- public var words: Words {
- return Words(self)
- }
-
- public init(words: S) where S.Element == Word {
- var words = Array(words)
- if (words.last ?? 0) >> (Word.bitWidth - 1) == 0 {
- self.init(sign: .plus, magnitude: BigUInt(words: words))
- }
- else {
- words.twosComplement()
- self.init(sign: .minus, magnitude: BigUInt(words: words))
- }
- }
-}
diff --git a/Carthage/Checkouts/BigInt/Tests/BigIntTests/BigIntTests.swift b/Carthage/Checkouts/BigInt/Tests/BigIntTests/BigIntTests.swift
deleted file mode 100644
index 51e46e3aa..000000000
--- a/Carthage/Checkouts/BigInt/Tests/BigIntTests/BigIntTests.swift
+++ /dev/null
@@ -1,638 +0,0 @@
-//
-// BigIntTests.swift
-// BigIntTests
-//
-// Created by Károly Lőrentey on 2015-12-26.
-// Copyright © 2016-2017 Károly Lőrentey.
-//
-
-import XCTest
-@testable import BigInt
-
-class BigIntTests: XCTestCase {
- typealias Word = BigInt.Word
-
- func testSigns() {
- XCTAssertTrue(BigInt.isSigned)
-
- XCTAssertEqual(BigInt().signum(), 0)
- XCTAssertEqual(BigInt(-2).signum(), -1)
- XCTAssertEqual(BigInt(-1).signum(), -1)
- XCTAssertEqual(BigInt(0).signum(), 0)
- XCTAssertEqual(BigInt(1).signum(), 1)
- XCTAssertEqual(BigInt(2).signum(), 1)
-
- XCTAssertEqual(BigInt(words: [0, Word.max]).signum(), -1)
- XCTAssertEqual(BigInt(words: [0, 1]).signum(), 1)
- }
-
- func testInit() {
- XCTAssertEqual(BigInt().sign, .plus)
- XCTAssertEqual(BigInt().magnitude, 0)
-
- XCTAssertEqual(BigInt(Int64.min).sign, .minus)
- XCTAssertEqual(BigInt(Int64.min).magnitude - 1, BigInt(Int64.max).magnitude)
-
- let zero = BigInt(0)
- XCTAssertTrue(zero.magnitude.isZero)
- XCTAssertEqual(zero.sign, .plus)
-
- let minusOne = BigInt(-1)
- XCTAssertEqual(minusOne.magnitude, 1)
- XCTAssertEqual(minusOne.sign, .minus)
-
- let b: BigInt = 42
- XCTAssertEqual(b.magnitude, 42)
- XCTAssertEqual(b.sign, .plus)
-
- XCTAssertEqual(BigInt(UInt64.max).magnitude, BigUInt(UInt64.max))
-
- let b2: BigInt = "+300"
- XCTAssertEqual(b2.magnitude, 300)
- XCTAssertEqual(b2.sign, .plus)
-
- let b3: BigInt = "-300"
- XCTAssertEqual(b3.magnitude, 300)
- XCTAssertEqual(b3.sign, .minus)
-
- // We have to call BigInt.init here because we don't want Literal initialization via coercion (SE-0213)
- XCTAssertNil(BigInt.init("Not a number"))
- XCTAssertEqual(BigInt(unicodeScalarLiteral: UnicodeScalar(52)), BigInt(4))
- XCTAssertEqual(BigInt(extendedGraphemeClusterLiteral: "4"), BigInt(4))
-
- XCTAssertEqual(BigInt(words: []), 0)
- XCTAssertEqual(BigInt(words: [1, 1]), BigInt(1) << Word.bitWidth + 1)
- XCTAssertEqual(BigInt(words: [1, 2]), BigInt(2) << Word.bitWidth + 1)
- XCTAssertEqual(BigInt(words: [0, Word.max]), -(BigInt(1) << Word.bitWidth))
- XCTAssertEqual(BigInt(words: [1, Word.max]), -BigInt(Word.max))
- XCTAssertEqual(BigInt(words: [1, Word.max, Word.max]), -BigInt(Word.max))
-
- XCTAssertEqual(BigInt(exactly: 1), BigInt(1))
- XCTAssertEqual(BigInt(exactly: -1), BigInt(-1))
- }
-
- func testInit_FloatingPoint() {
- XCTAssertEqual(BigInt(42.0), 42)
- XCTAssertEqual(BigInt(-42.0), -42)
- XCTAssertEqual(BigInt(42.5), 42)
- XCTAssertEqual(BigInt(-42.5), -42)
- XCTAssertEqual(BigInt(exactly: 42.0), 42)
- XCTAssertEqual(BigInt(exactly: -42.0), -42)
- XCTAssertNil(BigInt(exactly: 42.5))
- XCTAssertNil(BigInt(exactly: -42.5))
- XCTAssertNil(BigInt(exactly: Double.leastNormalMagnitude))
- XCTAssertNil(BigInt(exactly: Double.leastNonzeroMagnitude))
- XCTAssertNil(BigInt(exactly: Double.infinity))
- XCTAssertNil(BigInt(exactly: Double.nan))
- XCTAssertNil(BigInt(exactly: Double.signalingNaN))
- XCTAssertEqual(BigInt(clamping: -42), -42)
- XCTAssertEqual(BigInt(clamping: 42), 42)
- XCTAssertEqual(BigInt(truncatingIfNeeded: -42), -42)
- XCTAssertEqual(BigInt(truncatingIfNeeded: 42), 42)
- }
-
- func testInit_Buffer() {
- func test(_ b: BigInt, _ d: Array, file: StaticString = #file, line: UInt = #line) {
- d.withUnsafeBytes { buffer in
- let initialized = BigInt(buffer)
- XCTAssertEqual(initialized, b, file: file, line: line)
- }
- }
-
- // Positive integers
- test(BigInt(), [])
- test(BigInt(1), [0x00, 0x01])
- test(BigInt(2), [0x00, 0x02])
- test(BigInt(0x0102030405060708), [0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08])
- test(BigInt(0x01) << 64 + BigInt(0x0203040506070809), [0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09])
-
- // Negative integers
- test(BigInt(), [])
- test(BigInt(-1), [0x01, 0x01])
- test(BigInt(-2), [0x01, 0x02])
- test(BigInt(0x0102030405060708) * BigInt(-1), [0x01, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08])
- test((BigInt(0x01) << 64 + BigInt(0x0203040506070809)) * BigInt(-1), [0x01, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09])
- }
-
- func testConversionToFloatingPoint() {
- func test(_ a: BigInt, _ b: F, file: StaticString = #file, line: UInt = #line)
- where F.RawExponent: FixedWidthInteger, F.RawSignificand: FixedWidthInteger {
- let f = F(a)
- XCTAssertEqual(f, b, file: file, line: line)
- }
-
- for i in -100 ..< 100 {
- test(BigInt(i), Double(i))
- }
- test(BigInt(0x5A5A5A), 0x5A5A5A as Double)
- test(BigInt(1) << 64, 0x1p64 as Double)
- test(BigInt(0x5A5A5A) << 64, 0x5A5A5Ap64 as Double)
- test(BigInt(1) << 1023, 0x1p1023 as Double)
- test(BigInt(10) << 1020, 0xAp1020 as Double)
- test(BigInt(1) << 1024, Double.infinity)
- test(BigInt(words: convertWords([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xFFFFFFFFFFFFF800, 0])),
- Double.greatestFiniteMagnitude)
-
- for i in -100 ..< 100 {
- test(BigInt(i), Float(i))
- }
- test(BigInt(0x5A5A5A), 0x5A5A5A as Float)
- test(BigInt(1) << 64, 0x1p64 as Float)
- test(BigInt(0x5A5A5A) << 64, 0x5A5A5Ap64 as Float)
- test(BigInt(1) << 1023, 0x1p1023 as Float)
- test(BigInt(10) << 1020, 0xAp1020 as Float)
- test(BigInt(1) << 1024, Float.infinity)
- test(BigInt(words: convertWords([0, 0xFFFFFF0000000000, 0])),
- Float.greatestFiniteMagnitude)
- }
-
- func testTwosComplement() {
- func check(_ a: [Word], _ b: [Word], file: StaticString = #file, line: UInt = #line) {
- var a2 = a
- a2.twosComplement()
- XCTAssertEqual(a2, b, file: file, line: line)
- var b2 = b
- b2.twosComplement()
- XCTAssertEqual(b2, a, file: file, line: line)
- }
- check([1], [Word.max])
- check([Word.max], [1])
- check([1, 1], [Word.max, Word.max - 1])
- check([(1 as Word) << (Word.bitWidth - 1)], [(1 as Word) << (Word.bitWidth - 1)])
- check([0], [0])
- check([0, 0, 1], [0, 0, Word.max])
- check([0, 0, 1, 0, 1], [0, 0, Word.max, Word.max, Word.max - 1])
- check([0, 0, 1, 1], [0, 0, Word.max, Word.max - 1])
- check([0, 0, 1, 0, 0, 0], [0, 0, Word.max, Word.max, Word.max, Word.max])
- }
-
- func testSign() {
- XCTAssertEqual(BigInt(-1).sign, .minus)
- XCTAssertEqual(BigInt(0).sign, .plus)
- XCTAssertEqual(BigInt(1).sign, .plus)
- }
-
- func testBitWidth() {
- XCTAssertEqual(BigInt(0).bitWidth, 0)
- XCTAssertEqual(BigInt(1).bitWidth, 2)
- XCTAssertEqual(BigInt(-1).bitWidth, 2)
- XCTAssertEqual((BigInt(1) << 64).bitWidth, Word.bitWidth + 2)
- XCTAssertEqual(BigInt(Word.max).bitWidth, Word.bitWidth + 1)
- XCTAssertEqual(BigInt(Word.max >> 1).bitWidth, Word.bitWidth)
- }
-
- func testTrailingZeroBitCount() {
- XCTAssertEqual(BigInt(0).trailingZeroBitCount, 0)
- XCTAssertEqual(BigInt(1).trailingZeroBitCount, 0)
- XCTAssertEqual(BigInt(-1).trailingZeroBitCount, 0)
- XCTAssertEqual(BigInt(2).trailingZeroBitCount, 1)
- XCTAssertEqual(BigInt(Word.max).trailingZeroBitCount, 0)
- XCTAssertEqual(BigInt(-2).trailingZeroBitCount, 1)
- XCTAssertEqual(-BigInt(Word.max).trailingZeroBitCount, 0)
- XCTAssertEqual((BigInt(1) << 100).trailingZeroBitCount, 100)
- XCTAssertEqual(((-BigInt(1)) << 100).trailingZeroBitCount, 100)
- }
-
- func testWords() {
- XCTAssertEqual(Array(BigInt(0).words), [])
- XCTAssertEqual(Array(BigInt(1).words), [1])
- XCTAssertEqual(Array(BigInt(-1).words), [Word.max])
-
- let highBit = (1 as Word) << (Word.bitWidth - 1)
- XCTAssertEqual(Array(BigInt(highBit).words), [highBit, 0])
- XCTAssertEqual(Array((-BigInt(highBit)).words), [highBit, Word.max])
-
- XCTAssertEqual(Array(BigInt(sign: .plus, magnitude: BigUInt(words: [Word.max])).words), [Word.max, 0])
- XCTAssertEqual(Array(BigInt(sign: .minus, magnitude: BigUInt(words: [Word.max])).words), [1, Word.max])
-
- XCTAssertEqual(Array((BigInt(1) << Word.bitWidth).words), [0, 1])
- XCTAssertEqual(Array((-(BigInt(1) << Word.bitWidth)).words), [0, Word.max])
-
- XCTAssertEqual(Array((BigInt(42) << Word.bitWidth).words), [0, 42])
- XCTAssertEqual(Array((-(BigInt(42) << Word.bitWidth)).words), [0, Word.max - 41])
-
- let huge = BigUInt(words: [0, 1, 2, 3, 4])
- XCTAssertEqual(Array(BigInt(sign: .plus, magnitude: huge).words), [0, 1, 2, 3, 4])
- XCTAssertEqual(Array(BigInt(sign: .minus, magnitude: huge).words),
- [0, Word.max, ~2, ~3, ~4] as [Word])
-
-
- XCTAssertEqual(BigInt(1).words[100], 0)
- XCTAssertEqual(BigInt(-1).words[100], Word.max)
-
- XCTAssertEqual(BigInt(words: [0, 1, 2, 3, 4]).words.indices, 0 ..< 5)
- }
-
- func testComplement() {
- XCTAssertEqual(~BigInt(-3), BigInt(2))
- XCTAssertEqual(~BigInt(-2), BigInt(1))
- XCTAssertEqual(~BigInt(-1), BigInt(0))
- XCTAssertEqual(~BigInt(0), BigInt(-1))
- XCTAssertEqual(~BigInt(1), BigInt(-2))
- XCTAssertEqual(~BigInt(2), BigInt(-3))
-
- XCTAssertEqual(~BigInt(words: [1, 2, 3, 4]),
- BigInt(words: [Word.max - 1, Word.max - 2, Word.max - 3, Word.max - 4]))
- XCTAssertEqual(~BigInt(words: [Word.max - 1, Word.max - 2, Word.max - 3, Word.max - 4]),
- BigInt(words: [1, 2, 3, 4]))
- }
-
- func testBinaryAnd() {
- XCTAssertEqual(BigInt(1) & BigInt(2), 0)
- XCTAssertEqual(BigInt(-1) & BigInt(2), 2)
- XCTAssertEqual(BigInt(-1) & BigInt(words: [1, 2, 3, 4]), BigInt(words: [1, 2, 3, 4]))
- XCTAssertEqual(BigInt(-1) & -BigInt(words: [1, 2, 3, 4]), -BigInt(words: [1, 2, 3, 4]))
- XCTAssertEqual(BigInt(Word.max) & BigInt(words: [1, 2, 3, 4]), BigInt(1))
- XCTAssertEqual(BigInt(Word.max) & BigInt(words: [Word.max, 1, 2]), BigInt(Word.max))
- XCTAssertEqual(BigInt(Word.max) & BigInt(words: [Word.max, Word.max - 1]), BigInt(Word.max))
- }
-
- func testBinaryOr() {
- XCTAssertEqual(BigInt(1) | BigInt(2), 3)
- XCTAssertEqual(BigInt(-1) | BigInt(2), -1)
- XCTAssertEqual(BigInt(-1) | BigInt(words: [1, 2, 3, 4]), -1)
- XCTAssertEqual(BigInt(-1) | -BigInt(words: [1, 2, 3, 4]), -1)
- XCTAssertEqual(BigInt(Word.max) | BigInt(words: [1, 2, 3, 4]),
- BigInt(words: [Word.max, 2, 3, 4]))
- XCTAssertEqual(BigInt(Word.max) | BigInt(words: [1, 2, 3, Word.max]),
- BigInt(words: [Word.max, 2, 3, Word.max]))
- XCTAssertEqual(BigInt(Word.max) | BigInt(words: [Word.max - 1, Word.max - 1]),
- BigInt(words: [Word.max, Word.max - 1]))
- }
-
- func testBinaryXor() {
- XCTAssertEqual(BigInt(1) ^ BigInt(2), 3)
- XCTAssertEqual(BigInt(-1) ^ BigInt(2), -3)
- XCTAssertEqual(BigInt(1) ^ BigInt(-2), -1)
- XCTAssertEqual(BigInt(-1) ^ BigInt(-2), 1)
- XCTAssertEqual(BigInt(-1) ^ BigInt(words: [1, 2, 3, 4]),
- BigInt(words: [~1, ~2, ~3, ~4] as [Word]))
- XCTAssertEqual(BigInt(-1) ^ -BigInt(words: [1, 2, 3, 4]),
- BigInt(words: [0, 2, 3, 4]))
- XCTAssertEqual(BigInt(Word.max) ^ BigInt(words: [1, 2, 3, 4]),
- BigInt(words: [~1, 2, 3, 4] as [Word]))
- XCTAssertEqual(BigInt(Word.max) ^ BigInt(words: [1, 2, 3, Word.max]),
- BigInt(words: [~1, 2, 3, Word.max] as [Word]))
- XCTAssertEqual(BigInt(Word.max) ^ BigInt(words: [Word.max - 1, Word.max - 1]),
- BigInt(words: [1, Word.max - 1]))
- }
-
- func testConversionToString() {
- let b = BigInt(-256)
- XCTAssertEqual(b.description, "-256")
- XCTAssertEqual(String(b, radix: 16, uppercase: true), "-100")
- let pql = b.playgroundDescription as? String
- if pql == "-256 (9 bits)" {}
- else {
- XCTFail("Unexpected Playground Quick Look: \(pql ?? "nil")")
- }
- }
-
- func testComparable() {
- XCTAssertTrue(BigInt(1) == BigInt(1))
- XCTAssertFalse(BigInt(1) == BigInt(-1))
-
- XCTAssertTrue(BigInt(1) < BigInt(42))
- XCTAssertFalse(BigInt(1) < -BigInt(42))
- XCTAssertTrue(BigInt(-1) < BigInt(42))
- XCTAssertTrue(BigInt(-42) < BigInt(-1))
- }
-
- func testHashable() {
- XCTAssertEqual(BigInt(1).hashValue, BigInt(1).hashValue)
- XCTAssertNotEqual(BigInt(1).hashValue, BigInt(2).hashValue)
- XCTAssertNotEqual(BigInt(42).hashValue, BigInt(-42).hashValue)
- XCTAssertNotEqual(BigInt(1).hashValue, BigInt(-1).hashValue)
- }
-
- func testStrideable() {
- XCTAssertEqual(BigInt(1).advanced(by: 100), 101)
- XCTAssertEqual(BigInt(Word.max).advanced(by: 1 as BigInt.Stride), BigInt(1) << Word.bitWidth)
-
- XCTAssertEqual(BigInt(Word.max).distance(to: BigInt(words: [0, 1])), BigInt(1))
- XCTAssertEqual(BigInt(words: [0, 1]).distance(to: BigInt(Word.max)), BigInt(-1))
- XCTAssertEqual(BigInt(0).distance(to: BigInt(words: [0, 1])), BigInt(words: [0, 1]))
- }
-
- func compare(_ a: Int, _ b: Int, r: Int, file: StaticString = #file, line: UInt = #line, op: (BigInt, BigInt) -> BigInt) {
- XCTAssertEqual(op(BigInt(a), BigInt(b)), BigInt(r), file: file, line: line)
- }
-
- func testAddition() {
- compare(0, 0, r: 0, op: +)
- compare(1, 2, r: 3, op: +)
- compare(1, -2, r: -1, op: +)
- compare(-1, 2, r: 1, op: +)
- compare(-1, -2, r: -3, op: +)
- compare(2, -1, r: 1, op: +)
- }
-
- func testNegation() {
- XCTAssertEqual(-BigInt(0), BigInt(0))
- XCTAssertEqual(-BigInt(1), BigInt(-1))
- XCTAssertEqual(-BigInt(-1), BigInt(1))
- }
-
- func testSubtraction() {
- compare(0, 0, r: 0, op: -)
- compare(2, 1, r: 1, op: -)
- compare(2, -1, r: 3, op: -)
- compare(-2, 1, r: -3, op: -)
- compare(-2, -1, r: -1, op: -)
- }
-
- func testMultiplication() {
- compare(0, 0, r: 0, op: *)
- compare(0, 1, r: 0, op: *)
- compare(1, 0, r: 0, op: *)
- compare(0, -1, r: 0, op: *)
- compare(-1, 0, r: 0, op: *)
- compare(2, 3, r: 6, op: *)
- compare(2, -3, r: -6, op: *)
- compare(-2, 3, r: -6, op: *)
- compare(-2, -3, r: 6, op: *)
- }
-
- func testQuotientAndRemainder() {
- func compare(_ a: BigInt, _ b: BigInt, r: (BigInt, BigInt), file: StaticString = #file, line: UInt = #line) {
- let actual = a.quotientAndRemainder(dividingBy: b)
- XCTAssertEqual(actual.quotient, r.0, "quotient", file: file, line: line)
- XCTAssertEqual(actual.remainder, r.1, "remainder", file: file, line: line)
- }
-
- compare(0, 1, r: (0, 0))
- compare(0, -1, r: (0, 0))
- compare(7, 4, r: (1, 3))
- compare(7, -4, r: (-1, 3))
- compare(-7, 4, r: (-1, -3))
- compare(-7, -4, r: (1, -3))
- }
-
- func testDivision() {
- compare(0, 1, r: 0, op: /)
- compare(0, -1, r: 0, op: /)
- compare(7, 4, r: 1, op: /)
- compare(7, -4, r: -1, op: /)
- compare(-7, 4, r: -1, op: /)
- compare(-7, -4, r: 1, op: /)
- }
-
- func testRemainder() {
- compare(0, 1, r: 0, op: %)
- compare(0, -1, r: 0, op: %)
- compare(7, 4, r: 3, op: %)
- compare(7, -4, r: 3, op: %)
- compare(-7, 4, r: -3, op: %)
- compare(-7, -4, r:-3, op: %)
- }
-
- func testModulo() {
- XCTAssertEqual(BigInt(22).modulus(5), 2)
- XCTAssertEqual(BigInt(-22).modulus(5), 3)
- XCTAssertEqual(BigInt(22).modulus(-5), 2)
- XCTAssertEqual(BigInt(-22).modulus(-5), 3)
- }
-
- func testStrideableRequirements() {
- XCTAssertEqual(5, BigInt(3).advanced(by: 2))
- XCTAssertEqual(2, BigInt(3).distance(to: 5))
- }
-
- func testAbsoluteValuableRequirements() {
- XCTAssertEqual(BigInt(5), abs(5 as BigInt))
- XCTAssertEqual(BigInt(0), abs(0 as BigInt))
- XCTAssertEqual(BigInt(5), abs(-5 as BigInt))
- }
-
- func testIntegerArithmeticRequirements() {
- XCTAssertEqual(3 as Int64, Int64(3 as BigInt))
- XCTAssertEqual(-3 as Int64, Int64(-3 as BigInt))
- }
-
- func testAssignmentOperators() {
- var a = BigInt(1)
- a += 13
- XCTAssertEqual(a, 14)
-
- a -= 7
- XCTAssertEqual(a, 7)
-
- a *= 3
- XCTAssertEqual(a, 21)
-
- a /= 2
- XCTAssertEqual(a, 10)
-
- a %= 7
- XCTAssertEqual(a, 3)
- }
-
- func testExponentiation() {
- XCTAssertEqual(BigInt(0).power(0), 1)
- XCTAssertEqual(BigInt(0).power(1), 0)
- XCTAssertEqual(BigInt(0).power(2), 0)
-
- XCTAssertEqual(BigInt(1).power(-2), 1)
- XCTAssertEqual(BigInt(1).power(-1), 1)
- XCTAssertEqual(BigInt(1).power(0), 1)
- XCTAssertEqual(BigInt(1).power(1), 1)
- XCTAssertEqual(BigInt(1).power(2), 1)
-
- XCTAssertEqual(BigInt(2).power(-4), 0)
- XCTAssertEqual(BigInt(2).power(-3), 0)
- XCTAssertEqual(BigInt(2).power(-2), 0)
- XCTAssertEqual(BigInt(2).power(-1), 0)
- XCTAssertEqual(BigInt(2).power(0), 1)
- XCTAssertEqual(BigInt(2).power(1), 2)
- XCTAssertEqual(BigInt(2).power(2), 4)
- XCTAssertEqual(BigInt(2).power(3), 8)
- XCTAssertEqual(BigInt(2).power(4), 16)
-
- XCTAssertEqual(BigInt(-1).power(-4), 1)
- XCTAssertEqual(BigInt(-1).power(-3), -1)
- XCTAssertEqual(BigInt(-1).power(-2), 1)
- XCTAssertEqual(BigInt(-1).power(-1), -1)
- XCTAssertEqual(BigInt(-1).power(0), 1)
- XCTAssertEqual(BigInt(-1).power(1), -1)
- XCTAssertEqual(BigInt(-1).power(2), 1)
- XCTAssertEqual(BigInt(-1).power(3), -1)
- XCTAssertEqual(BigInt(-1).power(4), 1)
-
- XCTAssertEqual(BigInt(-2).power(-4), 0)
- XCTAssertEqual(BigInt(-2).power(-3), 0)
- XCTAssertEqual(BigInt(-2).power(-2), 0)
- XCTAssertEqual(BigInt(-2).power(-1), 0)
- XCTAssertEqual(BigInt(-2).power(0), 1)
- XCTAssertEqual(BigInt(-2).power(1), -2)
- XCTAssertEqual(BigInt(-2).power(2), 4)
- XCTAssertEqual(BigInt(-2).power(3), -8)
- XCTAssertEqual(BigInt(-2).power(4), 16)
- }
-
- func testModularExponentiation() {
- for i in -5 ... 5 {
- for j in -5 ... 5 {
- for m in [-7, -5, -3, -2, -1, 1, 2, 3, 5, 7] {
- guard i != 0 || j >= 0 else { continue }
- XCTAssertEqual(BigInt(i).power(BigInt(j), modulus: BigInt(m)),
- BigInt(i).power(j).modulus(BigInt(m)),
- "\(i), \(j), \(m)")
- }
- }
- }
- }
-
- func testSquareRoot() {
- XCTAssertEqual(BigInt(0).squareRoot(), 0)
- XCTAssertEqual(BigInt(1).squareRoot(), 1)
- XCTAssertEqual(BigInt(2).squareRoot(), 1)
- XCTAssertEqual(BigInt(3).squareRoot(), 1)
- XCTAssertEqual(BigInt(4).squareRoot(), 2)
- XCTAssertEqual(BigInt(5).squareRoot(), 2)
- XCTAssertEqual(BigInt(9).squareRoot(), 3)
- }
-
- func testGCD() {
- XCTAssertEqual(BigInt(12).greatestCommonDivisor(with: 15), 3)
- XCTAssertEqual(BigInt(-12).greatestCommonDivisor(with: 15), 3)
- XCTAssertEqual(BigInt(12).greatestCommonDivisor(with: -15), 3)
- XCTAssertEqual(BigInt(-12).greatestCommonDivisor(with: -15), 3)
- }
-
- func testInverse() {
- for base in -100 ... 100 {
- for modulus in [2, 3, 4, 5] {
- let base = BigInt(base)
- let modulus = BigInt(modulus)
- if let inverse = base.inverse(modulus) {
- XCTAssertEqual((base * inverse).modulus(modulus), 1, "\(base), \(modulus), \(inverse)")
- }
- else {
- XCTAssertGreaterThan(BigInt(base).greatestCommonDivisor(with: modulus), 1, "\(base), \(modulus)")
- }
- }
- }
- }
-
- func testPrimes() {
- XCTAssertFalse(BigInt(-7).isPrime())
- XCTAssertTrue(BigInt(103).isPrime())
-
- XCTAssertFalse(BigInt(-3_215_031_751).isStrongProbablePrime(7))
- XCTAssertTrue(BigInt(3_215_031_751).isStrongProbablePrime(7))
- XCTAssertFalse(BigInt(3_215_031_751).isPrime())
- }
-
- func testShifts() {
- XCTAssertEqual(BigInt(1) << Word.bitWidth, BigInt(words: [0, 1]))
- XCTAssertEqual(BigInt(-1) << Word.bitWidth, BigInt(words: [0, Word.max]))
- XCTAssertEqual(BigInt(words: [0, 1]) << -Word.bitWidth, BigInt(1))
-
- XCTAssertEqual(BigInt(words: [0, 1]) >> Word.bitWidth, BigInt(1))
- XCTAssertEqual(BigInt(-1) >> Word.bitWidth, BigInt(-1))
- XCTAssertEqual(BigInt(1) >> Word.bitWidth, BigInt(0))
- XCTAssertEqual(BigInt(words: [0, Word.max]) >> Word.bitWidth, BigInt(-1))
- XCTAssertEqual(BigInt(1) >> -Word.bitWidth, BigInt(words: [0, 1]))
-
- XCTAssertEqual(BigInt(1) &<< BigInt(Word.bitWidth), BigInt(words: [0, 1]))
- XCTAssertEqual(BigInt(words: [0, 1]) &>> BigInt(Word.bitWidth), BigInt(1))
- }
-
- func testShiftAssignments() {
-
- var a: BigInt = 1
- a <<= Word.bitWidth
- XCTAssertEqual(a, BigInt(words: [0, 1]))
-
- a = -1
- a <<= Word.bitWidth
- XCTAssertEqual(a, BigInt(words: [0, Word.max]))
-
- a = BigInt(words: [0, 1])
- a <<= -Word.bitWidth
- XCTAssertEqual(a, 1)
-
- a = BigInt(words: [0, 1])
- a >>= Word.bitWidth
- XCTAssertEqual(a, 1)
-
- a = -1
- a >>= Word.bitWidth
- XCTAssertEqual(a, -1)
-
- a = 1
- a >>= Word.bitWidth
- XCTAssertEqual(a, 0)
-
- a = BigInt(words: [0, Word.max])
- a >>= Word.bitWidth
- XCTAssertEqual(a, BigInt(-1))
-
- a = 1
- a >>= -Word.bitWidth
- XCTAssertEqual(a, BigInt(words: [0, 1]))
-
- a = 1
- a &<<= BigInt(Word.bitWidth)
- XCTAssertEqual(a, BigInt(words: [0, 1]))
-
- a = BigInt(words: [0, 1])
- a &>>= BigInt(Word.bitWidth)
- XCTAssertEqual(a, BigInt(1))
-
- }
-
- func testCodable() {
- func test(_ a: BigInt, file: StaticString = #file, line: UInt = #line) {
- do {
- let json = try JSONEncoder().encode(a)
- print(String(data: json, encoding: .utf8)!)
- let b = try JSONDecoder().decode(BigInt.self, from: json)
- XCTAssertEqual(a, b, file: file, line: line)
- }
- catch let error {
- XCTFail("Error thrown: \(error.localizedDescription)", file: file, line: line)
- }
- }
- test(0)
- test(1)
- test(-1)
- test(0x0102030405060708)
- test(-0x0102030405060708)
- test(BigInt(1) << 64)
- test(-BigInt(1) << 64)
- test(BigInt(words: [1, 2, 3, 4, 5, 6, 7]))
- test(-BigInt(words: [1, 2, 3, 4, 5, 6, 7]))
-
- XCTAssertThrowsError(try JSONDecoder().decode(BigUInt.self, from: "[\"*\", 1]".data(using: .utf8)!)) { error in
- guard let error = error as? DecodingError else { XCTFail("Expected a decoding error"); return }
- guard case .dataCorrupted(let context) = error else { XCTFail("Expected a dataCorrupted error"); return }
- XCTAssertEqual(context.debugDescription, "Invalid big integer sign")
- }
- }
-
- func testConversionToData() {
- func test(_ b: BigInt, _ d: Array, file: StaticString = #file, line: UInt = #line) {
- let expected = Data(d)
- let actual = b.serialize()
- XCTAssertEqual(actual, expected, file: file, line: line)
- XCTAssertEqual(BigInt(actual), b, file: file, line: line)
- }
-
- // Positive integers
- test(BigInt(), [])
- test(BigInt(1), [0x00, 0x01])
- test(BigInt(2), [0x00, 0x02])
- test(BigInt(0x0102030405060708), [0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08])
- test(BigInt(0x01) << 64 + BigInt(0x0203040506070809), [0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 09])
-
- // Negative integers
- test(BigInt(), [])
- test(BigInt(-1), [0x01, 0x01])
- test(BigInt(-2), [0x01, 0x02])
- test(BigInt(0x0102030405060708) * BigInt(-1), [0x01, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08])
- test((BigInt(0x01) << 64 + BigInt(0x0203040506070809)) * BigInt(-1), [0x01, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 09])
-
- }
-
-}
diff --git a/Carthage/Checkouts/BigInt/Tests/BigIntTests/BigUIntTests.swift b/Carthage/Checkouts/BigInt/Tests/BigIntTests/BigUIntTests.swift
deleted file mode 100644
index d11e38075..000000000
--- a/Carthage/Checkouts/BigInt/Tests/BigIntTests/BigUIntTests.swift
+++ /dev/null
@@ -1,1481 +0,0 @@
-//
-// BigUIntTests.swift
-// BigInt
-//
-// Created by Károly Lőrentey on 2015-12-27.
-// Copyright © 2016-2017 Károly Lőrentey.
-//
-
-import XCTest
-import Foundation
-@testable import BigInt
-
-extension BigUInt.Kind: Equatable {
- public static func ==(left: BigUInt.Kind, right: BigUInt.Kind) -> Bool {
- switch (left, right) {
- case let (.inline(l0, l1), .inline(r0, r1)): return l0 == r0 && l1 == r1
- case let (.slice(from: ls, to: le), .slice(from: rs, to: re)): return ls == rs && le == re
- case (.array, .array): return true
- default: return false
- }
- }
-}
-
-class BigUIntTests: XCTestCase {
- typealias Word = BigUInt.Word
-
- func check(_ value: BigUInt, _ kind: BigUInt.Kind?, _ words: [Word], file: StaticString = #file, line: UInt = #line) {
- if let kind = kind {
- XCTAssertEqual(
- value.kind, kind,
- "Mismatching kind: \(value.kind) vs. \(kind)",
- file: file, line: line)
- }
- XCTAssertEqual(
- Array(value.words), words,
- "Mismatching words: \(value.words) vs. \(words)",
- file: file, line: line)
- XCTAssertEqual(
- value.isZero, words.isEmpty,
- "Mismatching isZero: \(value.isZero) vs. \(words.isEmpty)",
- file: file, line: line)
- XCTAssertEqual(
- value.count, words.count,
- "Mismatching count: \(value.count) vs. \(words.count)",
- file: file, line: line)
- for i in 0 ..< words.count {
- XCTAssertEqual(
- value[i], words[i],
- "Mismatching word at index \(i): \(value[i]) vs. \(words[i])",
- file: file, line: line)
- }
- for i in words.count ..< words.count + 10 {
- XCTAssertEqual(
- value[i], 0,
- "Expected 0 word at index \(i), got \(value[i])",
- file: file, line: line)
- }
- }
-
- func check(_ value: BigUInt?, _ kind: BigUInt.Kind?, _ words: [Word], file: StaticString = #file, line: UInt = #line) {
- guard let value = value else {
- XCTFail("Expected non-nil BigUInt", file: file, line: line)
- return
- }
- check(value, kind, words, file: file, line: line)
- }
-
- func testInit_WordBased() {
- check(BigUInt(), .inline(0, 0), [])
-
- check(BigUInt(word: 0), .inline(0, 0), [])
- check(BigUInt(word: 1), .inline(1, 0), [1])
- check(BigUInt(word: Word.max), .inline(Word.max, 0), [Word.max])
-
- check(BigUInt(low: 0, high: 0), .inline(0, 0), [])
- check(BigUInt(low: 0, high: 1), .inline(0, 1), [0, 1])
- check(BigUInt(low: 1, high: 0), .inline(1, 0), [1])
- check(BigUInt(low: 1, high: 2), .inline(1, 2), [1, 2])
-
- check(BigUInt(words: []), .array, [])
- check(BigUInt(words: [0, 0, 0, 0]), .array, [])
- check(BigUInt(words: [1]), .array, [1])
- check(BigUInt(words: [1, 2, 3, 0, 0]), .array, [1, 2, 3])
- check(BigUInt(words: [0, 1, 2, 3, 4]), .array, [0, 1, 2, 3, 4])
-
- check(BigUInt(words: [], from: 0, to: 0), .inline(0, 0), [])
- check(BigUInt(words: [1, 2, 3, 4], from: 0, to: 4), .array, [1, 2, 3, 4])
- check(BigUInt(words: [1, 2, 3, 4], from: 0, to: 3), .slice(from: 0, to: 3), [1, 2, 3])
- check(BigUInt(words: [1, 2, 3, 4], from: 1, to: 4), .slice(from: 1, to: 4), [2, 3, 4])
- check(BigUInt(words: [1, 2, 3, 4], from: 0, to: 2), .inline(1, 2), [1, 2])
- check(BigUInt(words: [1, 2, 3, 4], from: 0, to: 1), .inline(1, 0), [1])
- check(BigUInt(words: [1, 2, 3, 4], from: 1, to: 1), .inline(0, 0), [])
- check(BigUInt(words: [0, 0, 0, 1, 0, 0, 0, 2], from: 0, to: 4), .slice(from: 0, to: 4), [0, 0, 0, 1])
- check(BigUInt(words: [0, 0, 0, 1, 0, 0, 0, 2], from: 0, to: 3), .inline(0, 0), [])
- check(BigUInt(words: [0, 0, 0, 1, 0, 0, 0, 2], from: 2, to: 6), .inline(0, 1), [0, 1])
-
- check(BigUInt(words: [].lazy), .inline(0, 0), [])
- check(BigUInt(words: [1].lazy), .inline(1, 0), [1])
- check(BigUInt(words: [1, 2].lazy), .inline(1, 2), [1, 2])
- check(BigUInt(words: [1, 2, 3].lazy), .array, [1, 2, 3])
- check(BigUInt(words: [1, 2, 3, 0, 0, 0, 0].lazy), .array, [1, 2, 3])
-
- check(BigUInt(words: IteratorSequence([].makeIterator())), .inline(0, 0), [])
- check(BigUInt(words: IteratorSequence([1].makeIterator())), .inline(1, 0), [1])
- check(BigUInt(words: IteratorSequence([1, 2].makeIterator())), .inline(1, 2), [1, 2])
- check(BigUInt(words: IteratorSequence([1, 2, 3].makeIterator())), .array, [1, 2, 3])
- check(BigUInt(words: IteratorSequence([1, 2, 3, 0, 0, 0, 0].makeIterator())), .array, [1, 2, 3])
- }
-
- func testInit_BinaryInteger() {
- XCTAssertNil(BigUInt(exactly: -42))
- check(BigUInt(exactly: 0 as Int), .inline(0, 0), [])
- check(BigUInt(exactly: 42 as Int), .inline(42, 0), [42])
- check(BigUInt(exactly: 43 as UInt), .inline(43, 0), [43])
- check(BigUInt(exactly: 44 as UInt8), .inline(44, 0), [44])
- check(BigUInt(exactly: BigUInt(words: [])), .inline(0, 0), [])
- check(BigUInt(exactly: BigUInt(words: [1])), .inline(1, 0), [1])
- check(BigUInt(exactly: BigUInt(words: [1, 2])), .inline(1, 2), [1, 2])
- check(BigUInt(exactly: BigUInt(words: [1, 2, 3, 4])), .array, [1, 2, 3, 4])
- }
-
- func testInit_FloatingPoint() {
- check(BigUInt(exactly: -0.0 as Float), nil, [])
- check(BigUInt(exactly: -0.0 as Double), nil, [])
-
- XCTAssertNil(BigUInt(exactly: -42.0 as Float))
- XCTAssertNil(BigUInt(exactly: -42.0 as Double))
-
- XCTAssertNil(BigUInt(exactly: 42.5 as Float))
- XCTAssertNil(BigUInt(exactly: 42.5 as Double))
-
- check(BigUInt(exactly: 100 as Float), nil, [100])
- check(BigUInt(exactly: 100 as Double), nil, [100])
-
- check(BigUInt(exactly: Float.greatestFiniteMagnitude), nil,
- convertWords([0, 0xFFFFFF0000000000]))
-
- check(BigUInt(exactly: Double.greatestFiniteMagnitude), nil,
- convertWords([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xFFFFFFFFFFFFF800]))
-
- XCTAssertNil(BigUInt(exactly: Float.leastNormalMagnitude))
- XCTAssertNil(BigUInt(exactly: Double.leastNormalMagnitude))
-
- XCTAssertNil(BigUInt(exactly: Float.infinity))
- XCTAssertNil(BigUInt(exactly: Double.infinity))
-
- XCTAssertNil(BigUInt(exactly: Float.nan))
- XCTAssertNil(BigUInt(exactly: Double.nan))
-
- check(BigUInt(0 as Float), nil, [])
- check(BigUInt(Float.leastNonzeroMagnitude), nil, [])
- check(BigUInt(Float.leastNormalMagnitude), nil, [])
- check(BigUInt(0.5 as Float), nil, [])
- check(BigUInt(1.5 as Float), nil, [1])
- check(BigUInt(42 as Float), nil, [42])
- check(BigUInt(Double(sign: .plus, exponent: 2 * Word.bitWidth, significand: 1.0)),
- nil, [0, 0, 1])
- }
-
- func testInit_Buffer() {
- func test(_ b: BigUInt, _ d: Array, file: StaticString = #file, line: UInt = #line) {
- d.withUnsafeBytes { buffer in
- let initialized = BigUInt(buffer)
- XCTAssertEqual(initialized, b, file: file, line: line)
- }
- }
-
- // Positive integers
- test(BigUInt(), [])
- test(BigUInt(1), [0x01])
- test(BigUInt(2), [0x02])
- test(BigUInt(0x0102030405060708), [0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08])
- test(BigUInt(0x01) << 64 + BigUInt(0x0203040506070809), [0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 09])
- }
-
- func testConversionToFloatingPoint() {
- func test(_ a: BigUInt, _ b: F, file: StaticString = #file, line: UInt = #line)
- where F.RawExponent: FixedWidthInteger, F.RawSignificand: FixedWidthInteger {
- let f = F(a)
- XCTAssertEqual(f, b, file: file, line: line)
- }
-
- for i in 0 ..< 100 {
- test(BigUInt(i), Double(i))
- }
- test(BigUInt(0x5A5A5A), 0x5A5A5A as Double)
- test(BigUInt(1) << 64, 0x1p64 as Double)
- test(BigUInt(0x5A5A5A) << 64, 0x5A5A5Ap64 as Double)
- test(BigUInt(1) << 1023, 0x1p1023 as Double)
- test(BigUInt(10) << 1020, 0xAp1020 as Double)
- test(BigUInt(1) << 1024, Double.infinity)
- test(BigUInt(words: convertWords([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xFFFFFFFFFFFFF800])),
- Double.greatestFiniteMagnitude)
- test(BigUInt(UInt64.max), 0x1p64 as Double)
-
- for i in 0 ..< 100 {
- test(BigUInt(i), Float(i))
- }
- test(BigUInt(0x5A5A5A), 0x5A5A5A as Float)
- test(BigUInt(1) << 64, 0x1p64 as Float)
- test(BigUInt(0x5A5A5A) << 64, 0x5A5A5Ap64 as Float)
- test(BigUInt(1) << 1023, 0x1p1023 as Float)
- test(BigUInt(10) << 1020, 0xAp1020 as Float)
- test(BigUInt(1) << 1024, Float.infinity)
- test(BigUInt(words: convertWords([0, 0xFFFFFF0000000000])),
- Float.greatestFiniteMagnitude)
-
- // Test rounding
- test(BigUInt(0xFFFFFF0000000000 as UInt64), 0xFFFFFFp40 as Float)
- test(BigUInt(0xFFFFFF7FFFFFFFFF as UInt64), 0xFFFFFFp40 as Float)
- test(BigUInt(0xFFFFFF8000000000 as UInt64), 0x1p64 as Float)
- test(BigUInt(0xFFFFFFFFFFFFFFFF as UInt64), 0x1p64 as Float)
-
- test(BigUInt(0xFFFFFE0000000000 as UInt64), 0xFFFFFEp40 as Float)
- test(BigUInt(0xFFFFFE7FFFFFFFFF as UInt64), 0xFFFFFEp40 as Float)
- test(BigUInt(0xFFFFFE8000000000 as UInt64), 0xFFFFFEp40 as Float)
- test(BigUInt(0xFFFFFEFFFFFFFFFF as UInt64), 0xFFFFFEp40 as Float)
-
- test(BigUInt(0x8000010000000000 as UInt64), 0x800001p40 as Float)
- test(BigUInt(0x8000017FFFFFFFFF as UInt64), 0x800001p40 as Float)
- test(BigUInt(0x8000018000000000 as UInt64), 0x800002p40 as Float)
- test(BigUInt(0x800001FFFFFFFFFF as UInt64), 0x800002p40 as Float)
-
- test(BigUInt(0x8000020000000000 as UInt64), 0x800002p40 as Float)
- test(BigUInt(0x8000027FFFFFFFFF as UInt64), 0x800002p40 as Float)
- test(BigUInt(0x8000028000000000 as UInt64), 0x800002p40 as Float)
- test(BigUInt(0x800002FFFFFFFFFF as UInt64), 0x800002p40 as Float)
- }
-
- func testInit_Misc() {
- check(BigUInt(0), .inline(0, 0), [])
- check(BigUInt(42), .inline(42, 0), [42])
- check(BigUInt(BigUInt(words: [1, 2, 3])), .array, [1, 2, 3])
-
- check(BigUInt(truncatingIfNeeded: 0 as Int8), .inline(0, 0), [])
- check(BigUInt(truncatingIfNeeded: 1 as Int8), .inline(1, 0), [1])
- check(BigUInt(truncatingIfNeeded: -1 as Int8), .inline(Word.max, 0), [Word.max])
- check(BigUInt(truncatingIfNeeded: BigUInt(words: [1, 2, 3])), .array, [1, 2, 3])
-
- check(BigUInt(clamping: 0), .inline(0, 0), [])
- check(BigUInt(clamping: -100), .inline(0, 0), [])
- check(BigUInt(clamping: Word.max), .inline(Word.max, 0), [Word.max])
- }
-
- func testEnsureArray() {
- var a = BigUInt()
- a.ensureArray()
- check(a, .array, [])
-
- a = BigUInt(word: 1)
- a.ensureArray()
- check(a, .array, [1])
-
- a = BigUInt(low: 1, high: 2)
- a.ensureArray()
- check(a, .array, [1, 2])
-
- a = BigUInt(words: [1, 2, 3, 4])
- a.ensureArray()
- check(a, .array, [1, 2, 3, 4])
-
- a = BigUInt(words: [1, 2, 3, 4, 5, 6], from: 1, to: 5)
- a.ensureArray()
- check(a, .array, [2, 3, 4, 5])
- }
-
- func testCapacity() {
- XCTAssertEqual(BigUInt(low: 1, high: 2).capacity, 0)
- XCTAssertEqual(BigUInt(words: 1 ..< 10).extract(2 ..< 5).capacity, 0)
- var words: [Word] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
- words.reserveCapacity(100)
- XCTAssertGreaterThanOrEqual(BigUInt(words: words).capacity, 100)
- }
-
- func testReserveCapacity() {
- var a = BigUInt()
- a.reserveCapacity(100)
- check(a, .array, [])
- XCTAssertGreaterThanOrEqual(a.capacity, 100)
-
- a = BigUInt(word: 1)
- a.reserveCapacity(100)
- check(a, .array, [1])
- XCTAssertGreaterThanOrEqual(a.capacity, 100)
-
- a = BigUInt(low: 1, high: 2)
- a.reserveCapacity(100)
- check(a, .array, [1, 2])
- XCTAssertGreaterThanOrEqual(a.capacity, 100)
-
- a = BigUInt(words: [1, 2, 3, 4])
- a.reserveCapacity(100)
- check(a, .array, [1, 2, 3, 4])
- XCTAssertGreaterThanOrEqual(a.capacity, 100)
-
- a = BigUInt(words: [1, 2, 3, 4, 5, 6], from: 1, to: 5)
- a.reserveCapacity(100)
- check(a, .array, [2, 3, 4, 5])
- XCTAssertGreaterThanOrEqual(a.capacity, 100)
- }
-
- func testLoad() {
- var a: BigUInt = 0
- a.reserveCapacity(100)
-
- a.load(BigUInt(low: 1, high: 2))
- check(a, .array, [1, 2])
- XCTAssertGreaterThanOrEqual(a.capacity, 100)
-
- a.load(BigUInt(words: [1, 2, 3, 4, 5, 6]))
- check(a, .array, [1, 2, 3, 4, 5, 6])
- XCTAssertGreaterThanOrEqual(a.capacity, 100)
-
- a.clear()
- check(a, .array, [])
- XCTAssertGreaterThanOrEqual(a.capacity, 100)
- }
-
- func testInitFromLiterals() {
- check(0, .inline(0, 0), [])
- check(42, .inline(42, 0), [42])
- check("42", .inline(42, 0), [42])
-
- check("1512366075204170947332355369683137040",
- .inline(0xFEDCBA9876543210, 0x0123456789ABCDEF),
- [0xFEDCBA9876543210, 0x0123456789ABCDEF])
-
- // I have no idea how to exercise these in the wild
- check(BigUInt(unicodeScalarLiteral: UnicodeScalar(52)), .inline(4, 0), [4])
- check(BigUInt(extendedGraphemeClusterLiteral: "4"), .inline(4, 0), [4])
- }
-
- func testSubscriptingGetter() {
- let a = BigUInt(words: [1, 2])
- XCTAssertEqual(a[0], 1)
- XCTAssertEqual(a[1], 2)
- XCTAssertEqual(a[2], 0)
- XCTAssertEqual(a[3], 0)
- XCTAssertEqual(a[10000], 0)
-
- let b = BigUInt(low: 1, high: 2)
- XCTAssertEqual(b[0], 1)
- XCTAssertEqual(b[1], 2)
- XCTAssertEqual(b[2], 0)
- XCTAssertEqual(b[3], 0)
- XCTAssertEqual(b[10000], 0)
- }
-
- func testSubscriptingSetter() {
- var a = BigUInt()
-
- check(a, .inline(0, 0), [])
- a[10] = 0
- check(a, .inline(0, 0), [])
- a[0] = 42
- check(a, .inline(42, 0), [42])
- a[10] = 23
- check(a, .array, [42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23])
- a[0] = 0
- check(a, .array, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23])
- a[10] = 0
- check(a, .array, [])
-
- a = BigUInt(words: [0, 1, 2, 3, 4, 5, 6], from: 1, to: 5)
- a[2] = 42
- check(a, .array, [1, 2, 42, 4])
- }
-
- func testSlice() {
- let a = BigUInt(words: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
- check(a.extract(3 ..< 6), .slice(from: 3, to: 6), [3, 4, 5])
- check(a.extract(3 ..< 5), .inline(3, 4), [3, 4])
- check(a.extract(3 ..< 4), .inline(3, 0), [3])
- check(a.extract(3 ..< 3), .inline(0, 0), [])
- check(a.extract(0 ..< 100), .array, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
- check(a.extract(100 ..< 200), .inline(0, 0), [])
-
- let b = BigUInt(low: 1, high: 2)
- check(b.extract(0 ..< 2), .inline(1, 2), [1, 2])
- check(b.extract(0 ..< 1), .inline(1, 0), [1])
- check(b.extract(1 ..< 2), .inline(2, 0), [2])
- check(b.extract(1 ..< 1), .inline(0, 0), [])
- check(b.extract(0 ..< 100), .inline(1, 2), [1, 2])
- check(b.extract(100 ..< 200), .inline(0, 0), [])
-
- let c = BigUInt(words: [1, 0, 0, 0, 2, 0, 0, 0, 3, 4, 5, 0, 0, 6, 0, 0, 0, 7])
- check(c.extract(0 ..< 4), .inline(1, 0), [1])
- check(c.extract(1 ..< 5), .slice(from: 1, to: 5), [0, 0, 0, 2])
- check(c.extract(1 ..< 8), .slice(from: 1, to: 5), [0, 0, 0, 2])
- check(c.extract(6 ..< 12), .slice(from: 6, to: 11), [0, 0, 3, 4, 5])
- check(c.extract(4 ..< 7), .inline(2, 0), [2])
-
- let d = c.extract(3 ..< 14)
- // 0 1 2 3 4 5 6 7 8 9 10
- check(d, .slice(from: 3, to: 14), [0, 2, 0, 0, 0, 3, 4, 5, 0, 0, 6])
- check(d.extract(1 ..< 5), .inline(2, 0), [2])
- check(d.extract(0 ..< 3), .inline(0, 2), [0, 2])
- check(d.extract(1 ..< 6), .slice(from: 4, to: 9), [2, 0, 0, 0, 3])
- check(d.extract(7 ..< 1000), .slice(from: 10, to: 14), [5, 0, 0, 6])
- check(d.extract(10 ..< 1000), .inline(6, 0), [6])
- check(d.extract(11 ..< 1000), .inline(0, 0), [])
- }
-
- func testSigns() {
- XCTAssertFalse(BigUInt.isSigned)
-
- XCTAssertEqual(BigUInt().signum(), 0)
- XCTAssertEqual(BigUInt(words: []).signum(), 0)
- XCTAssertEqual(BigUInt(words: [0, 1, 2]).signum(), 1)
- XCTAssertEqual(BigUInt(word: 42).signum(), 1)
- }
-
- func testBits() {
- let indices: Set = [0, 13, 59, 64, 79, 130]
- var value: BigUInt = 0
- for i in indices {
- value[bitAt: i] = true
- }
- for i in 0 ..< 300 {
- XCTAssertEqual(value[bitAt: i], indices.contains(i))
- }
- check(value, nil, convertWords([0x0800000000002001, 0x8001, 0x04]))
- for i in indices {
- value[bitAt: i] = false
- }
- check(value, nil, [])
- }
-
- func testStrideableRequirements() {
- XCTAssertEqual(BigUInt(10), BigUInt(4).advanced(by: BigInt(6)))
- XCTAssertEqual(BigUInt(4), BigUInt(10).advanced(by: BigInt(-6)))
- XCTAssertEqual(BigInt(6), BigUInt(4).distance(to: 10))
- XCTAssertEqual(BigInt(-6), BigUInt(10).distance(to: 4))
- }
-
- func testRightShift_ByWord() {
- var a = BigUInt()
- a.shiftRight(byWords: 1)
- check(a, .inline(0, 0), [])
-
- a = BigUInt(low: 1, high: 2)
- a.shiftRight(byWords: 0)
- check(a, .inline(1, 2), [1, 2])
-
- a = BigUInt(low: 1, high: 2)
- a.shiftRight(byWords: 1)
- check(a, .inline(2, 0), [2])
-
- a = BigUInt(low: 1, high: 2)
- a.shiftRight(byWords: 2)
- check(a, .inline(0, 0), [])
-
- a = BigUInt(low: 1, high: 2)
- a.shiftRight(byWords: 10)
- check(a, .inline(0, 0), [])
-
-
- a = BigUInt(words: [0, 1, 2, 3, 4])
- a.shiftRight(byWords: 1)
- check(a, .array, [1, 2, 3, 4])
-
- a = BigUInt(words: [0, 1, 2, 3, 4])
- a.shiftRight(byWords: 2)
- check(a, .array, [2, 3, 4])
-
- a = BigUInt(words: [0, 1, 2, 3, 4])
- a.shiftRight(byWords: 5)
- check(a, .array, [])
-
- a = BigUInt(words: [0, 1, 2, 3, 4])
- a.shiftRight(byWords: 100)
- check(a, .array, [])
-
-
- a = BigUInt(words: [0, 1, 2, 3, 4, 5, 6], from: 1, to: 6)
- check(a, .slice(from: 1, to: 6), [1, 2, 3, 4, 5])
- a.shiftRight(byWords: 1)
- check(a, .slice(from: 2, to: 6), [2, 3, 4, 5])
-
- a = BigUInt(words: [0, 1, 2, 3, 4, 5, 6], from: 1, to: 6)
- a.shiftRight(byWords: 2)
- check(a, .slice(from: 3, to: 6), [3, 4, 5])
-
- a = BigUInt(words: [0, 1, 2, 3, 4, 5, 6], from: 1, to: 6)
- a.shiftRight(byWords: 3)
- check(a, .inline(4, 5), [4, 5])
-
- a = BigUInt(words: [0, 1, 2, 3, 4, 5, 6], from: 1, to: 6)
- a.shiftRight(byWords: 4)
- check(a, .inline(5, 0), [5])
-
- a = BigUInt(words: [0, 1, 2, 3, 4, 5, 6], from: 1, to: 6)
- a.shiftRight(byWords: 5)
- check(a, .inline(0, 0), [])
-
- a = BigUInt(words: [0, 1, 2, 3, 4, 5, 6], from: 1, to: 6)
- a.shiftRight(byWords: 10)
- check(a, .inline(0, 0), [])
- }
-
- func testLeftShift_ByWord() {
- var a = BigUInt()
- a.shiftLeft(byWords: 1)
- check(a, .inline(0, 0), [])
-
- a = BigUInt(word: 1)
- a.shiftLeft(byWords: 0)
- check(a, .inline(1, 0), [1])
-
- a = BigUInt(word: 1)
- a.shiftLeft(byWords: 1)
- check(a, .inline(0, 1), [0, 1])
-
- a = BigUInt(word: 1)
- a.shiftLeft(byWords: 2)
- check(a, .array, [0, 0, 1])
-
- a = BigUInt(low: 1, high: 2)
- a.shiftLeft(byWords: 1)
- check(a, .array, [0, 1, 2])
-
- a = BigUInt(low: 1, high: 2)
- a.shiftLeft(byWords: 2)
- check(a, .array, [0, 0, 1, 2])
-
- a = BigUInt(words: [1, 2, 3, 4, 5, 6])
- a.shiftLeft(byWords: 1)
- check(a, .array, [0, 1, 2, 3, 4, 5, 6])
-
- a = BigUInt(words: [1, 2, 3, 4, 5, 6])
- a.shiftLeft(byWords: 10)
- check(a, .array, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6])
-
- a = BigUInt(words: [0, 1, 2, 3, 4, 5, 6], from: 2, to: 6)
- a.shiftLeft(byWords: 1)
- check(a, .array, [0, 2, 3, 4, 5])
-
- a = BigUInt(words: [0, 1, 2, 3, 4, 5, 6], from: 2, to: 6)
- a.shiftLeft(byWords: 3)
- check(a, .array, [0, 0, 0, 2, 3, 4, 5])
- }
-
- func testSplit() {
- let a = BigUInt(words: [0, 1, 2, 3])
- XCTAssertEqual(a.split.low, BigUInt(words: [0, 1]))
- XCTAssertEqual(a.split.high, BigUInt(words: [2, 3]))
- }
-
- func testLowHigh() {
- let a = BigUInt(words: [0, 1, 2, 3])
- check(a.low, .inline(0, 1), [0, 1])
- check(a.high, .inline(2, 3), [2, 3])
- check(a.low.low, .inline(0, 0), [])
- check(a.low.high, .inline(1, 0), [1])
- check(a.high.low, .inline(2, 0), [2])
- check(a.high.high, .inline(3, 0), [3])
-
- let b = BigUInt(words: [0, 1, 2, 3, 4, 5])
-
- let bl = b.low
- check(bl, .slice(from: 0, to: 3), [0, 1, 2])
- let bh = b.high
- check(bh, .slice(from: 3, to: 6), [3, 4, 5])
-
- let bll = bl.low
- check(bll, .inline(0, 1), [0, 1])
- let blh = bl.high
- check(blh, .inline(2, 0), [2])
- let bhl = bh.low
- check(bhl, .inline(3, 4), [3, 4])
- let bhh = bh.high
- check(bhh, .inline(5, 0), [5])
-
- let blhl = bll.low
- check(blhl, .inline(0, 0), [])
- let blhh = bll.high
- check(blhh, .inline(1, 0), [1])
- let bhhl = bhl.low
- check(bhhl, .inline(3, 0), [3])
- let bhhh = bhl.high
- check(bhhh, .inline(4, 0), [4])
- }
-
- func testComparison() {
- XCTAssertEqual(BigUInt(words: [1, 2, 3]), BigUInt(words: [1, 2, 3]))
- XCTAssertNotEqual(BigUInt(words: [1, 2]), BigUInt(words: [1, 2, 3]))
- XCTAssertNotEqual(BigUInt(words: [1, 2, 3]), BigUInt(words: [1, 3, 3]))
- XCTAssertEqual(BigUInt(words: [1, 2, 3, 4, 5, 6]).low.high, BigUInt(words: [3]))
-
- XCTAssertTrue(BigUInt(words: [1, 2]) < BigUInt(words: [1, 2, 3]))
- XCTAssertTrue(BigUInt(words: [1, 2, 2]) < BigUInt(words: [1, 2, 3]))
- XCTAssertFalse(BigUInt(words: [1, 2, 3]) < BigUInt(words: [1, 2, 3]))
- XCTAssertTrue(BigUInt(words: [3, 3]) < BigUInt(words: [1, 2, 3, 4, 5, 6]).extract(2 ..< 4))
- XCTAssertTrue(BigUInt(words: [1, 2, 3, 4, 5, 6]).low.high < BigUInt(words: [3, 5]))
- }
-
- func testHashing() {
- var hashes: [Int] = []
- hashes.append(BigUInt(words: []).hashValue)
- hashes.append(BigUInt(words: [1]).hashValue)
- hashes.append(BigUInt(words: [2]).hashValue)
- hashes.append(BigUInt(words: [0, 1]).hashValue)
- hashes.append(BigUInt(words: [1, 1]).hashValue)
- hashes.append(BigUInt(words: [1, 2]).hashValue)
- hashes.append(BigUInt(words: [2, 1]).hashValue)
- hashes.append(BigUInt(words: [2, 2]).hashValue)
- hashes.append(BigUInt(words: [1, 2, 3, 4, 5]).hashValue)
- hashes.append(BigUInt(words: [5, 4, 3, 2, 1]).hashValue)
- hashes.append(BigUInt(words: [Word.max]).hashValue)
- hashes.append(BigUInt(words: [Word.max, Word.max]).hashValue)
- hashes.append(BigUInt(words: [Word.max, Word.max, Word.max]).hashValue)
- hashes.append(BigUInt(words: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]).hashValue)
- XCTAssertEqual(hashes.count, Set(hashes).count)
- }
-
- func checkData(_ bytes: [UInt8], _ value: BigUInt, file: StaticString = #file, line: UInt = #line) {
- XCTAssertEqual(BigUInt(Data(bytes)), value, file: file, line: line)
- XCTAssertEqual(bytes.withUnsafeBytes { buffer in BigUInt(buffer) }, value, file: file, line: line)
- }
-
- func testConversionFromBytes() {
- checkData([], 0)
- checkData([0], 0)
- checkData([0, 0, 0, 0, 0, 0, 0, 0], 0)
- checkData([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 0)
- checkData([1], 1)
- checkData([2], 2)
- checkData([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1], 1)
- checkData([0x01, 0x02, 0x03, 0x04, 0x05], 0x0102030405)
- checkData([0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08], 0x0102030405060708)
- checkData([0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A],
- BigUInt(0x0102) << 64 + BigUInt(0x030405060708090A))
- checkData([0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00],
- BigUInt(1) << 80)
- checkData([0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10],
- BigUInt(0x0102030405060708) << 64 + BigUInt(0x090A0B0C0D0E0F10))
- checkData([0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11],
- ((BigUInt(1) << 128) as BigUInt) + BigUInt(0x0203040506070809) << 64 + BigUInt(0x0A0B0C0D0E0F1011))
- }
-
- func testConversionToData() {
- func test(_ b: BigUInt, _ d: Array, file: StaticString = #file, line: UInt = #line) {
- let expected = Data(d)
- let actual = b.serialize()
- XCTAssertEqual(actual, expected, file: file, line: line)
- XCTAssertEqual(BigUInt(actual), b, file: file, line: line)
- }
-
- test(BigUInt(), [])
- test(BigUInt(1), [0x01])
- test(BigUInt(2), [0x02])
- test(BigUInt(0x0102030405060708), [0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08])
- test(BigUInt(0x01) << 64 + BigUInt(0x0203040506070809), [0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09])
- }
-
- func testCodable() {
- func test(_ a: BigUInt, file: StaticString = #file, line: UInt = #line) {
- do {
- let json = try JSONEncoder().encode(a)
- print(String(data: json, encoding: .utf8)!)
- let b = try JSONDecoder().decode(BigUInt.self, from: json)
- XCTAssertEqual(a, b, file: file, line: line)
- }
- catch let error {
- XCTFail("Error thrown: \(error.localizedDescription)", file: file, line: line)
- }
- }
- test(0)
- test(1)
- test(0x0102030405060708)
- test(BigUInt(1) << 64)
- test(BigUInt(words: [1, 2, 3, 4, 5, 6, 7]))
-
- XCTAssertThrowsError(try JSONDecoder().decode(BigUInt.self, from: "[\"*\", 1]".data(using: .utf8)!)) { error in
- guard let error = error as? DecodingError else { XCTFail("Expected a decoding error"); return }
- guard case .dataCorrupted(let context) = error else { XCTFail("Expected a dataCorrupted error"); return }
- XCTAssertEqual(context.debugDescription, "Invalid big integer sign")
- }
- XCTAssertThrowsError(try JSONDecoder().decode(BigUInt.self, from: "[\"-\", 1]".data(using: .utf8)!)) { error in
- guard let error = error as? DecodingError else { XCTFail("Expected a decoding error"); return }
- guard case .dataCorrupted(let context) = error else { XCTFail("Expected a dataCorrupted error"); return }
- XCTAssertEqual(context.debugDescription, "BigUInt cannot hold a negative value")
- }
- }
-
- func testAddition() {
- XCTAssertEqual(BigUInt(0) + BigUInt(0), BigUInt(0))
- XCTAssertEqual(BigUInt(0) + BigUInt(Word.max), BigUInt(Word.max))
- XCTAssertEqual(BigUInt(Word.max) + BigUInt(1), BigUInt(words: [0, 1]))
-
- check(BigUInt(3) + BigUInt(42), .inline(45, 0), [45])
- check(BigUInt(3) + BigUInt(42), .inline(45, 0), [45])
-
- check(0 + BigUInt(Word.max), .inline(Word.max, 0), [Word.max])
- check(1 + BigUInt(Word.max), .inline(0, 1), [0, 1])
- check(BigUInt(low: 0, high: 1) + BigUInt(low: 3, high: 4), .inline(3, 5), [3, 5])
- check(BigUInt(low: 3, high: 5) + BigUInt(low: 0, high: Word.max), .array, [3, 4, 1])
- check(BigUInt(words: [3, 4, 1]) + BigUInt(low: 0, high: Word.max), .array, [3, 3, 2])
- check(BigUInt(words: [3, 3, 2]) + 2, .array, [5, 3, 2])
- check(BigUInt(words: [Word.max - 5, Word.max, 4, Word.max]).addingWord(6), .array, [0, 0, 5, Word.max])
-
- var b = BigUInt(words: [Word.max, 2, Word.max])
- b.increment()
- check(b, .array, [0, 3, Word.max])
- }
-
- func testShiftedAddition() {
- var b = BigUInt()
- b.add(1, shiftedBy: 1)
- check(b, .inline(0, 1), [0, 1])
-
- b.add(2, shiftedBy: 3)
- check(b, .array, [0, 1, 0, 2])
-
- b.add(BigUInt(Word.max), shiftedBy: 1)
- check(b, .array, [0, 0, 1, 2])
- }
-
- func testSubtraction() {
- var a1 = BigUInt(words: [1, 2, 3, 4])
- XCTAssertEqual(false, a1.subtractWordReportingOverflow(3, shiftedBy: 1))
- check(a1, .array, [1, Word.max, 2, 4])
-
- let (diff, overflow) = BigUInt(words: [1, 2, 3, 4]).subtractingWordReportingOverflow(2)
- XCTAssertEqual(false, overflow)
- check(diff, .array, [Word.max, 1, 3, 4])
-
- var a2 = BigUInt(words: [1, 2, 3, 4])
- XCTAssertEqual(true, a2.subtractWordReportingOverflow(5, shiftedBy: 3))
- check(a2, .array, [1, 2, 3, Word.max])
-
- var a3 = BigUInt(words: [1, 2, 3, 4])
- a3.subtractWord(4, shiftedBy: 3)
- check(a3, .array, [1, 2, 3])
-
- var a4 = BigUInt(words: [1, 2, 3, 4])
- a4.decrement()
- check(a4, .array, [0, 2, 3, 4])
- a4.decrement()
- check(a4, .array, [Word.max, 1, 3, 4])
-
- check(BigUInt(words: [1, 2, 3, 4]).subtractingWord(5),
- .array, [Word.max - 3, 1, 3, 4])
-
- check(BigUInt(0) - BigUInt(0), .inline(0, 0), [])
-
- var b = BigUInt(words: [1, 2, 3, 4])
- XCTAssertEqual(false, b.subtractReportingOverflow(BigUInt(words: [0, 1, 1, 1])))
- check(b, .array, [1, 1, 2, 3])
-
- let b1 = BigUInt(words: [1, 1, 2, 3]).subtractingReportingOverflow(BigUInt(words: [1, 1, 3, 3]))
- XCTAssertEqual(true, b1.overflow)
- check(b1.partialValue, .array, [0, 0, Word.max, Word.max])
-
- let b2 = BigUInt(words: [0, 0, 1]) - BigUInt(words: [1])
- check(b2, .array, [Word.max, Word.max])
-
- var b3 = BigUInt(words: [1, 0, 0, 1])
- b3 -= 2
- check(b3, .array, [Word.max, Word.max, Word.max])
-
- check(BigUInt(42) - BigUInt(23), .inline(19, 0), [19])
- }
-
- func testMultiplyByWord() {
- check(BigUInt(words: [1, 2, 3, 4]).multiplied(byWord: 0), .inline(0, 0), [])
- check(BigUInt(words: [1, 2, 3, 4]).multiplied(byWord: 2), .array, [2, 4, 6, 8])
-
- let full = Word.max
-
- check(BigUInt(words: [full, 0, full, 0, full]).multiplied(byWord: 2),
- .array, [full - 1, 1, full - 1, 1, full - 1, 1])
-
- check(BigUInt(words: [full, full, full]).multiplied(byWord: 2),
- .array, [full - 1, full, full, 1])
-
- check(BigUInt(words: [full, full, full]).multiplied(byWord: full),
- .array, [1, full, full, full - 1])
-
- check(BigUInt("11111111111111111111111111111111", radix: 16)!.multiplied(byWord: 15),
- .array, convertWords([UInt64.max, UInt64.max]))
-
- check(BigUInt("11111111111111111111111111111112", radix: 16)!.multiplied(byWord: 15),
- .array, convertWords([0xE, 0, 0x1]))
-
- check(BigUInt(low: 1, high: 2).multiplied(byWord: 3), .inline(3, 6), [3, 6])
- }
-
- func testMultiplication() {
- func test() {
- check(BigUInt(low: 1, high: 1) * BigUInt(word: 3), .inline(3, 3), [3, 3])
- check(BigUInt(word: 4) * BigUInt(low: 1, high: 2), .inline(4, 8), [4, 8])
-
- XCTAssertEqual(
- BigUInt(words: [1, 2, 3, 4]) * BigUInt(),
- BigUInt())
- XCTAssertEqual(
- BigUInt() * BigUInt(words: [1, 2, 3, 4]),
- BigUInt())
- XCTAssertEqual(
- BigUInt(words: [1, 2, 3, 4]) * BigUInt(words: [2]),
- BigUInt(words: [2, 4, 6, 8]))
- XCTAssertEqual(
- BigUInt(words: [1, 2, 3, 4]).multiplied(by: BigUInt(words: [2])),
- BigUInt(words: [2, 4, 6, 8]))
- XCTAssertEqual(
- BigUInt(words: [2]) * BigUInt(words: [1, 2, 3, 4]),
- BigUInt(words: [2, 4, 6, 8]))
- XCTAssertEqual(
- BigUInt(words: [1, 2, 3, 4]) * BigUInt(words: [0, 1]),
- BigUInt(words: [0, 1, 2, 3, 4]))
- XCTAssertEqual(
- BigUInt(words: [0, 1]) * BigUInt(words: [1, 2, 3, 4]),
- BigUInt(words: [0, 1, 2, 3, 4]))
- XCTAssertEqual(
- BigUInt(words: [4, 3, 2, 1]) * BigUInt(words: [1, 2, 3, 4]),
- BigUInt(words: [4, 11, 20, 30, 20, 11, 4]))
- // 999 * 99 = 98901
- XCTAssertEqual(
- BigUInt(words: [Word.max, Word.max, Word.max]) * BigUInt(words: [Word.max, Word.max]),
- BigUInt(words: [1, 0, Word.max, Word.max - 1, Word.max]))
- XCTAssertEqual(
- BigUInt(words: [1, 2]) * BigUInt(words: [2, 1]),
- BigUInt(words: [2, 5, 2]))
-
- var b = BigUInt("2637AB28", radix: 16)!
- b *= BigUInt("164B", radix: 16)!
- XCTAssertEqual(b, BigUInt("353FB0494B8", radix: 16))
-
- XCTAssertEqual(BigUInt("16B60", radix: 16)! * BigUInt("33E28", radix: 16)!, BigUInt("49A5A0700", radix: 16)!)
- }
-
- test()
- // Disable brute force multiplication.
- let limit = BigUInt.directMultiplicationLimit
- BigUInt.directMultiplicationLimit = 0
- defer { BigUInt.directMultiplicationLimit = limit }
-
- test()
- }
-
- func testDivision() {
- func test(_ a: [Word], _ b: [Word], file: StaticString = #file, line: UInt = #line) {
- let x = BigUInt(words: a)
- let y = BigUInt(words: b)
- let (div, mod) = x.quotientAndRemainder(dividingBy: y)
- if mod >= y {
- XCTFail("x:\(x) = div:\(div) * y:\(y) + mod:\(mod)", file: file, line: line)
- }
- if div * y + mod != x {
- XCTFail("x:\(x) = div:\(div) * y:\(y) + mod:\(mod)", file: file, line: line)
- }
-
- let shift = y.leadingZeroBitCount
- let norm = y << shift
- var rem = x
- rem.formRemainder(dividingBy: norm, normalizedBy: shift)
- XCTAssertEqual(rem, mod, file: file, line: line)
- }
-
- // These cases exercise all code paths in the division when Word is UInt8 or UInt64.
- test([], [1])
- test([1], [1])
- test([1], [2])
- test([2], [1])
- test([], [0, 1])
- test([1], [0, 1])
- test([0, 1], [0, 1])
- test([0, 0, 1], [0, 1])
- test([0, 0, 1], [1, 1])
- test([0, 0, 1], [3, 1])
- test([0, 0, 1], [75, 1])
- test([0, 0, 0, 1], [0, 1])
- test([2, 4, 6, 8], [1, 2])
- test([2, 3, 4, 5], [4, 5])
- test([Word.max, Word.max - 1, Word.max], [Word.max, Word.max])
- test([0, Word.max, Word.max - 1], [Word.max, Word.max])
- test([0, 0, 0, 0, 0, Word.max / 2 + 1, Word.max / 2], [1, 0, 0, Word.max / 2 + 1])
- test([0, Word.max - 1, Word.max / 2 + 1], [Word.max, Word.max / 2 + 1])
- test([0, 0, 0x41 << Word(Word.bitWidth - 8)], [Word.max, 1 << Word(Word.bitWidth - 1)])
-
- XCTAssertEqual(BigUInt(328) / BigUInt(21), BigUInt(15))
- XCTAssertEqual(BigUInt(328) % BigUInt(21), BigUInt(13))
-
- var a = BigUInt(328)
- a /= 21
- XCTAssertEqual(a, 15)
- a %= 7
- XCTAssertEqual(a, 1)
-
- #if false
- for x0 in (0 ... Int(Word.max)) {
- for x1 in (0 ... Int(Word.max)).reverse() {
- for y0 in (0 ... Int(Word.max)).reverse() {
- for y1 in (1 ... Int(Word.max)).reverse() {
- for x2 in (1 ... y1).reverse() {
- test(
- [Word(x0), Word(x1), Word(x2)],
- [Word(y0), Word(y1)])
- }
- }
- }
- }
- }
- #endif
- }
-
- func testFactorial() {
- let power = 10
- var forward = BigUInt(1)
- for i in 1 ..< (1 << power) {
- forward *= BigUInt(i)
- }
- print("\(1 << power - 1)! = \(forward) [\(forward.count)]")
- var backward = BigUInt(1)
- for i in (1 ..< (1 << power)).reversed() {
- backward *= BigUInt(i)
- }
-
- func balancedFactorial(level: Int, offset: Int) -> BigUInt {
- if level == 0 {
- return BigUInt(offset == 0 ? 1 : offset)
- }
- let a = balancedFactorial(level: level - 1, offset: 2 * offset)
- let b = balancedFactorial(level: level - 1, offset: 2 * offset + 1)
- return a * b
- }
- let balanced = balancedFactorial(level: power, offset: 0)
-
- XCTAssertEqual(backward, forward)
- XCTAssertEqual(balanced, forward)
-
- var remaining = balanced
- for i in 1 ..< (1 << power) {
- let (div, mod) = remaining.quotientAndRemainder(dividingBy: BigUInt(i))
- XCTAssertEqual(mod, 0)
- remaining = div
- }
- XCTAssertEqual(remaining, 1)
- }
-
- func testExponentiation() {
- XCTAssertEqual(BigUInt(0).power(0), BigUInt(1))
- XCTAssertEqual(BigUInt(0).power(1), BigUInt(0))
-
- XCTAssertEqual(BigUInt(1).power(0), BigUInt(1))
- XCTAssertEqual(BigUInt(1).power(1), BigUInt(1))
- XCTAssertEqual(BigUInt(1).power(-1), BigUInt(1))
- XCTAssertEqual(BigUInt(1).power(-2), BigUInt(1))
- XCTAssertEqual(BigUInt(1).power(-3), BigUInt(1))
- XCTAssertEqual(BigUInt(1).power(-4), BigUInt(1))
-
- XCTAssertEqual(BigUInt(2).power(0), BigUInt(1))
- XCTAssertEqual(BigUInt(2).power(1), BigUInt(2))
- XCTAssertEqual(BigUInt(2).power(2), BigUInt(4))
- XCTAssertEqual(BigUInt(2).power(3), BigUInt(8))
- XCTAssertEqual(BigUInt(2).power(-1), BigUInt(0))
- XCTAssertEqual(BigUInt(2).power(-2), BigUInt(0))
- XCTAssertEqual(BigUInt(2).power(-3), BigUInt(0))
-
- XCTAssertEqual(BigUInt(3).power(0), BigUInt(1))
- XCTAssertEqual(BigUInt(3).power(1), BigUInt(3))
- XCTAssertEqual(BigUInt(3).power(2), BigUInt(9))
- XCTAssertEqual(BigUInt(3).power(3), BigUInt(27))
- XCTAssertEqual(BigUInt(3).power(-1), BigUInt(0))
- XCTAssertEqual(BigUInt(3).power(-2), BigUInt(0))
-
- XCTAssertEqual((BigUInt(1) << 256).power(0), BigUInt(1))
- XCTAssertEqual((BigUInt(1) << 256).power(1), BigUInt(1) << 256)
- XCTAssertEqual((BigUInt(1) << 256).power(2), BigUInt(1) << 512)
-
- XCTAssertEqual(BigUInt(0).power(577), BigUInt(0))
- XCTAssertEqual(BigUInt(1).power(577), BigUInt(1))
- XCTAssertEqual(BigUInt(2).power(577), BigUInt(1) << 577)
- }
-
- func testModularExponentiation() {
- XCTAssertEqual(BigUInt(2).power(11, modulus: 1), 0)
- XCTAssertEqual(BigUInt(2).power(11, modulus: 1000), 48)
-
- func test(a: BigUInt, p: BigUInt, file: StaticString = #file, line: UInt = #line) {
- // For all primes p and integers a, a % p == a^p % p. (Fermat's Little Theorem)
- let x = a % p
- let y = x.power(p, modulus: p)
- XCTAssertEqual(x, y, file: file, line: line)
- }
-
- // Here are some primes
-
- let m61 = (BigUInt(1) << 61) - BigUInt(1)
- let m127 = (BigUInt(1) << 127) - BigUInt(1)
- let m521 = (BigUInt(1) << 521) - BigUInt(1)
-
- test(a: 2, p: m127)
- test(a: BigUInt(1) << 42, p: m127)
- test(a: BigUInt(1) << 42 + BigUInt(1), p: m127)
- test(a: m61, p: m127)
- test(a: m61 + 1, p: m127)
- test(a: m61, p: m521)
- test(a: m61 + 1, p: m521)
- test(a: m127, p: m521)
- }
-
- func testBitWidth() {
- XCTAssertEqual(BigUInt(0).bitWidth, 0)
- XCTAssertEqual(BigUInt(1).bitWidth, 1)
- XCTAssertEqual(BigUInt(Word.max).bitWidth, Word.bitWidth)
- XCTAssertEqual(BigUInt(words: [Word.max, 1]).bitWidth, Word.bitWidth + 1)
- XCTAssertEqual(BigUInt(words: [2, 12]).bitWidth, Word.bitWidth + 4)
- XCTAssertEqual(BigUInt(words: [1, Word.max]).bitWidth, 2 * Word.bitWidth)
-
- XCTAssertEqual(BigUInt(0).leadingZeroBitCount, 0)
- XCTAssertEqual(BigUInt(1).leadingZeroBitCount, Word.bitWidth - 1)
- XCTAssertEqual(BigUInt(Word.max).leadingZeroBitCount, 0)
- XCTAssertEqual(BigUInt(words: [Word.max, 1]).leadingZeroBitCount, Word.bitWidth - 1)
- XCTAssertEqual(BigUInt(words: [14, Word.max]).leadingZeroBitCount, 0)
-
- XCTAssertEqual(BigUInt(0).trailingZeroBitCount, 0)
- XCTAssertEqual(BigUInt((1 as Word) << (Word.bitWidth - 1)).trailingZeroBitCount, Word.bitWidth - 1)
- XCTAssertEqual(BigUInt(Word.max).trailingZeroBitCount, 0)
- XCTAssertEqual(BigUInt(words: [0, 1]).trailingZeroBitCount, Word.bitWidth)
- XCTAssertEqual(BigUInt(words: [0, 1 << Word(Word.bitWidth - 1)]).trailingZeroBitCount, 2 * Word.bitWidth - 1)
- }
-
- func testBitwise() {
- let a = BigUInt("1234567890ABCDEF13579BDF2468ACE", radix: 16)!
- let b = BigUInt("ECA8642FDB97531FEDCBA0987654321", radix: 16)!
-
- // a = 01234567890ABCDEF13579BDF2468ACE
- // b = 0ECA8642FDB97531FEDCBA0987654321
- XCTAssertEqual(String(~a, radix: 16), "fedcba9876f543210eca86420db97531")
- XCTAssertEqual(String(a | b, radix: 16), "febc767fdbbfdfffffdfbbdf767cbef")
- XCTAssertEqual(String(a & b, radix: 16), "2044289083410f014380982440200")
- XCTAssertEqual(String(a ^ b, radix: 16), "fe9c32574b3c9ef0fe9c3b47523c9ef")
-
- let ffff = BigUInt(words: Array(repeating: Word.max, count: 30))
- let not = ~ffff
- let zero = BigUInt()
- XCTAssertEqual(not, zero)
- XCTAssertEqual(Array((~ffff).words), [])
- XCTAssertEqual(a | ffff, ffff)
- XCTAssertEqual(a | 0, a)
- XCTAssertEqual(a & a, a)
- XCTAssertEqual(a & 0, 0)
- XCTAssertEqual(a & ffff, a)
- XCTAssertEqual(~(a | b), (~a & ~b))
- XCTAssertEqual(~(a & b), (~a | ~b).extract(..<(a&b).count))
- XCTAssertEqual(a ^ a, 0)
- XCTAssertEqual((a ^ b) ^ b, a)
- XCTAssertEqual((a ^ b) ^ a, b)
-
- var z = a * b
- z |= a
- z &= b
- z ^= ffff
- XCTAssertEqual(z, (((a * b) | a) & b) ^ ffff)
- }
-
- func testLeftShifts() {
- let sample = BigUInt("123456789ABCDEF01234567891631832727633", radix: 16)!
-
- var a = sample
-
- a <<= 0
- XCTAssertEqual(a, sample)
-
- a = sample
- a <<= 1
- XCTAssertEqual(a, 2 * sample)
-
- a = sample
- a <<= Word.bitWidth
- XCTAssertEqual(a.count, sample.count + 1)
- XCTAssertEqual(a[0], 0)
- XCTAssertEqual(a.extract(1 ... sample.count + 1), sample)
-
- a = sample
- a <<= 100 * Word.bitWidth
- XCTAssertEqual(a.count, sample.count + 100)
- XCTAssertEqual(a.extract(0 ..< 100), 0)
- XCTAssertEqual(a.extract(100 ... sample.count + 100), sample)
-
- a = sample
- a <<= 100 * Word.bitWidth + 2
- XCTAssertEqual(a.count, sample.count + 100)
- XCTAssertEqual(a.extract(0 ..< 100), 0)
- XCTAssertEqual(a.extract(100 ... sample.count + 100), sample << 2)
-
- a = sample
- a <<= Word.bitWidth - 1
- XCTAssertEqual(a.count, sample.count + 1)
- XCTAssertEqual(a, BigUInt(words: [0] + sample.words) / 2)
-
-
- a = sample
- a <<= -4
- XCTAssertEqual(a, sample / 16)
-
- XCTAssertEqual(sample << 0, sample)
- XCTAssertEqual(sample << 1, 2 * sample)
- XCTAssertEqual(sample << 2, 4 * sample)
- XCTAssertEqual(sample << 4, 16 * sample)
- XCTAssertEqual(sample << Word.bitWidth, BigUInt(words: [0 as Word] + sample.words))
- XCTAssertEqual(sample << (Word.bitWidth - 1), BigUInt(words: [0] + sample.words) / 2)
- XCTAssertEqual(sample << (Word.bitWidth + 1), BigUInt(words: [0] + sample.words) * 2)
- XCTAssertEqual(sample << (Word.bitWidth + 2), BigUInt(words: [0] + sample.words) * 4)
- XCTAssertEqual(sample << (2 * Word.bitWidth), BigUInt(words: [0, 0] + sample.words))
- XCTAssertEqual(sample << (2 * Word.bitWidth + 2), BigUInt(words: [0, 0] + (4 * sample).words))
-
- XCTAssertEqual(sample << -1, sample / 2)
- XCTAssertEqual(sample << -4, sample / 16)
- }
-
- func testRightShifts() {
- let sample = BigUInt("123456789ABCDEF1234567891631832727633", radix: 16)!
-
- var a = sample
-
- a >>= BigUInt(0)
- XCTAssertEqual(a, sample)
-
- a >>= 0
- XCTAssertEqual(a, sample)
-
- a = sample
- a >>= 1
- XCTAssertEqual(a, sample / 2)
-
- a = sample
- a >>= Word.bitWidth
- XCTAssertEqual(a, sample.extract(1...))
-
- a = sample
- a >>= Word.bitWidth + 2
- XCTAssertEqual(a, sample.extract(1...) / 4)
-
- a = sample
- a >>= sample.count * Word.bitWidth
- XCTAssertEqual(a, 0)
-
- a = sample
- a >>= 1000
- XCTAssertEqual(a, 0)
-
- a = sample
- a >>= 100 * Word.bitWidth
- XCTAssertEqual(a, 0)
-
- a = sample
- a >>= 100 * BigUInt(Word.max)
- XCTAssertEqual(a, 0)
-
- a = sample
- a >>= -1
- XCTAssertEqual(a, sample * 2)
-
- a = sample
- a >>= -4
- XCTAssertEqual(a, sample * 16)
-
- XCTAssertEqual(sample >> BigUInt(0), sample)
- XCTAssertEqual(sample >> 0, sample)
- XCTAssertEqual(sample >> 1, sample / 2)
- XCTAssertEqual(sample >> 3, sample / 8)
- XCTAssertEqual(sample >> Word.bitWidth, sample.extract(1 ..< sample.count))
- XCTAssertEqual(sample >> (Word.bitWidth + 2), sample.extract(1...) / 4)
- XCTAssertEqual(sample >> (Word.bitWidth + 3), sample.extract(1...) / 8)
- XCTAssertEqual(sample >> (sample.count * Word.bitWidth), 0)
- XCTAssertEqual(sample >> (100 * Word.bitWidth), 0)
- XCTAssertEqual(sample >> (100 * BigUInt(Word.max)), 0)
-
- XCTAssertEqual(sample >> -1, sample * 2)
- XCTAssertEqual(sample >> -4, sample * 16)
- }
-
- func testSquareRoot() {
- let sample = BigUInt("123456789ABCDEF1234567891631832727633", radix: 16)!
-
- XCTAssertEqual(BigUInt(0).squareRoot(), 0)
- XCTAssertEqual(BigUInt(256).squareRoot(), 16)
-
- func checkSqrt(_ value: BigUInt, file: StaticString = #file, line: UInt = #line) {
- let root = value.squareRoot()
- XCTAssertLessThanOrEqual(root * root, value, "\(value)", file: file, line: line)
- XCTAssertGreaterThan((root + 1) * (root + 1), value, "\(value)", file: file, line: line)
- }
- for i in 0 ... 100 {
- checkSqrt(BigUInt(i))
- checkSqrt(BigUInt(i) << 100)
- }
- checkSqrt(sample)
- checkSqrt(sample * sample)
- checkSqrt(sample * sample - 1)
- checkSqrt(sample * sample + 1)
- }
-
- func testGCD() {
- XCTAssertEqual(BigUInt(0).greatestCommonDivisor(with: 2982891), 2982891)
- XCTAssertEqual(BigUInt(2982891).greatestCommonDivisor(with: 0), 2982891)
- XCTAssertEqual(BigUInt(0).greatestCommonDivisor(with: 0), 0)
-
- XCTAssertEqual(BigUInt(4).greatestCommonDivisor(with: 6), 2)
- XCTAssertEqual(BigUInt(15).greatestCommonDivisor(with: 10), 5)
- XCTAssertEqual(BigUInt(8 * 3 * 25 * 7).greatestCommonDivisor(with: 2 * 9 * 5 * 49), 2 * 3 * 5 * 7)
-
- var fibo: [BigUInt] = [0, 1]
- for i in 0...10000 {
- fibo.append(fibo[i] + fibo[i + 1])
- }
-
- XCTAssertEqual(BigUInt(fibo[100]).greatestCommonDivisor(with: fibo[101]), 1)
- XCTAssertEqual(BigUInt(fibo[1000]).greatestCommonDivisor(with: fibo[1001]), 1)
- XCTAssertEqual(BigUInt(fibo[10000]).greatestCommonDivisor(with: fibo[10001]), 1)
-
- XCTAssertEqual(BigUInt(3 * 5 * 7 * 9).greatestCommonDivisor(with: 5 * 7 * 7), 5 * 7)
- XCTAssertEqual(BigUInt(fibo[4]).greatestCommonDivisor(with: fibo[2]), fibo[2])
- XCTAssertEqual(BigUInt(fibo[3 * 5 * 7 * 9]).greatestCommonDivisor(with: fibo[5 * 7 * 7 * 9]), fibo[5 * 7 * 9])
- XCTAssertEqual(BigUInt(fibo[7 * 17 * 83]).greatestCommonDivisor(with: fibo[6 * 17 * 83]), fibo[17 * 83])
- }
-
- func testInverse() {
- XCTAssertNil(BigUInt(4).inverse(2))
- XCTAssertNil(BigUInt(4).inverse(8))
- XCTAssertNil(BigUInt(12).inverse(15))
- XCTAssertEqual(BigUInt(13).inverse(15), 7)
-
- XCTAssertEqual(BigUInt(251).inverse(1023), 269)
- XCTAssertNil(BigUInt(252).inverse(1023))
- XCTAssertEqual(BigUInt(2).inverse(1023), 512)
- }
-
-
- func testStrongProbablePrimeTest() {
- let primes: [BigUInt.Word] = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 79, 83, 89, 97]
- let pseudoPrimes: [BigUInt] = [
- /* 2 */ 2_047,
- /* 3 */ 1_373_653,
- /* 5 */ 25_326_001,
- /* 7 */ 3_215_031_751,
- /* 11 */ 2_152_302_898_747,
- /* 13 */ 3_474_749_660_383,
- /* 17 */ 341_550_071_728_321,
- /* 19 */ 341_550_071_728_321,
- /* 23 */ 3_825_123_056_546_413_051,
- /* 29 */ 3_825_123_056_546_413_051,
- /* 31 */ 3_825_123_056_546_413_051,
- /* 37 */ "318665857834031151167461",
- /* 41 */ "3317044064679887385961981",
- ]
- for i in 0.. = [2, 3, 5, 7, 13, 17, 19, 31, 61, 89, 107, 127, 521]
- for exponent in 2..<200 {
- let m = BigUInt(1) << exponent - 1
- XCTAssertEqual(m.isPrime(), mp.contains(exponent), "\(exponent)")
- }
- }
-
- func testConversionToString() {
- let sample = BigUInt("123456789ABCDEFEDCBA98765432123456789ABCDEF", radix: 16)!
- // Radix = 10
- XCTAssertEqual(String(BigUInt()), "0")
- XCTAssertEqual(String(BigUInt(1)), "1")
- XCTAssertEqual(String(BigUInt(100)), "100")
- XCTAssertEqual(String(BigUInt(12345)), "12345")
- XCTAssertEqual(String(BigUInt(123456789)), "123456789")
- XCTAssertEqual(String(sample), "425693205796080237694414176550132631862392541400559")
-
- // Radix = 16
- XCTAssertEqual(String(BigUInt(0x1001), radix: 16), "1001")
- XCTAssertEqual(String(BigUInt(0x0102030405060708), radix: 16), "102030405060708")
- XCTAssertEqual(String(sample, radix: 16), "123456789abcdefedcba98765432123456789abcdef")
- XCTAssertEqual(String(sample, radix: 16, uppercase: true), "123456789ABCDEFEDCBA98765432123456789ABCDEF")
-
- // Radix = 2
- XCTAssertEqual(String(BigUInt(12), radix: 2), "1100")
- XCTAssertEqual(String(BigUInt(123), radix: 2), "1111011")
- XCTAssertEqual(String(BigUInt(1234), radix: 2), "10011010010")
- XCTAssertEqual(String(sample, radix: 2), "1001000110100010101100111100010011010101111001101111011111110110111001011101010011000011101100101010000110010000100100011010001010110011110001001101010111100110111101111")
-
- // Radix = 31
- XCTAssertEqual(String(BigUInt(30), radix: 31), "u")
- XCTAssertEqual(String(BigUInt(31), radix: 31), "10")
- XCTAssertEqual(String(BigUInt("10000000000000000", radix: 16)!, radix: 31), "nd075ib45k86g")
- XCTAssertEqual(String(BigUInt("2908B5129F59DB6A41", radix: 16)!, radix: 31), "100000000000000")
- XCTAssertEqual(String(sample, radix: 31), "ptf96helfaqi7ogc3jbonmccrhmnc2b61s")
-
- let quickLook = BigUInt(513).playgroundDescription as? String
- if quickLook == "513 (10 bits)" {
- } else {
- XCTFail("Unexpected playground QuickLook representation: \(quickLook ?? "nil")")
- }
- }
-
- func testConversionFromString() {
- let sample = "123456789ABCDEFEDCBA98765432123456789ABCDEF"
-
- XCTAssertEqual(BigUInt("1"), 1)
- XCTAssertEqual(BigUInt("123456789ABCDEF", radix: 16)!, 0x123456789ABCDEF)
- XCTAssertEqual(BigUInt("1000000000000000000000"), BigUInt("3635C9ADC5DEA00000", radix: 16))
- XCTAssertEqual(BigUInt("10000000000000000", radix: 16), BigUInt("18446744073709551616"))
- XCTAssertEqual(BigUInt(sample, radix: 16)!, BigUInt("425693205796080237694414176550132631862392541400559"))
-
- // We have to call BigUInt.init here because we don't want Literal initialization via coercion (SE-0213)
- XCTAssertNil(BigUInt.init("Not a number"))
- XCTAssertNil(BigUInt.init("X"))
- XCTAssertNil(BigUInt.init("12349A"))
- XCTAssertNil(BigUInt.init("000000000000000000000000A000"))
- XCTAssertNil(BigUInt.init("00A0000000000000000000000000"))
- XCTAssertNil(BigUInt.init("00 0000000000000000000000000"))
- XCTAssertNil(BigUInt.init("\u{4e00}\u{4e03}")) // Chinese numerals "1", "7"
-
- XCTAssertEqual(BigUInt("u", radix: 31)!, 30)
- XCTAssertEqual(BigUInt("10", radix: 31)!, 31)
- XCTAssertEqual(BigUInt("100000000000000", radix: 31)!, BigUInt("2908B5129F59DB6A41", radix: 16)!)
- XCTAssertEqual(BigUInt("nd075ib45k86g", radix: 31)!, BigUInt("10000000000000000", radix: 16)!)
- XCTAssertEqual(BigUInt("ptf96helfaqi7ogc3jbonmccrhmnc2b61s", radix: 31)!, BigUInt(sample, radix: 16)!)
-
- XCTAssertNotNil(BigUInt(sample.repeated(100), radix: 16))
- }
-
- func testRandomIntegerWithMaximumWidth() {
- XCTAssertEqual(BigUInt.randomInteger(withMaximumWidth: 0), 0)
-
- let randomByte = BigUInt.randomInteger(withMaximumWidth: 8)
- XCTAssertLessThan(randomByte, 256)
-
- for _ in 0 ..< 100 {
- XCTAssertLessThanOrEqual(BigUInt.randomInteger(withMaximumWidth: 1024).bitWidth, 1024)
- }
-
- // Verify that all widths <= maximum are produced (with a tiny maximum)
- var widths: Set = [0, 1, 2, 3]
- var i = 0
- while !widths.isEmpty {
- let random = BigUInt.randomInteger(withMaximumWidth: 3)
- XCTAssertLessThanOrEqual(random.bitWidth, 3)
- widths.remove(random.bitWidth)
- i += 1
- if i > 4096 {
- XCTFail("randomIntegerWithMaximumWidth doesn't seem random")
- break
- }
- }
-
- // Verify that all bits are sometimes zero, sometimes one.
- var oneBits = Set(0..<1024)
- var zeroBits = Set(0..<1024)
- while !oneBits.isEmpty || !zeroBits.isEmpty {
- var random = BigUInt.randomInteger(withMaximumWidth: 1024)
- for i in 0..<1024 {
- if random[0] & 1 == 1 { oneBits.remove(i) }
- else { zeroBits.remove(i) }
- random >>= 1
- }
- }
- }
-
- func testRandomIntegerWithExactWidth() {
- XCTAssertEqual(BigUInt.randomInteger(withExactWidth: 0), 0)
- XCTAssertEqual(BigUInt.randomInteger(withExactWidth: 1), 1)
-
- for _ in 0 ..< 1024 {
- let randomByte = BigUInt.randomInteger(withExactWidth: 8)
- XCTAssertEqual(randomByte.bitWidth, 8)
- XCTAssertLessThan(randomByte, 256)
- XCTAssertGreaterThanOrEqual(randomByte, 128)
- }
-
- for _ in 0 ..< 100 {
- XCTAssertEqual(BigUInt.randomInteger(withExactWidth: 1024).bitWidth, 1024)
- }
-
- // Verify that all bits except the top are sometimes zero, sometimes one.
- var oneBits = Set(0..<1023)
- var zeroBits = Set(0..<1023)
- while !oneBits.isEmpty || !zeroBits.isEmpty {
- var random = BigUInt.randomInteger(withExactWidth: 1024)
- for i in 0..<1023 {
- if random[0] & 1 == 1 { oneBits.remove(i) }
- else { zeroBits.remove(i) }
- random >>= 1
- }
- }
- }
-
- func testRandomIntegerLessThan() {
- // Verify that all bits in random integers generated by `randomIntegerLessThan` are sometimes zero, sometimes one.
- //
- // The limit starts with "11" so that generated random integers may easily begin with all combos.
- // Also, 25% of the time the initial random int will be rejected as higher than the
- // limit -- this helps stabilize code coverage.
- let limit = BigUInt(3) << 1024
- var oneBits = Set(0..(0..>= 1
- }
- }
- XCTAssertEqual(oneBits, [])
- XCTAssertEqual(zeroBits, [])
- }
-
- func testRandomFunctionsUseProvidedGenerator() {
- // Here I verify that each of the randomInteger functions uses the provided RNG, and not SystemRandomNumberGenerator.
- // This is important because all but BigUInt.randomInteger(withMaximumWidth:using:) are built on that base function, and it is easy to forget to pass along the provided generator and get a default SystemRandomNumberGenerator instead.
-
- // Since SystemRandomNumberGenerator is seeded randomly, repeated uses should give varying results.
- // So here I pass the same deterministic RNG repeatedly and verify that I get the same result each time.
-
- struct CountingRNG: RandomNumberGenerator {
- var i: UInt64 = 12345
- mutating func next() -> UInt64 {
- i += 1
- return i
- }
- }
-
- func gen(_ body: (inout CountingRNG) -> BigUInt) -> BigUInt {
- var rng = CountingRNG()
- return body(&rng)
- }
-
- func check(_ body: (inout CountingRNG) -> BigUInt) {
- let expected = gen(body)
- for _ in 0 ..< 100 {
- let actual = gen(body)
- XCTAssertEqual(expected, actual)
- }
- }
-
- check { BigUInt.randomInteger(withMaximumWidth: 200, using: &$0) }
- check { BigUInt.randomInteger(withExactWidth: 200, using: &$0) }
- let limit = BigUInt(UInt64.max) * BigUInt(UInt64.max) * BigUInt(UInt64.max)
- check { BigUInt.randomInteger(lessThan: limit, using: &$0) }
- }
-
-}
diff --git a/Carthage/Checkouts/BigInt/Tests/BigIntTests/Info.plist b/Carthage/Checkouts/BigInt/Tests/BigIntTests/Info.plist
deleted file mode 100644
index ba72822e8..000000000
--- a/Carthage/Checkouts/BigInt/Tests/BigIntTests/Info.plist
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
- CFBundleDevelopmentRegion
- en
- CFBundleExecutable
- $(EXECUTABLE_NAME)
- CFBundleIdentifier
- $(PRODUCT_BUNDLE_IDENTIFIER)
- CFBundleInfoDictionaryVersion
- 6.0
- CFBundleName
- $(PRODUCT_NAME)
- CFBundlePackageType
- BNDL
- CFBundleShortVersionString
- 1.0
- CFBundleSignature
- ????
- CFBundleVersion
- 1
-
-
diff --git a/Carthage/Checkouts/BigInt/Tests/BigIntTests/ProfileTests.swift b/Carthage/Checkouts/BigInt/Tests/BigIntTests/ProfileTests.swift
deleted file mode 100644
index 12aa0aa6d..000000000
--- a/Carthage/Checkouts/BigInt/Tests/BigIntTests/ProfileTests.swift
+++ /dev/null
@@ -1,228 +0,0 @@
-//
-// ProfileTests.swift
-// BigInt
-//
-// Created by Károly Lőrentey on 2015-12-31.
-// Copyright © 2016-2017 Károly Lőrentey.
-//
-
-import XCTest
-import BigInt
-
-#if Profile
-
-func factorial(_ n: Int) -> BigUInt {
- var fact = BigUInt(1)
- for i in BigUInt.Word(1) ... BigUInt.Word(n) {
- fact.multiply(byWord: i)
- }
- return fact
-}
-
-class ProfileTests: XCTestCase {
- typealias Word = BigUInt.Word
-
- func measure_(autostart: Bool = true, block: @escaping ()->Void) {
- var round = 0
- self.measureMetrics(type(of: self).defaultPerformanceMetrics, automaticallyStartMeasuring: autostart) {
- print("Round \(round) started")
- block()
- round += 1
- }
- }
-
- func testFibonacciAddition() {
- var n1 = BigUInt(1)
- var n2 = BigUInt(1)
- self.measure {
- n1 = BigUInt(1)
- n2 = BigUInt(1)
- for i in 0..<200000 {
- if i & 1 == 0 {
- n1 += n2
- }
- else {
- n2 += n1
- }
- }
- }
- noop(n1)
- noop(n2)
- }
-
- func checkFactorial(fact: BigUInt, n: Int, file: StaticString = #file, line: UInt = #line) {
- var remaining = fact
- for i in 1...n {
- let (div, mod) = remaining.quotientAndRemainder(dividingBy: BigUInt(i))
- XCTAssertEqual(mod, 0, "for divisor = \(i)", file: file, line: line)
- remaining = div
- }
- XCTAssertEqual(remaining, 1, file: file, line: line)
- }
-
- func testDivisionOfFactorial() {
- let n = 32767
- let fact = factorial(n)
- self.measure {
- checkFactorial(fact: fact, n: n)
- }
- }
-
- func testPrintingFactorial() {
- let n = 32767
- let fact = factorial(n)
- var string: String = ""
- self.measure {
- string = String(fact, radix: 10)
- }
- XCTAssertEqual(BigUInt(string, radix: 10), fact)
- }
-
- func testReadingFactorial() {
- let n = 32767
- let fact = factorial(n)
- let string = String(fact, radix: 10)
- print(string)
- self.measure {
- XCTAssertEqual(BigUInt(string, radix: 10), fact)
- }
- }
-
- func testFactorial() {
- var fact = BigUInt()
- let n = 32767
- self.measure {
- fact = factorial(n)
- }
- checkFactorial(fact: fact, n: n)
- }
-
- func testBalancedFactorial() {
- func balancedFactorial(level: Int, offset: Int = 0) -> BigUInt {
- if level == 0 {
- return BigUInt(offset == 0 ? 1 : offset)
- }
- let a = balancedFactorial(level: level - 1, offset: 2 * offset)
- let b = balancedFactorial(level: level - 1, offset: 2 * offset + 1)
- return a * b
- }
-
- let power = 15
-
- var fact = BigUInt()
- self.measure {
- fact = balancedFactorial(level: power)
- }
- checkFactorial(fact: fact, n: ((1 as Int) << power) - 1)
- }
-
- func testDivision() {
- var divisors: [BigUInt] = []
- func balancedFactorial(level: Int, offset: Int = 0) -> BigUInt {
- if level == 0 {
- return BigUInt(offset == 0 ? 1 : offset)
- }
- let a = balancedFactorial(level: level - 1, offset: 2 * offset)
- let b = balancedFactorial(level: level - 1, offset: 2 * offset + 1)
- let p = a * b
- if level >= 10 { divisors.append(p) }
- return p
- }
-
- let power = 14
-
- let fact = balancedFactorial(level: power)
- print("Performing \(divisors.count) divisions with digit counts (\(fact.words.count) / (\(divisors[0].words.count)...\(divisors[divisors.count - 1].words.count))")
- var divs: [BigUInt] = []
- var mods: [BigUInt] = []
- divs.reserveCapacity(divisors.count)
- mods.reserveCapacity(divisors.count)
- self.measure_(autostart: false) {
- divs.removeAll()
- mods.removeAll()
- self.startMeasuring()
- for divisor in divisors {
- let (div, mod) = fact.quotientAndRemainder(dividingBy: divisor)
- divs.append(div)
- mods.append(mod)
- }
- self.stopMeasuring()
- }
- for i in 0.. [BigUInt] {
- var rnd = PseudoRandomNumbers(seed: seed)
- return (0 ..< count).map { _ in BigUInt(words: (0 ..< words).map { _ in rnd.next()! }) }
- }
-
- func testSquareRoot() {
- let numbers = randomBigUInts(1000, seed: 42, withMaxWords: 60)
- var roots: [BigUInt] = []
- self.measure {
- roots.removeAll()
- for number in numbers {
- let root = number.squareRoot()
- roots.append(root)
- }
- }
-
- for i in 0.. = [2, 3, 5, 7, 13, 17, 19, 31, 61, 89, 107, 127, 521, 607, 1279, 2203, 2281]
- for exp in 1...1000 {
- let mersenne = BigUInt(1) << exp - 1
- XCTAssertEqual(mersenne.isPrime(), exponents.contains(exp), "\(exp) smells fishy")
- }
- // Seems legit. You win this round, evil magmaticians
- }
- }
-}
-#endif
diff --git a/Carthage/Checkouts/BigInt/Tests/BigIntTests/Tools.swift b/Carthage/Checkouts/BigInt/Tests/BigIntTests/Tools.swift
deleted file mode 100644
index 3c2484184..000000000
--- a/Carthage/Checkouts/BigInt/Tests/BigIntTests/Tools.swift
+++ /dev/null
@@ -1,48 +0,0 @@
-//
-// Tools.swift
-// BigInt
-//
-// Created by Károly Lőrentey on 2017-7-23.
-// Copyright © 2017 Károly Lőrentey. All rights reserved.
-//
-
-import BigInt
-
-@inline(never)
-func noop(_ value: T) {
- _ = value
-}
-
-// A basic low-quality random number generator.
-struct PseudoRandomNumbers: Sequence, IteratorProtocol {
- typealias Element = BigUInt.Word
- var last: Element
-
- init(seed: Element) {
- self.last = seed
- }
-
- mutating func next() -> Element? {
- // Constants are from Knuth's MMIX and Numerical Recipes, respectively
- let a: Element = (Element.bitWidth == 8 ? 6364136223846793005 : 1664525)
- let c: Element = (Element.bitWidth == 8 ? 1442695040888963407 : 1013904223)
- last = a &* last &+ c
- return last
- }
-}
-
-func convertWords(_ wideWords: S) -> [UInt] where S.Element == UInt64 {
- return wideWords.flatMap { $0.words }
-}
-
-extension String {
- func repeated(_ count: Int) -> String {
- var result = ""
- for _ in 0 ..< count {
- result += self
- }
- return result
- }
-}
-
-
diff --git a/Carthage/Checkouts/BigInt/Tests/BigIntTests/WordTests.swift b/Carthage/Checkouts/BigInt/Tests/BigIntTests/WordTests.swift
deleted file mode 100644
index 1fc3576d1..000000000
--- a/Carthage/Checkouts/BigInt/Tests/BigIntTests/WordTests.swift
+++ /dev/null
@@ -1,138 +0,0 @@
-//
-// WordTests.swift
-// BigInt
-//
-// Created by Károly Lőrentey on 2017-7-26.
-// Copyright © 2017 Károly Lőrentey. All rights reserved.
-//
-
-import XCTest
-@testable import BigInt
-
-// TODO: Return to `where Word.Magnitude == Word` when SR-13491 is resolved
-struct TestDivision {
- static func testDivision(_ u: (high: Word, low: Word.Magnitude), _ v: Word) {
- let (div, mod) = v.fastDividingFullWidth(u)
- var (ph, pl) = div.multipliedFullWidth(by: v)
- let (s, o) = pl.addingReportingOverflow((mod as! Word.Magnitude))
- pl = s
- if o { ph += Word(1) }
-
- if mod >= v {
- XCTFail("For u = \(u), v = \(v): u mod v = \(mod), which is greater than v")
- }
-
- func message() -> String {
- let uhs = String(u.high, radix: 16)
- let uls = String(u.low, radix: 16)
- let vs = String(v, radix: 16)
- let divs = String(div, radix: 16)
- let mods = String(mod, radix: 16)
- let phs = String(ph, radix: 16)
- let pls = String(pl, radix: 16)
- return "(\(uhs),\(uls)) / \(vs) = (\(divs), \(mods)), but div * v + mod = (\(phs),\(pls))"
- }
- XCTAssertEqual(ph, u.high, message())
- XCTAssertEqual(pl, u.low, message())
- }
-
- static func test() {
- testDivision((0, 0), 2)
- testDivision((0, 1), 2)
- testDivision((1, 0), 2)
- testDivision((8, 0), 136)
- testDivision((128, 0), 136)
- testDivision((2, 0), 35)
- testDivision((7, 12), 19)
- }
-}
-
-class WordTests: XCTestCase {
- func testFullDivide() {
- TestDivision.test()
- TestDivision.test()
- TestDivision.test()
- TestDivision.test()
- TestDivision.test()
-
- #if false
- typealias Word = UInt8
- for v in 1 ... Word.max {
- for u1 in 0 ..< v {
- for u0 in 0 ..< Word.max {
- TestDivision.testDivision((u1, u0), v)
- }
- }
- }
- #endif
- }
-
- func testConversion() {
- enum Direction {
- case unitsToWords
- case wordsToUnits
- case both
- }
- func test
- (direction: Direction = .both,
- words: [Word], of wtype: Word.Type = Word.self,
- units: [Unit], of utype: Unit.Type = Unit.self,
- file: StaticString = #file, line: UInt = #line) {
- switch direction {
- case .wordsToUnits, .both:
- let actualUnits = [Unit](Units(of: Unit.self, words))
- XCTAssertEqual(actualUnits, units, "words -> units", file: file, line: line)
- default:
- break
- }
- switch direction {
- case .unitsToWords, .both:
- var it = units.makeIterator()
- let actualWords = [Word](count: units.count, generator: { () -> Unit? in it.next() })
- XCTAssertEqual(actualWords, words, "units -> words", file: file, line: line)
- default:
- break
- }
- }
-
-
- test(words: [], of: UInt8.self,
- units: [], of: UInt8.self)
- test(words: [0x01], of: UInt8.self,
- units: [0x01], of: UInt8.self)
- test(words: [0x01, 0x02], of: UInt8.self,
- units: [0x02, 0x01], of: UInt8.self)
-
- test(words: [], of: UInt8.self,
- units: [], of: UInt16.self)
- test(direction: .unitsToWords,
- words: [0x01, 0x00], of: UInt8.self,
- units: [0x0001], of: UInt16.self)
- test(direction: .wordsToUnits,
- words: [0x01], of: UInt8.self,
- units: [0x0001], of: UInt16.self)
- test(words: [0x01, 0x02], of: UInt8.self,
- units: [0x0201], of: UInt16.self)
- test(direction: .wordsToUnits,
- words: [0x01, 0x02, 0x03], of: UInt8.self,
- units: [0x0003, 0x0201], of: UInt16.self)
- test(direction: .unitsToWords,
- words: [0x01, 0x02, 0x03, 0x00], of: UInt8.self,
- units: [0x0003, 0x0201], of: UInt16.self)
-
- test(words: [], of: UInt16.self,
- units: [], of: UInt8.self)
- test(words: [0x1234], of: UInt16.self,
- units: [0x12, 0x34], of: UInt8.self)
- test(words: [0x5678, 0x1234], of: UInt16.self,
- units: [0x12, 0x34, 0x56, 0x78], of: UInt8.self)
- test(direction: .unitsToWords,
- words: [0x789A, 0x3456, 0x12], of: UInt16.self,
- units: [0x12, 0x34, 0x56, 0x78, 0x9A], of: UInt8.self)
- test(direction: .wordsToUnits,
- words: [0x789A, 0x3456, 0x12], of: UInt16.self,
- units: [0x00, 0x12, 0x34, 0x56, 0x78, 0x9A], of: UInt8.self)
- }
-}
-
-
diff --git a/Carthage/Checkouts/BigInt/docs/Extensions.html b/Carthage/Checkouts/BigInt/docs/Extensions.html
deleted file mode 100644
index 7479e3581..000000000
--- a/Carthage/Checkouts/BigInt/docs/Extensions.html
+++ /dev/null
@@ -1,173 +0,0 @@
-
-
-
- Extensions Reference
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- BigInt Reference
-
- Extensions Reference
-
-
-
-
-
-
-
-
-
-
-
Extensions
-
The following extensions are available globally.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
extension BinaryFloatingPoint where RawExponent : FixedWidthInteger , RawSignificand : FixedWidthInteger
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
extension String
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Carthage/Checkouts/BigInt/docs/Extensions/BinaryFloatingPoint.html b/Carthage/Checkouts/BigInt/docs/Extensions/BinaryFloatingPoint.html
deleted file mode 100644
index 86bf1c39b..000000000
--- a/Carthage/Checkouts/BigInt/docs/Extensions/BinaryFloatingPoint.html
+++ /dev/null
@@ -1,194 +0,0 @@
-
-
-
- BinaryFloatingPoint Extension Reference
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- BigInt Reference
-
- BinaryFloatingPoint Extension Reference
-
-
-
-
-
-
-
-
-
-
-
BinaryFloatingPoint
-
-
-
-
extension BinaryFloatingPoint where RawExponent : FixedWidthInteger , RawSignificand : FixedWidthInteger
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Available where RawExponent
: FixedWidthInteger
, RawSignificand
: FixedWidthInteger
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public init ( _ value : BigInt )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public init ( _ value : BigUInt )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Carthage/Checkouts/BigInt/docs/Extensions/String.html b/Carthage/Checkouts/BigInt/docs/Extensions/String.html
deleted file mode 100644
index 8e347fd34..000000000
--- a/Carthage/Checkouts/BigInt/docs/Extensions/String.html
+++ /dev/null
@@ -1,244 +0,0 @@
-
-
-
- String Extension Reference
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- BigInt Reference
-
- String Extension Reference
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Initialize a new string with the base-10 representation of an unsigned big integer.
-
-
Complexity
- O(v.count^2)
-
-
-
-
-
-
Declaration
-
-
Swift
-
public init ( _ v : BigUInt )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Initialize a new string representing an unsigned big integer in the given radix (base).
-
-
Numerals greater than 9 are represented as letters from the English alphabet,
-starting with a
if uppercase
is false or A
otherwise.
-
-
Requires
- radix > 1 && radix <= 36
-
-
-
Complexity
- O(count) when radix is a power of two; otherwise O(count^2).
-
-
-
-
-
-
Declaration
-
-
Swift
-
public init ( _ v : BigUInt , radix : Int , uppercase : Bool = false )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Initialize a new string representing a signed big integer in the given radix (base).
-
-
Numerals greater than 9 are represented as letters from the English alphabet,
-starting with a
if uppercase
is false or A
otherwise.
-
-
Requires
- radix > 1 && radix <= 36
-
-
-
Complexity
- O(count) when radix is a power of two; otherwise O(count^2).
-
-
-
-
-
-
Declaration
-
-
Swift
-
public init ( _ value : BigInt , radix : Int = 10 , uppercase : Bool = false )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Carthage/Checkouts/BigInt/docs/Structs.html b/Carthage/Checkouts/BigInt/docs/Structs.html
deleted file mode 100644
index 9ae786007..000000000
--- a/Carthage/Checkouts/BigInt/docs/Structs.html
+++ /dev/null
@@ -1,229 +0,0 @@
-
-
-
- Structures Reference
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- BigInt Reference
-
- Structures Reference
-
-
-
-
-
-
-
-
-
-
-
Structures
-
The following structures are available globally.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
An arbitary precision unsigned integer type, also known as a “big integer”.
-
-
Operations on big integers never overflow, but they may take a long time to execute.
-The amount of memory (and address space) available is the only constraint to the magnitude of these numbers.
-
-
This particular big integer type uses base-2^64 digits to represent integers; you can think of it as a wrapper
-around Array<UInt64>
. (In fact, BigUInt
only uses an array if there are more than two digits.)
-
-
See more
-
-
-
Declaration
-
-
Swift
-
public struct BigUInt : UnsignedInteger
-
extension BigUInt : Codable
-
extension BigUInt : Comparable
-
extension BigUInt : Hashable
-
extension BigUInt : ExpressibleByIntegerLiteral
-
extension BigUInt : Strideable
-
extension BigUInt : ExpressibleByStringLiteral
-
extension BigUInt : CustomStringConvertible
-
extension BigUInt : CustomPlaygroundDisplayConvertible
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
An arbitary precision signed integer type, also known as a “big integer”.
-
-
Operations on big integers never overflow, but they might take a long time to execute.
-The amount of memory (and address space) available is the only constraint to the magnitude of these numbers.
-
-
This particular big integer type uses base-2^64 digits to represent integers.
-
-
BigInt
is essentially a tiny wrapper that extends BigUInt
with a sign bit and provides signed integer
-operations. Both the underlying absolute value and the negative/positive flag are available as read-write
-properties.
-
-
Not all algorithms of BigUInt
are available for BigInt
values; for example, there is no square root or
-primality test for signed integers. When you need to call one of these, just extract the absolute value:
-
BigInt(255).abs.isPrime() // Returns false
-
-
-
See more
-
-
-
Declaration
-
-
Swift
-
public struct BigInt : SignedInteger
-
extension BigInt : Codable
-
extension BigInt : Hashable
-
extension BigInt : ExpressibleByIntegerLiteral
-
extension BigInt : Strideable
-
extension BigInt : ExpressibleByStringLiteral
-
extension BigInt : CustomStringConvertible
-
extension BigInt : CustomPlaygroundDisplayConvertible
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Carthage/Checkouts/BigInt/docs/Structs/BigInt.html b/Carthage/Checkouts/BigInt/docs/Structs/BigInt.html
deleted file mode 100644
index ef27d99fb..000000000
--- a/Carthage/Checkouts/BigInt/docs/Structs/BigInt.html
+++ /dev/null
@@ -1,2546 +0,0 @@
-
-
-
- BigInt Structure Reference
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- BigInt Reference
-
- BigInt Structure Reference
-
-
-
-
-
-
-
-
-
-
-
BigInt
-
-
-
-
public struct BigInt : SignedInteger
-
extension BigInt : Codable
-
extension BigInt : Hashable
-
extension BigInt : ExpressibleByIntegerLiteral
-
extension BigInt : Strideable
-
extension BigInt : ExpressibleByStringLiteral
-
extension BigInt : CustomStringConvertible
-
extension BigInt : CustomPlaygroundDisplayConvertible
-
-
-
-
An arbitary precision signed integer type, also known as a “big integer”.
-
-
Operations on big integers never overflow, but they might take a long time to execute.
-The amount of memory (and address space) available is the only constraint to the magnitude of these numbers.
-
-
This particular big integer type uses base-2^64 digits to represent integers.
-
-
BigInt
is essentially a tiny wrapper that extends BigUInt
with a sign bit and provides signed integer
-operations. Both the underlying absolute value and the negative/positive flag are available as read-write
-properties.
-
-
Not all algorithms of BigUInt
are available for BigInt
values; for example, there is no square root or
-primality test for signed integers. When you need to call one of these, just extract the absolute value:
-
BigInt(255).abs.isPrime() // Returns false
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public enum Sign
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public typealias Magnitude = BigUInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
The type representing a digit in BigInt
‘s underlying number system.
-
-
-
-
Declaration
-
-
Swift
-
public typealias Word = BigUInt . Word
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static var isSigned : Bool { get }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
The absolute value of this integer.
-
-
-
-
Declaration
-
-
Swift
-
public var magnitude : BigUInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
True iff the value of this integer is negative.
-
-
-
-
Declaration
-
-
Swift
-
public var sign : Sign
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Initializes a new big integer with the provided absolute number and sign flag.
-
-
-
-
Declaration
-
-
Swift
-
public init ( sign : Sign , magnitude : BigUInt )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Return true iff this integer is zero.
-
-
-
-
-
Declaration
-
-
Swift
-
public var isZero : Bool { get }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Returns -1
if this value is negative and 1
if it’s positive; otherwise, 0
.
-
-
-
-
Declaration
-
-
Swift
-
public func signum () -> BigInt
-
-
-
-
-
Return Value
-
The sign of this number, expressed as an integer of the same type.
-
-
-
-
-
-
-
-
-
-
-
-
-
Add a
to b
and return the result.
-
-
-
-
Declaration
-
-
Swift
-
public static func + ( a : BigInt , b : BigInt ) -> BigInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Add b
to a
in place.
-
-
-
-
Declaration
-
-
Swift
-
public static func += ( a : inout BigInt , b : BigInt )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Bitwise Operations
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public prefix static func ~ ( x : BigInt ) -> BigInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func & ( lhs : inout BigInt , rhs : BigInt ) -> BigInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func | ( lhs : inout BigInt , rhs : BigInt ) -> BigInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func ^ ( lhs : inout BigInt , rhs : BigInt ) -> BigInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func &= ( lhs : inout BigInt , rhs : BigInt )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func |= ( lhs : inout BigInt , rhs : BigInt )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func ^= ( lhs : inout BigInt , rhs : BigInt )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public init ( from decoder : Decoder ) throws
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public func encode ( to encoder : Encoder ) throws
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Return true iff a
is equal to b
.
-
-
-
-
Declaration
-
-
Swift
-
public static func == ( a : BigInt , b : BigInt ) -> Bool
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Return true iff a
is less than b
.
-
-
-
-
Declaration
-
-
Swift
-
public static func < ( a : BigInt , b : BigInt ) -> Bool
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Initialize a BigInt from bytes accessed from an UnsafeRawBufferPointer,
-where the first byte indicates sign (0 for positive, 1 for negative)
-
-
-
-
Declaration
-
-
Swift
-
public init ( _ buffer : UnsafeRawBufferPointer )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Initializes an integer from the bits stored inside a piece of Data
.
-The data is assumed to be in network (big-endian) byte order with a first
-byte to represent the sign (0 for positive, 1 for negative)
-
-
-
-
Declaration
-
-
Swift
-
public init ( _ data : Data )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Return a Data
value that contains the base-256 representation of this integer, in network (big-endian) byte order and a prepended byte to indicate the sign (0 for positive, 1 for negative)
-
-
-
-
Declaration
-
-
Swift
-
public func serialize () -> Data
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Full-width multiplication and division
-
-
-
-
-
-
-
-
-
-
-
-
Divide this integer by y
and return the resulting quotient and remainder.
-
-
Complexity
- O(count^2)
-
-
-
-
-
-
Declaration
-
-
Swift
-
public func quotientAndRemainder ( dividingBy y : BigInt ) -> ( quotient : BigInt , remainder : BigInt )
-
-
-
-
-
Return Value
-
(quotient, remainder)
where quotient = floor(self/y)
, remainder = self - quotient * y
-
-
-
-
-
-
-
-
-
-
-
-
-
Divide a
by b
and return the quotient. Traps if b
is zero.
-
-
-
-
Declaration
-
-
Swift
-
public static func / ( a : BigInt , b : BigInt ) -> BigInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Divide a
by b
and return the remainder. The result has the same sign as a
.
-
-
-
-
Declaration
-
-
Swift
-
public static func % ( a : BigInt , b : BigInt ) -> BigInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Return the result of a
mod b
. The result is always a nonnegative integer that is less than the absolute value of b
.
-
-
-
-
Declaration
-
-
Swift
-
public func modulus ( _ mod : BigInt ) -> BigInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Divide a
by b
storing the quotient in a
.
-
-
-
-
Declaration
-
-
Swift
-
public static func /= ( a : inout BigInt , b : BigInt )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Divide a
by b
storing the remainder in a
.
-
-
-
-
Declaration
-
-
Swift
-
public static func %= ( a : inout BigInt , b : BigInt )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Returns this integer raised to the power exponent
.
-
-
This function calculates the result by successively squaring the base while halving the exponent .
-
-
Note
- This function can be unreasonably expensive for large exponents, which is why
exponent
is
- a simple integer value. If you want to calculate big exponents, you’ll probably need to use
- the modulo arithmetic variant.
-
-
-
See also
-
BigUInt.power(_:, modulus:)
-
-
-
Complexity
- O((exponent * self.count)^log2(3)) or somesuch. The result may require a large amount of memory, too.
-
-
-
-
-
-
Declaration
-
-
Swift
-
public func power ( _ exponent : Int ) -> BigInt
-
-
-
-
-
Return Value
-
1 if exponent == 0
, otherwise self
raised to exponent
. (This implies that 0.power(0) == 1
.)
-
-
-
-
-
-
-
-
-
-
-
-
-
Returns the remainder of this integer raised to the power exponent
in modulo arithmetic under modulus
.
-
-
Uses the right-to-left binary method .
-
-
Complexity
- O(exponent.count * modulus.count^log2(3)) or somesuch
-
-
-
-
-
-
Declaration
-
-
Swift
-
public func power ( _ exponent : BigInt , modulus : BigInt ) -> BigInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public init ? < T > ( exactly source : T ) where T : BinaryFloatingPoint
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public init < T > ( _ source : T ) where T : BinaryFloatingPoint
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Returns the greatest common divisor of a
and b
.
-
-
Complexity
- O(count^2) where count = max(a.count, b.count)
-
-
-
-
-
-
Declaration
-
-
Swift
-
public func greatestCommonDivisor ( with b : BigInt ) -> BigInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public func inverse ( _ modulus : BigInt ) -> BigInt ?
-
-
-
-
-
Return Value
-
If gcd(self, modulus) == 1
, the value returned is an integer a < modulus
such that (a * self) % modulus == 1
. If self
and modulus
aren’t coprime, the return value is nil
.
-
-
-
-
-
-
-
-
-
-
-
-
-
Append this BigInt
to the specified hasher.
-
-
-
-
Declaration
-
-
Swift
-
public func hash ( into hasher : inout Hasher )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public init ()
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Initializes a new signed big integer with the same value as the specified unsigned big integer.
-
-
-
-
Declaration
-
-
Swift
-
public init ( _ integer : BigUInt )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public init < T > ( _ source : T ) where T : BinaryInteger
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public init ? < T > ( exactly source : T ) where T : BinaryInteger
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public init < T > ( clamping source : T ) where T : BinaryInteger
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public init < T > ( truncatingIfNeeded source : T ) where T : BinaryInteger
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Initialize a new big integer from an integer literal.
-
-
-
-
Declaration
-
-
Swift
-
public init ( integerLiteral value : Int64 )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Multiply a
with b
and return the result.
-
-
-
-
Declaration
-
-
Swift
-
public static func * ( a : BigInt , b : BigInt ) -> BigInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Multiply a
with b
in place.
-
-
-
-
Declaration
-
-
Swift
-
public static func *= ( a : inout BigInt , b : BigInt )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Primality Testing
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public func isStrongProbablePrime ( _ base : BigInt ) -> Bool
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Returns true if this integer is probably prime. Returns false if this integer is definitely not prime.
-
-
This function performs a probabilistic Miller-Rabin Primality Test , consisting of rounds
iterations,
-each calculating the strong probable prime test for a random base. The number of rounds is 10 by default,
-but you may specify your own choice.
-
-
To speed things up, the function checks if self
is divisible by the first few prime numbers before
-diving into (slower) Miller-Rabin testing.
-
-
Also, when self
is less than 82 bits wide, isPrime
does a deterministic test that is guaranteed to
-return a correct result.
-
-
-
-
Declaration
-
-
Swift
-
public func isPrime ( rounds : Int = 10 ) -> Bool
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func &<< ( left : BigInt , right : BigInt ) -> BigInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func &<<= ( left : inout BigInt , right : BigInt )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func &>> ( left : BigInt , right : BigInt ) -> BigInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func &>>= ( left : inout BigInt , right : BigInt )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func << < Other > ( lhs : BigInt , rhs : Other ) -> BigInt where Other : BinaryInteger
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func <<= < Other > ( lhs : inout BigInt , rhs : Other ) where Other : BinaryInteger
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func >> < Other > ( lhs : BigInt , rhs : Other ) -> BigInt where Other : BinaryInteger
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func >>= < Other > ( lhs : inout BigInt , rhs : Other ) where Other : BinaryInteger
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Returns the integer square root of a big integer; i.e., the largest integer whose square isn’t greater than value
.
-
-
Requires
- self >= 0
-
-
-
-
-
-
Declaration
-
-
Swift
-
public func squareRoot () -> BigInt
-
-
-
-
-
Return Value
-
floor(sqrt(self))
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public typealias Stride = BigInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public func advanced ( by n : Stride ) -> BigInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Returns other - self
.
-
-
-
-
Declaration
-
-
Swift
-
public func distance ( to other : BigInt ) -> Stride
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Initialize a big integer from an ASCII representation in a given radix. Numerals above 9
are represented by
-letters from the English alphabet.
-
-
Requires
-
radix > 1 && radix < 36
-
-
-
-
-
-
Declaration
-
-
Swift
-
public init ? < S > ( _ text : S , radix : Int = 10 ) where S : StringProtocol
-
-
-
-
-
Return Value
-
The integer represented by text
, or nil if text
contains a character that does not represent a numeral in radix
.
-
-
-
-
-
-
-
-
-
-
-
-
-
Initialize a new big integer from a Unicode scalar.
-The scalar must represent a decimal digit.
-
-
-
-
Declaration
-
-
Swift
-
public init ( unicodeScalarLiteral value : UnicodeScalar )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Initialize a new big integer from an extended grapheme cluster.
-The cluster must consist of a decimal digit.
-
-
-
-
Declaration
-
-
Swift
-
public init ( extendedGraphemeClusterLiteral value : String )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Initialize a new big integer from a decimal number represented by a string literal of arbitrary length.
-The string must contain only decimal digits.
-
-
-
-
Declaration
-
-
Swift
-
public init ( stringLiteral value : StringLiteralType )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Return the decimal representation of this integer.
-
-
-
-
Declaration
-
-
Swift
-
public var description : String { get }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Return the playground quick look representation of this integer.
-
-
-
-
Declaration
-
-
Swift
-
public var playgroundDescription : Any { get }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public mutating func negate ()
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Subtract b
from a
and return the result.
-
-
-
-
Declaration
-
-
Swift
-
public static func - ( a : BigInt , b : BigInt ) -> BigInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Subtract b
from a
in place.
-
-
-
-
Declaration
-
-
Swift
-
public static func -= ( a : inout BigInt , b : BigInt )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public var bitWidth : Int { get }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public var trailingZeroBitCount : Int { get }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public struct Words : RandomAccessCollection
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public var words : Words { get }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public init < S > ( words : S ) where S : Sequence , S . Element == BigInt . Word
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Carthage/Checkouts/BigInt/docs/Structs/BigInt/Sign.html b/Carthage/Checkouts/BigInt/docs/Structs/BigInt/Sign.html
deleted file mode 100644
index 93984a5b3..000000000
--- a/Carthage/Checkouts/BigInt/docs/Structs/BigInt/Sign.html
+++ /dev/null
@@ -1,189 +0,0 @@
-
-
-
- Sign Enumeration Reference
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- BigInt Reference
-
- Sign Enumeration Reference
-
-
-
-
-
-
-
-
-
-
-
Sign
-
-
Undocumented
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Carthage/Checkouts/BigInt/docs/Structs/BigInt/Words.html b/Carthage/Checkouts/BigInt/docs/Structs/BigInt/Words.html
deleted file mode 100644
index d070e5056..000000000
--- a/Carthage/Checkouts/BigInt/docs/Structs/BigInt/Words.html
+++ /dev/null
@@ -1,302 +0,0 @@
-
-
-
- Words Structure Reference
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- BigInt Reference
-
- Words Structure Reference
-
-
-
-
-
-
-
-
-
-
-
Words
-
-
-
-
public struct Words : RandomAccessCollection
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public typealias Indices = CountableRange < Int >
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public var count : Int { get }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public var indices : Indices { get }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public var startIndex : Int { get }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public var endIndex : Int { get }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public subscript ( index : Int ) -> UInt { get }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Carthage/Checkouts/BigInt/docs/Structs/BigUInt.html b/Carthage/Checkouts/BigInt/docs/Structs/BigUInt.html
deleted file mode 100644
index 5d164ca90..000000000
--- a/Carthage/Checkouts/BigInt/docs/Structs/BigUInt.html
+++ /dev/null
@@ -1,3220 +0,0 @@
-
-
-
- BigUInt Structure Reference
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- BigInt Reference
-
- BigUInt Structure Reference
-
-
-
-
-
-
-
-
-
-
-
BigUInt
-
-
-
-
public struct BigUInt : UnsignedInteger
-
extension BigUInt : Codable
-
extension BigUInt : Comparable
-
extension BigUInt : Hashable
-
extension BigUInt : ExpressibleByIntegerLiteral
-
extension BigUInt : Strideable
-
extension BigUInt : ExpressibleByStringLiteral
-
extension BigUInt : CustomStringConvertible
-
extension BigUInt : CustomPlaygroundDisplayConvertible
-
-
-
-
An arbitary precision unsigned integer type, also known as a “big integer”.
-
-
Operations on big integers never overflow, but they may take a long time to execute.
-The amount of memory (and address space) available is the only constraint to the magnitude of these numbers.
-
-
This particular big integer type uses base-2^64 digits to represent integers; you can think of it as a wrapper
-around Array<UInt64>
. (In fact, BigUInt
only uses an array if there are more than two digits.)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
The type representing a digit in BigUInt
‘s underlying number system.
-
-
-
-
Declaration
-
-
Swift
-
public typealias Word = UInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Initializes a new BigUInt with value 0.
-
-
-
-
Declaration
-
-
Swift
-
public init ()
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Initializes a new BigUInt with the specified digits. The digits are ordered from least to most significant.
-
-
-
-
Declaration
-
-
Swift
-
public init ( words : [ Word ])
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Add a
and b
together and return the result.
-
-
Complexity
- O(max(a.count, b.count))
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func + ( a : BigUInt , b : BigUInt ) -> BigUInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Add a
and b
together, and store the sum in a
.
-
-
Complexity
- O(max(a.count, b.count))
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func += ( a : inout BigUInt , b : BigUInt )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static var isSigned : Bool { get }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Returns 1
if this value is, positive; otherwise, 0
.
-
-
-
-
Declaration
-
-
Swift
-
public func signum () -> BigUInt
-
-
-
-
-
Return Value
-
The sign of this number, expressed as an integer of the same type.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Bitwise Operations
-
-
-
-
-
-
-
-
-
-
-
-
Return the ones’ complement of a
.
-
-
Complexity
- O(a.count)
-
-
-
-
-
-
Declaration
-
-
Swift
-
public prefix static func ~ ( a : BigUInt ) -> BigUInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Calculate the bitwise OR of a
and b
, and store the result in a
.
-
-
Complexity
- O(max(a.count, b.count))
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func |= ( a : inout BigUInt , b : BigUInt )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Calculate the bitwise AND of a
and b
and return the result.
-
-
Complexity
- O(max(a.count, b.count))
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func &= ( a : inout BigUInt , b : BigUInt )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Calculate the bitwise XOR of a
and b
and return the result.
-
-
Complexity
- O(max(a.count, b.count))
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func ^= ( a : inout BigUInt , b : BigUInt )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public init ( from decoder : Decoder ) throws
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public func encode ( to encoder : Encoder ) throws
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Compare a
to b
and return an NSComparisonResult
indicating their order.
-
-
Complexity
- O(count)
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func compare ( _ a : BigUInt , _ b : BigUInt ) -> ComparisonResult
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Return true iff a
is equal to b
.
-
-
Complexity
- O(count)
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func == ( a : BigUInt , b : BigUInt ) -> Bool
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Return true iff a
is less than b
.
-
-
Complexity
- O(count)
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func < ( a : BigUInt , b : BigUInt ) -> Bool
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
NSData Conversion
-
-
-
-
-
-
-
-
-
-
-
-
Initialize a BigInt from bytes accessed from an UnsafeRawBufferPointer
-
-
-
-
Declaration
-
-
Swift
-
public init ( _ buffer : UnsafeRawBufferPointer )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Initializes an integer from the bits stored inside a piece of Data
.
-The data is assumed to be in network (big-endian) byte order.
-
-
-
-
Declaration
-
-
Swift
-
public init ( _ data : Data )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Return a Data
value that contains the base-256 representation of this integer, in network (big-endian) byte order.
-
-
-
-
Declaration
-
-
Swift
-
public func serialize () -> Data
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Divide this integer by y
and return the resulting quotient and remainder.
-
-
Complexity
- O(count^2)
-
-
-
-
-
-
Declaration
-
-
Swift
-
public func quotientAndRemainder ( dividingBy y : BigUInt ) -> ( quotient : BigUInt , remainder : BigUInt )
-
-
-
-
-
Return Value
-
(quotient, remainder)
where quotient = floor(self/y)
, remainder = self - quotient * y
-
-
-
-
-
-
-
-
-
-
-
-
-
Divide x
by y
and return the quotient.
-
-
Note
- Use
divided(by:)
if you also need the remainder.
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func / ( x : BigUInt , y : BigUInt ) -> BigUInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Divide x
by y
and return the remainder.
-
-
Note
- Use
divided(by:)
if you also need the remainder.
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func % ( x : BigUInt , y : BigUInt ) -> BigUInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Divide x
by y
and store the quotient in x
.
-
-
Note
- Use
divided(by:)
if you also need the remainder.
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func /= ( x : inout BigUInt , y : BigUInt )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Divide x
by y
and store the remainder in x
.
-
-
Note
- Use
divided(by:)
if you also need the remainder.
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func %= ( x : inout BigUInt , y : BigUInt )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Returns this integer raised to the power exponent
.
-
-
This function calculates the result by successively squaring the base while halving the exponent .
-
-
Note
- This function can be unreasonably expensive for large exponents, which is why
exponent
is
- a simple integer value. If you want to calculate big exponents, you’ll probably need to use
- the modulo arithmetic variant.
-
-
-
See also
-
BigUInt.power(_:, modulus:)
-
-
-
Complexity
- O((exponent * self.count)^log2(3)) or somesuch. The result may require a large amount of memory, too.
-
-
-
-
-
-
Declaration
-
-
Swift
-
public func power ( _ exponent : Int ) -> BigUInt
-
-
-
-
-
Return Value
-
1 if exponent == 0
, otherwise self
raised to exponent
. (This implies that 0.power(0) == 1
.)
-
-
-
-
-
-
-
-
-
-
-
-
-
Returns the remainder of this integer raised to the power exponent
in modulo arithmetic under modulus
.
-
-
Uses the right-to-left binary method .
-
-
Complexity
- O(exponent.count * modulus.count^log2(3)) or somesuch
-
-
-
-
-
-
Declaration
-
-
Swift
-
public func power ( _ exponent : BigUInt , modulus : BigUInt ) -> BigUInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public init ? < T > ( exactly source : T ) where T : BinaryFloatingPoint
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public init < T > ( _ source : T ) where T : BinaryFloatingPoint
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Greatest Common Divisor
-
-
-
-
-
-
-
-
-
-
-
-
Returns the greatest common divisor of self
and b
.
-
-
Complexity
- O(count^2) where count = max(self.count, b.count)
-
-
-
-
-
-
Declaration
-
-
Swift
-
public func greatestCommonDivisor ( with b : BigUInt ) -> BigUInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public func inverse ( _ modulus : BigUInt ) -> BigUInt ?
-
-
-
-
-
Return Value
-
If gcd(self, modulus) == 1
, the value returned is an integer a < modulus
such that (a * self) % modulus == 1
. If self
and modulus
aren’t coprime, the return value is nil
.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Append this BigUInt
to the specified hasher.
-
-
-
-
Declaration
-
-
Swift
-
public func hash ( into hasher : inout Hasher )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public init ? < T > ( exactly source : T ) where T : BinaryInteger
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public init < T > ( _ source : T ) where T : BinaryInteger
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public init < T > ( truncatingIfNeeded source : T ) where T : BinaryInteger
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public init < T > ( clamping source : T ) where T : BinaryInteger
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Initialize a new big integer from an integer literal.
-
-
-
-
Declaration
-
-
Swift
-
public init ( integerLiteral value : UInt64 )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Multiply this big integer by a single word, and store the result in place of the original big integer.
-
-
Complexity
- O(count)
-
-
-
-
-
-
Declaration
-
-
Swift
-
public mutating func multiply ( byWord y : Word )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Multiply this big integer by a single Word, and return the result.
-
-
Complexity
- O(count)
-
-
-
-
-
-
Declaration
-
-
Swift
-
public func multiplied ( byWord y : Word ) -> BigUInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Multiply x
by y
, and add the result to this integer, optionally shifted shift
words to the left.
-
-
Note
- This is the fused multiply/shift/add operation; it is more efficient than doing the components
-individually. (The fused operation doesn’t need to allocate space for temporary big integers.)
-
-
-
Complexity
- O(count)
-
-
-
-
-
-
Declaration
-
-
Swift
-
public mutating func multiplyAndAdd ( _ x : BigUInt , _ y : Word , shiftedBy shift : Int = 0 )
-
-
-
-
-
Return Value
-
self
is set to self + (x * y) << (shift * 2^Word.bitWidth)
-
-
-
-
-
-
-
-
-
-
-
-
-
Multiply this integer by y
and return the result.
-
-
Complexity
- O(n^log2(3))
-
-
-
-
-
-
Declaration
-
-
Swift
-
public func multiplied ( by y : BigUInt ) -> BigUInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Multiplication switches to an asymptotically better recursive algorithm when arguments have more words than this limit.
-
-
-
-
Declaration
-
-
Swift
-
public static var directMultiplicationLimit : Int
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Multiply a
by b
and return the result.
-
-
Complexity
- O(n^log2(3))
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func * ( x : BigUInt , y : BigUInt ) -> BigUInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Multiply a
by b
and store the result in a
.
-
-
-
-
Declaration
-
-
Swift
-
public static func *= ( a : inout BigUInt , b : BigUInt )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Primality Testing
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public func isStrongProbablePrime ( _ base : BigUInt ) -> Bool
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Returns true if this integer is probably prime. Returns false if this integer is definitely not prime.
-
-
This function performs a probabilistic Miller-Rabin Primality Test , consisting of rounds
iterations,
-each calculating the strong probable prime test for a random base. The number of rounds is 10 by default,
-but you may specify your own choice.
-
-
To speed things up, the function checks if self
is divisible by the first few prime numbers before
-diving into (slower) Miller-Rabin testing.
-
-
Also, when self
is less than 82 bits wide, isPrime
does a deterministic test that is guaranteed to
-return a correct result.
-
-
-
-
Declaration
-
-
Swift
-
public func isPrime ( rounds : Int = 10 ) -> Bool
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Create a big unsigned integer consisting of width
uniformly distributed random bits.
-
-
-
-
Declaration
-
-
Swift
-
public static func randomInteger < RNG > ( withMaximumWidth width : Int , using generator : inout RNG ) -> BigUInt where RNG : RandomNumberGenerator
-
-
-
-
-
Parameters
-
-
-
-
-
- width
-
-
-
-
-
The maximum number of one bits in the result.
-
-
-
-
-
-
- generator
-
-
-
-
-
The source of randomness.
-
-
-
-
-
-
-
-
Return Value
-
A big unsigned integer less than 1 << width
.
-
-
-
-
-
-
-
-
-
-
-
-
-
Create a big unsigned integer consisting of width
uniformly distributed random bits.
-
-
Note
-
I use a SystemRandomGeneratorGenerator
as the source of randomness.
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func randomInteger ( withMaximumWidth width : Int ) -> BigUInt
-
-
-
-
-
Parameters
-
-
-
-
-
- width
-
-
-
-
-
The maximum number of one bits in the result.
-
-
-
-
-
-
-
-
Return Value
-
A big unsigned integer less than 1 << width
.
-
-
-
-
-
-
-
-
-
-
-
-
-
Create a big unsigned integer consisting of width-1
uniformly distributed random bits followed by a one bit.
-
-
Note
-
If width
is zero, the result is zero.
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func randomInteger < RNG > ( withExactWidth width : Int , using generator : inout RNG ) -> BigUInt where RNG : RandomNumberGenerator
-
-
-
-
-
Parameters
-
-
-
-
-
- width
-
-
-
-
-
The number of bits required to represent the answer.
-
-
-
-
-
-
- generator
-
-
-
-
-
The source of randomness.
-
-
-
-
-
-
-
-
Return Value
-
A random big unsigned integer whose width is width
.
-
-
-
-
-
-
-
-
-
-
-
-
-
Create a big unsigned integer consisting of width-1
uniformly distributed random bits followed by a one bit.
-
-
Note
- If
width
is zero, the result is zero.
-
-
-
Note
-
I use a SystemRandomGeneratorGenerator
as the source of randomness.
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func randomInteger ( withExactWidth width : Int ) -> BigUInt
-
-
-
-
-
Return Value
-
A random big unsigned integer whose width is width
.
-
-
-
-
-
-
-
-
-
-
-
-
-
Create a uniformly distributed random unsigned integer that’s less than the specified limit.
-
-
Precondition
-
limit > 0
.
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func randomInteger < RNG > ( lessThan limit : BigUInt , using generator : inout RNG ) -> BigUInt where RNG : RandomNumberGenerator
-
-
-
-
-
Parameters
-
-
-
-
-
- limit
-
-
-
-
-
The upper bound on the result.
-
-
-
-
-
-
- generator
-
-
-
-
-
The source of randomness.
-
-
-
-
-
-
-
-
Return Value
-
A random big unsigned integer that is less than limit
.
-
-
-
-
-
-
-
-
-
-
-
-
-
Create a uniformly distributed random unsigned integer that’s less than the specified limit.
-
-
Precondition
-
limit > 0
.
-
-
-
Note
-
I use a SystemRandomGeneratorGenerator
as the source of randomness.
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func randomInteger ( lessThan limit : BigUInt ) -> BigUInt
-
-
-
-
-
Parameters
-
-
-
-
-
- limit
-
-
-
-
-
The upper bound on the result.
-
-
-
-
-
-
-
-
Return Value
-
A random big unsigned integer that is less than limit
.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func >>= < Other > ( lhs : inout BigUInt , rhs : Other ) where Other : BinaryInteger
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func <<= < Other > ( lhs : inout BigUInt , rhs : Other ) where Other : BinaryInteger
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func >> < Other > ( lhs : BigUInt , rhs : Other ) -> BigUInt where Other : BinaryInteger
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func << < Other > ( lhs : BigUInt , rhs : Other ) -> BigUInt where Other : BinaryInteger
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Returns the integer square root of a big integer; i.e., the largest integer whose square isn’t greater than value
.
-
-
-
-
Declaration
-
-
Swift
-
public func squareRoot () -> BigUInt
-
-
-
-
-
Return Value
-
floor(sqrt(self))
-
-
-
-
-
-
-
-
-
-
-
-
-
A type that can represent the distance between two values ofa BigUInt
.
-
-
-
-
Declaration
-
-
Swift
-
public typealias Stride = BigInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Adds n
to self
and returns the result. Traps if the result would be less than zero.
-
-
-
-
Declaration
-
-
Swift
-
public func advanced ( by n : BigInt ) -> BigUInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Returns the (potentially negative) difference between self
and other
as a BigInt
. Never traps.
-
-
-
-
Declaration
-
-
Swift
-
public func distance ( to other : BigUInt ) -> BigInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
String Conversion
-
-
-
-
-
-
-
-
-
-
-
-
Initialize a big integer from an ASCII representation in a given radix. Numerals above 9
are represented by
-letters from the English alphabet.
-
-
Requires
-
radix > 1 && radix < 36
-
-
-
-
-
-
Declaration
-
-
Swift
-
public init ? < S > ( _ text : S , radix : Int = 10 ) where S : StringProtocol
-
-
-
-
-
Return Value
-
The integer represented by text
, or nil if text
contains a character that does not represent a numeral in radix
.
-
-
-
-
-
-
-
-
-
-
-
-
-
Initialize a new big integer from a Unicode scalar.
-The scalar must represent a decimal digit.
-
-
-
-
Declaration
-
-
Swift
-
public init ( unicodeScalarLiteral value : UnicodeScalar )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Initialize a new big integer from an extended grapheme cluster.
-The cluster must consist of a decimal digit.
-
-
-
-
Declaration
-
-
Swift
-
public init ( extendedGraphemeClusterLiteral value : String )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Initialize a new big integer from a decimal number represented by a string literal of arbitrary length.
-The string must contain only decimal digits.
-
-
-
-
Declaration
-
-
Swift
-
public init ( stringLiteral value : StringLiteralType )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Return the decimal representation of this integer.
-
-
-
-
Declaration
-
-
Swift
-
public var description : String { get }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Return the playground quick look representation of this integer.
-
-
-
-
Declaration
-
-
Swift
-
public var playgroundDescription : Any { get }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Subtract other
from this integer in place, and return a flag indicating if the operation caused an
-arithmetic overflow. other
is shifted shift
digits to the left before being subtracted.
-
-
Note
- If the result indicates an overflow, then
self
becomes the twos’ complement of the absolute difference.
-
-
-
Complexity
- O(count)
-
-
-
-
-
-
Declaration
-
-
Swift
-
public mutating func subtractReportingOverflow ( _ b : BigUInt , shiftedBy shift : Int = 0 ) -> Bool
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Subtract other
from this integer, returning the difference and a flag indicating arithmetic overflow.
-other
is shifted shift
digits to the left before being subtracted.
-
-
Note
- If
overflow
is true, then the result value is the twos’ complement of the absolute value of the difference.
-
-
-
Complexity
- O(count)
-
-
-
-
-
-
Declaration
-
-
Swift
-
public func subtractingReportingOverflow ( _ other : BigUInt , shiftedBy shift : Int ) -> ( partialValue : BigUInt , overflow : Bool )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Subtracts other
from self
, returning the result and a flag indicating arithmetic overflow.
-
-
Note
- When the operation overflows, then
partialValue
is the twos’ complement of the absolute value of the difference.
-
-
-
Complexity
- O(count)
-
-
-
-
-
-
Declaration
-
-
Swift
-
public func subtractingReportingOverflow ( _ other : BigUInt ) -> ( partialValue : BigUInt , overflow : Bool )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Subtract other
from this integer in place.
-other
is shifted shift
digits to the left before being subtracted.
-
-
Requires
- self >= other * 2^shift
-
-
-
Complexity
- O(count)
-
-
-
-
-
-
Declaration
-
-
Swift
-
public mutating func subtract ( _ other : BigUInt , shiftedBy shift : Int = 0 )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Subtract b
from this integer, and return the difference.
-b
is shifted shift
digits to the left before being subtracted.
-
-
Requires
- self >= b * 2^shift
-
-
-
Complexity
- O(count)
-
-
-
-
-
-
Declaration
-
-
Swift
-
public func subtracting ( _ other : BigUInt , shiftedBy shift : Int = 0 ) -> BigUInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Decrement this integer by one.
-
-
Complexity
- O(count)
-
-
-
-
-
-
Declaration
-
-
Swift
-
public mutating func decrement ( shiftedBy shift : Int = 0 )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Subtract b
from a
and return the result.
-
-
Complexity
- O(a.count)
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func - ( a : BigUInt , b : BigUInt ) -> BigUInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Subtract b
from a
and store the result in a
.
-
-
Complexity
- O(a.count)
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func -= ( a : inout BigUInt , b : BigUInt )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public subscript ( bitAt index : Int ) -> Bool { get set }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
The minimum number of bits required to represent this integer in binary.
-
-
-
-
-
Declaration
-
-
Swift
-
public var bitWidth : Int { get }
-
-
-
-
-
Return Value
-
floor(log2(2 * self + 1))
-
-
-
-
-
-
-
-
-
-
-
-
-
The number of leading zero bits in the binary representation of this integer in base 2^(Word.bitWidth)
.
-This is useful when you need to normalize a BigUInt
such that the top bit of its most significant word is 1.
-
-
Note
- 0 is considered to have zero leading zero bits.
-
-
-
-
-
-
Declaration
-
-
Swift
-
public var leadingZeroBitCount : Int { get }
-
-
-
-
-
Return Value
-
A value in 0...(Word.bitWidth - 1)
.
-
-
-
-
-
-
-
-
-
-
-
-
-
The number of trailing zero bits in the binary representation of this integer.
-
-
Note
- 0 is considered to have zero trailing zero bits.
-
-
-
Complexity
- O(count)
-
-
-
-
-
-
Declaration
-
-
Swift
-
public var trailingZeroBitCount : Int { get }
-
-
-
-
-
Return Value
-
A value in 0...width
.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public struct Words : RandomAccessCollection
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public var words : Words { get }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Carthage/Checkouts/BigInt/docs/Structs/BigUInt/Words.html b/Carthage/Checkouts/BigInt/docs/Structs/BigUInt/Words.html
deleted file mode 100644
index 0c13a2f7a..000000000
--- a/Carthage/Checkouts/BigInt/docs/Structs/BigUInt/Words.html
+++ /dev/null
@@ -1,215 +0,0 @@
-
-
-
- Words Structure Reference
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- BigInt Reference
-
- Words Structure Reference
-
-
-
-
-
-
-
-
-
-
-
Words
-
-
-
-
public struct Words : RandomAccessCollection
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public var startIndex : Int { get }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public var endIndex : Int { get }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public subscript ( index : Int ) -> Word { get }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Carthage/Checkouts/BigInt/docs/badge.svg b/Carthage/Checkouts/BigInt/docs/badge.svg
deleted file mode 100644
index 09c230060..000000000
--- a/Carthage/Checkouts/BigInt/docs/badge.svg
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- documentation
-
-
- documentation
-
-
- 85%
-
-
- 85%
-
-
-
diff --git a/Carthage/Checkouts/BigInt/docs/css/highlight.css b/Carthage/Checkouts/BigInt/docs/css/highlight.css
deleted file mode 100644
index d0db0e13b..000000000
--- a/Carthage/Checkouts/BigInt/docs/css/highlight.css
+++ /dev/null
@@ -1,200 +0,0 @@
-/* Credit to https://gist.github.com/wataru420/2048287 */
-.highlight {
- /* Comment */
- /* Error */
- /* Keyword */
- /* Operator */
- /* Comment.Multiline */
- /* Comment.Preproc */
- /* Comment.Single */
- /* Comment.Special */
- /* Generic.Deleted */
- /* Generic.Deleted.Specific */
- /* Generic.Emph */
- /* Generic.Error */
- /* Generic.Heading */
- /* Generic.Inserted */
- /* Generic.Inserted.Specific */
- /* Generic.Output */
- /* Generic.Prompt */
- /* Generic.Strong */
- /* Generic.Subheading */
- /* Generic.Traceback */
- /* Keyword.Constant */
- /* Keyword.Declaration */
- /* Keyword.Pseudo */
- /* Keyword.Reserved */
- /* Keyword.Type */
- /* Literal.Number */
- /* Literal.String */
- /* Name.Attribute */
- /* Name.Builtin */
- /* Name.Class */
- /* Name.Constant */
- /* Name.Entity */
- /* Name.Exception */
- /* Name.Function */
- /* Name.Namespace */
- /* Name.Tag */
- /* Name.Variable */
- /* Operator.Word */
- /* Text.Whitespace */
- /* Literal.Number.Float */
- /* Literal.Number.Hex */
- /* Literal.Number.Integer */
- /* Literal.Number.Oct */
- /* Literal.String.Backtick */
- /* Literal.String.Char */
- /* Literal.String.Doc */
- /* Literal.String.Double */
- /* Literal.String.Escape */
- /* Literal.String.Heredoc */
- /* Literal.String.Interpol */
- /* Literal.String.Other */
- /* Literal.String.Regex */
- /* Literal.String.Single */
- /* Literal.String.Symbol */
- /* Name.Builtin.Pseudo */
- /* Name.Variable.Class */
- /* Name.Variable.Global */
- /* Name.Variable.Instance */
- /* Literal.Number.Integer.Long */ }
- .highlight .c {
- color: #999988;
- font-style: italic; }
- .highlight .err {
- color: #a61717;
- background-color: #e3d2d2; }
- .highlight .k {
- color: #000000;
- font-weight: bold; }
- .highlight .o {
- color: #000000;
- font-weight: bold; }
- .highlight .cm {
- color: #999988;
- font-style: italic; }
- .highlight .cp {
- color: #999999;
- font-weight: bold; }
- .highlight .c1 {
- color: #999988;
- font-style: italic; }
- .highlight .cs {
- color: #999999;
- font-weight: bold;
- font-style: italic; }
- .highlight .gd {
- color: #000000;
- background-color: #ffdddd; }
- .highlight .gd .x {
- color: #000000;
- background-color: #ffaaaa; }
- .highlight .ge {
- color: #000000;
- font-style: italic; }
- .highlight .gr {
- color: #aa0000; }
- .highlight .gh {
- color: #999999; }
- .highlight .gi {
- color: #000000;
- background-color: #ddffdd; }
- .highlight .gi .x {
- color: #000000;
- background-color: #aaffaa; }
- .highlight .go {
- color: #888888; }
- .highlight .gp {
- color: #555555; }
- .highlight .gs {
- font-weight: bold; }
- .highlight .gu {
- color: #aaaaaa; }
- .highlight .gt {
- color: #aa0000; }
- .highlight .kc {
- color: #000000;
- font-weight: bold; }
- .highlight .kd {
- color: #000000;
- font-weight: bold; }
- .highlight .kp {
- color: #000000;
- font-weight: bold; }
- .highlight .kr {
- color: #000000;
- font-weight: bold; }
- .highlight .kt {
- color: #445588; }
- .highlight .m {
- color: #009999; }
- .highlight .s {
- color: #d14; }
- .highlight .na {
- color: #008080; }
- .highlight .nb {
- color: #0086B3; }
- .highlight .nc {
- color: #445588;
- font-weight: bold; }
- .highlight .no {
- color: #008080; }
- .highlight .ni {
- color: #800080; }
- .highlight .ne {
- color: #990000;
- font-weight: bold; }
- .highlight .nf {
- color: #990000; }
- .highlight .nn {
- color: #555555; }
- .highlight .nt {
- color: #000080; }
- .highlight .nv {
- color: #008080; }
- .highlight .ow {
- color: #000000;
- font-weight: bold; }
- .highlight .w {
- color: #bbbbbb; }
- .highlight .mf {
- color: #009999; }
- .highlight .mh {
- color: #009999; }
- .highlight .mi {
- color: #009999; }
- .highlight .mo {
- color: #009999; }
- .highlight .sb {
- color: #d14; }
- .highlight .sc {
- color: #d14; }
- .highlight .sd {
- color: #d14; }
- .highlight .s2 {
- color: #d14; }
- .highlight .se {
- color: #d14; }
- .highlight .sh {
- color: #d14; }
- .highlight .si {
- color: #d14; }
- .highlight .sx {
- color: #d14; }
- .highlight .sr {
- color: #009926; }
- .highlight .s1 {
- color: #d14; }
- .highlight .ss {
- color: #990073; }
- .highlight .bp {
- color: #999999; }
- .highlight .vc {
- color: #008080; }
- .highlight .vg {
- color: #008080; }
- .highlight .vi {
- color: #008080; }
- .highlight .il {
- color: #009999; }
diff --git a/Carthage/Checkouts/BigInt/docs/css/jazzy.css b/Carthage/Checkouts/BigInt/docs/css/jazzy.css
deleted file mode 100644
index ff59f5f86..000000000
--- a/Carthage/Checkouts/BigInt/docs/css/jazzy.css
+++ /dev/null
@@ -1,395 +0,0 @@
-*, *:before, *:after {
- box-sizing: inherit; }
-
-body {
- margin: 0;
- background: #fff;
- color: #333;
- font: 16px/1.7 "Helvetica Neue", Helvetica, Arial, sans-serif;
- letter-spacing: .2px;
- -webkit-font-smoothing: antialiased;
- box-sizing: border-box; }
-
-h1 {
- font-size: 2rem;
- font-weight: 700;
- margin: 1.275em 0 0.6em; }
-
-h2 {
- font-size: 1.75rem;
- font-weight: 700;
- margin: 1.275em 0 0.3em; }
-
-h3 {
- font-size: 1.5rem;
- font-weight: 700;
- margin: 1em 0 0.3em; }
-
-h4 {
- font-size: 1.25rem;
- font-weight: 700;
- margin: 1.275em 0 0.85em; }
-
-h5 {
- font-size: 1rem;
- font-weight: 700;
- margin: 1.275em 0 0.85em; }
-
-h6 {
- font-size: 1rem;
- font-weight: 700;
- margin: 1.275em 0 0.85em;
- color: #777; }
-
-p {
- margin: 0 0 1em; }
-
-ul, ol {
- padding: 0 0 0 2em;
- margin: 0 0 0.85em; }
-
-blockquote {
- margin: 0 0 0.85em;
- padding: 0 15px;
- color: #858585;
- border-left: 4px solid #e5e5e5; }
-
-img {
- max-width: 100%; }
-
-a {
- color: #4183c4;
- text-decoration: none; }
- a:hover, a:focus {
- outline: 0;
- text-decoration: underline; }
- a.discouraged {
- text-decoration: line-through; }
- a.discouraged:hover, a.discouraged:focus {
- text-decoration: underline line-through; }
-
-table {
- background: #fff;
- width: 100%;
- border-collapse: collapse;
- border-spacing: 0;
- overflow: auto;
- margin: 0 0 0.85em; }
-
-tr:nth-child(2n) {
- background-color: #fbfbfb; }
-
-th, td {
- padding: 6px 13px;
- border: 1px solid #ddd; }
-
-pre {
- margin: 0 0 1.275em;
- padding: .85em 1em;
- overflow: auto;
- background: #f7f7f7;
- font-size: .85em;
- font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; }
-
-code {
- font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; }
-
-.item-container p > code, .item-container li > code, .top-matter p > code, .top-matter li > code {
- background: #f7f7f7;
- padding: .2em; }
- .item-container p > code:before, .item-container p > code:after, .item-container li > code:before, .item-container li > code:after, .top-matter p > code:before, .top-matter p > code:after, .top-matter li > code:before, .top-matter li > code:after {
- letter-spacing: -.2em;
- content: "\00a0"; }
-
-pre code {
- padding: 0;
- white-space: pre; }
-
-.content-wrapper {
- display: flex;
- flex-direction: column; }
- @media (min-width: 768px) {
- .content-wrapper {
- flex-direction: row; } }
-.header {
- display: flex;
- padding: 8px;
- font-size: 0.875em;
- background: #444;
- color: #999; }
-
-.header-col {
- margin: 0;
- padding: 0 8px; }
-
-.header-col--primary {
- flex: 1; }
-
-.header-link {
- color: #fff; }
-
-.header-icon {
- padding-right: 6px;
- vertical-align: -4px;
- height: 16px; }
-
-.breadcrumbs {
- font-size: 0.875em;
- padding: 8px 16px;
- margin: 0;
- background: #fbfbfb;
- border-bottom: 1px solid #ddd; }
-
-.carat {
- height: 10px;
- margin: 0 5px; }
-
-.navigation {
- order: 2; }
- @media (min-width: 768px) {
- .navigation {
- order: 1;
- width: 25%;
- max-width: 300px;
- padding-bottom: 64px;
- overflow: hidden;
- word-wrap: normal;
- background: #fbfbfb;
- border-right: 1px solid #ddd; } }
-.nav-groups {
- list-style-type: none;
- padding-left: 0; }
-
-.nav-group-name {
- border-bottom: 1px solid #ddd;
- padding: 8px 0 8px 16px; }
-
-.nav-group-name-link {
- color: #333; }
-
-.nav-group-tasks {
- margin: 8px 0;
- padding: 0 0 0 8px; }
-
-.nav-group-task {
- font-size: 1em;
- list-style-type: none;
- white-space: nowrap; }
-
-.nav-group-task-link {
- color: #808080; }
-
-.main-content {
- order: 1; }
- @media (min-width: 768px) {
- .main-content {
- order: 2;
- flex: 1;
- padding-bottom: 60px; } }
-.section {
- padding: 0 32px;
- border-bottom: 1px solid #ddd; }
-
-.section-content {
- max-width: 834px;
- margin: 0 auto;
- padding: 16px 0; }
-
-.section-name {
- color: #666;
- display: block; }
- .section-name p {
- margin-bottom: inherit; }
-
-.declaration .highlight {
- overflow-x: initial;
- padding: 8px 0;
- margin: 0;
- background-color: transparent;
- border: none; }
-
-.task-group-section {
- border-top: 1px solid #ddd; }
-
-.task-group {
- padding-top: 0px; }
-
-.task-name-container a[name]:before {
- content: "";
- display: block; }
-
-.section-name-container {
- position: relative; }
- .section-name-container .section-name-link {
- position: absolute;
- top: 0;
- left: 0;
- bottom: 0;
- right: 0;
- margin-bottom: 0; }
- .section-name-container .section-name {
- position: relative;
- pointer-events: none;
- z-index: 1; }
- .section-name-container .section-name a {
- pointer-events: auto; }
-
-.item-container {
- padding: 0; }
-
-.item {
- padding-top: 8px;
- width: 100%;
- list-style-type: none; }
- .item a[name]:before {
- content: "";
- display: block; }
- .item .token, .item .direct-link {
- display: inline-block;
- text-indent: -20px;
- padding-left: 3px;
- margin-left: 20px;
- font-size: 1rem; }
- .item .declaration-note {
- font-size: .85em;
- color: #808080;
- font-style: italic; }
-
-.pointer-container {
- border-bottom: 1px solid #ddd;
- left: -23px;
- padding-bottom: 13px;
- position: relative;
- width: 110%; }
-
-.pointer {
- left: 21px;
- top: 7px;
- display: block;
- position: absolute;
- width: 12px;
- height: 12px;
- border-left: 1px solid #ddd;
- border-top: 1px solid #ddd;
- background: #fff;
- transform: rotate(45deg); }
-
-.height-container {
- display: none;
- position: relative;
- width: 100%;
- overflow: hidden; }
- .height-container .section {
- background: #fff;
- border: 1px solid #ddd;
- border-top-width: 0;
- padding-top: 10px;
- padding-bottom: 5px;
- padding: 8px 16px; }
-
-.aside, .language {
- padding: 6px 12px;
- margin: 12px 0;
- border-left: 5px solid #dddddd;
- overflow-y: hidden; }
- .aside .aside-title, .language .aside-title {
- font-size: 9px;
- letter-spacing: 2px;
- text-transform: uppercase;
- padding-bottom: 0;
- margin: 0;
- color: #aaa;
- -webkit-user-select: none; }
- .aside p:last-child, .language p:last-child {
- margin-bottom: 0; }
-
-.language {
- border-left: 5px solid #cde9f4; }
- .language .aside-title {
- color: #4183c4; }
-
-.aside-warning, .aside-deprecated, .aside-unavailable {
- border-left: 5px solid #ff6666; }
- .aside-warning .aside-title, .aside-deprecated .aside-title, .aside-unavailable .aside-title {
- color: #ff0000; }
-
-.graybox {
- border-collapse: collapse;
- width: 100%; }
- .graybox p {
- margin: 0;
- word-break: break-word;
- min-width: 50px; }
- .graybox td {
- border: 1px solid #ddd;
- padding: 5px 25px 5px 10px;
- vertical-align: middle; }
- .graybox tr td:first-of-type {
- text-align: right;
- padding: 7px;
- vertical-align: top;
- word-break: normal;
- width: 40px; }
-
-.slightly-smaller {
- font-size: 0.9em; }
-
-.footer {
- padding: 8px 16px;
- background: #444;
- color: #ddd;
- font-size: 0.8em; }
- .footer p {
- margin: 8px 0; }
- .footer a {
- color: #fff; }
-
-html.dash .header, html.dash .breadcrumbs, html.dash .navigation {
- display: none; }
-
-html.dash .height-container {
- display: block; }
-
-form[role=search] input {
- font: 16px/1.7 "Helvetica Neue", Helvetica, Arial, sans-serif;
- font-size: 14px;
- line-height: 24px;
- padding: 0 10px;
- margin: 0;
- border: none;
- border-radius: 1em; }
- .loading form[role=search] input {
- background: white url(../img/spinner.gif) center right 4px no-repeat; }
-
-form[role=search] .tt-menu {
- margin: 0;
- min-width: 300px;
- background: #fbfbfb;
- color: #333;
- border: 1px solid #ddd; }
-
-form[role=search] .tt-highlight {
- font-weight: bold; }
-
-form[role=search] .tt-suggestion {
- font: 16px/1.7 "Helvetica Neue", Helvetica, Arial, sans-serif;
- padding: 0 8px; }
- form[role=search] .tt-suggestion span {
- display: table-cell;
- white-space: nowrap; }
- form[role=search] .tt-suggestion .doc-parent-name {
- width: 100%;
- text-align: right;
- font-weight: normal;
- font-size: 0.9em;
- padding-left: 16px; }
-
-form[role=search] .tt-suggestion:hover,
-form[role=search] .tt-suggestion.tt-cursor {
- cursor: pointer;
- background-color: #4183c4;
- color: #fff; }
-
-form[role=search] .tt-suggestion:hover .doc-parent-name,
-form[role=search] .tt-suggestion.tt-cursor .doc-parent-name {
- color: #fff; }
diff --git a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Info.plist b/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Info.plist
deleted file mode 100644
index 220c951b0..000000000
--- a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Info.plist
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
- CFBundleIdentifier
- com.jazzy.bigint
- CFBundleName
- BigInt
- DocSetPlatformFamily
- bigint
- isDashDocset
-
- dashIndexFilePath
- index.html
- isJavaScriptEnabled
-
- DashDocSetFamily
- dashtoc
- DashDocSetFallbackURL
- https://attaswift.github.io/BigInt/reference/
-
-
diff --git a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Extensions.html b/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Extensions.html
deleted file mode 100644
index 7479e3581..000000000
--- a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Extensions.html
+++ /dev/null
@@ -1,173 +0,0 @@
-
-
-
- Extensions Reference
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- BigInt Reference
-
- Extensions Reference
-
-
-
-
-
-
-
-
-
-
-
Extensions
-
The following extensions are available globally.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
extension BinaryFloatingPoint where RawExponent : FixedWidthInteger , RawSignificand : FixedWidthInteger
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
extension String
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Extensions/BinaryFloatingPoint.html b/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Extensions/BinaryFloatingPoint.html
deleted file mode 100644
index 86bf1c39b..000000000
--- a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Extensions/BinaryFloatingPoint.html
+++ /dev/null
@@ -1,194 +0,0 @@
-
-
-
- BinaryFloatingPoint Extension Reference
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- BigInt Reference
-
- BinaryFloatingPoint Extension Reference
-
-
-
-
-
-
-
-
-
-
-
BinaryFloatingPoint
-
-
-
-
extension BinaryFloatingPoint where RawExponent : FixedWidthInteger , RawSignificand : FixedWidthInteger
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Available where RawExponent
: FixedWidthInteger
, RawSignificand
: FixedWidthInteger
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public init ( _ value : BigInt )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public init ( _ value : BigUInt )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Extensions/String.html b/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Extensions/String.html
deleted file mode 100644
index 8e347fd34..000000000
--- a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Extensions/String.html
+++ /dev/null
@@ -1,244 +0,0 @@
-
-
-
- String Extension Reference
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- BigInt Reference
-
- String Extension Reference
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Initialize a new string with the base-10 representation of an unsigned big integer.
-
-
Complexity
- O(v.count^2)
-
-
-
-
-
-
Declaration
-
-
Swift
-
public init ( _ v : BigUInt )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Initialize a new string representing an unsigned big integer in the given radix (base).
-
-
Numerals greater than 9 are represented as letters from the English alphabet,
-starting with a
if uppercase
is false or A
otherwise.
-
-
Requires
- radix > 1 && radix <= 36
-
-
-
Complexity
- O(count) when radix is a power of two; otherwise O(count^2).
-
-
-
-
-
-
Declaration
-
-
Swift
-
public init ( _ v : BigUInt , radix : Int , uppercase : Bool = false )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Initialize a new string representing a signed big integer in the given radix (base).
-
-
Numerals greater than 9 are represented as letters from the English alphabet,
-starting with a
if uppercase
is false or A
otherwise.
-
-
Requires
- radix > 1 && radix <= 36
-
-
-
Complexity
- O(count) when radix is a power of two; otherwise O(count^2).
-
-
-
-
-
-
Declaration
-
-
Swift
-
public init ( _ value : BigInt , radix : Int = 10 , uppercase : Bool = false )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Structs.html b/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Structs.html
deleted file mode 100644
index 9ae786007..000000000
--- a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Structs.html
+++ /dev/null
@@ -1,229 +0,0 @@
-
-
-
- Structures Reference
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- BigInt Reference
-
- Structures Reference
-
-
-
-
-
-
-
-
-
-
-
Structures
-
The following structures are available globally.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
An arbitary precision unsigned integer type, also known as a “big integer”.
-
-
Operations on big integers never overflow, but they may take a long time to execute.
-The amount of memory (and address space) available is the only constraint to the magnitude of these numbers.
-
-
This particular big integer type uses base-2^64 digits to represent integers; you can think of it as a wrapper
-around Array<UInt64>
. (In fact, BigUInt
only uses an array if there are more than two digits.)
-
-
See more
-
-
-
Declaration
-
-
Swift
-
public struct BigUInt : UnsignedInteger
-
extension BigUInt : Codable
-
extension BigUInt : Comparable
-
extension BigUInt : Hashable
-
extension BigUInt : ExpressibleByIntegerLiteral
-
extension BigUInt : Strideable
-
extension BigUInt : ExpressibleByStringLiteral
-
extension BigUInt : CustomStringConvertible
-
extension BigUInt : CustomPlaygroundDisplayConvertible
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
An arbitary precision signed integer type, also known as a “big integer”.
-
-
Operations on big integers never overflow, but they might take a long time to execute.
-The amount of memory (and address space) available is the only constraint to the magnitude of these numbers.
-
-
This particular big integer type uses base-2^64 digits to represent integers.
-
-
BigInt
is essentially a tiny wrapper that extends BigUInt
with a sign bit and provides signed integer
-operations. Both the underlying absolute value and the negative/positive flag are available as read-write
-properties.
-
-
Not all algorithms of BigUInt
are available for BigInt
values; for example, there is no square root or
-primality test for signed integers. When you need to call one of these, just extract the absolute value:
-
BigInt(255).abs.isPrime() // Returns false
-
-
-
See more
-
-
-
Declaration
-
-
Swift
-
public struct BigInt : SignedInteger
-
extension BigInt : Codable
-
extension BigInt : Hashable
-
extension BigInt : ExpressibleByIntegerLiteral
-
extension BigInt : Strideable
-
extension BigInt : ExpressibleByStringLiteral
-
extension BigInt : CustomStringConvertible
-
extension BigInt : CustomPlaygroundDisplayConvertible
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Structs/BigInt.html b/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Structs/BigInt.html
deleted file mode 100644
index ef27d99fb..000000000
--- a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Structs/BigInt.html
+++ /dev/null
@@ -1,2546 +0,0 @@
-
-
-
- BigInt Structure Reference
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- BigInt Reference
-
- BigInt Structure Reference
-
-
-
-
-
-
-
-
-
-
-
BigInt
-
-
-
-
public struct BigInt : SignedInteger
-
extension BigInt : Codable
-
extension BigInt : Hashable
-
extension BigInt : ExpressibleByIntegerLiteral
-
extension BigInt : Strideable
-
extension BigInt : ExpressibleByStringLiteral
-
extension BigInt : CustomStringConvertible
-
extension BigInt : CustomPlaygroundDisplayConvertible
-
-
-
-
An arbitary precision signed integer type, also known as a “big integer”.
-
-
Operations on big integers never overflow, but they might take a long time to execute.
-The amount of memory (and address space) available is the only constraint to the magnitude of these numbers.
-
-
This particular big integer type uses base-2^64 digits to represent integers.
-
-
BigInt
is essentially a tiny wrapper that extends BigUInt
with a sign bit and provides signed integer
-operations. Both the underlying absolute value and the negative/positive flag are available as read-write
-properties.
-
-
Not all algorithms of BigUInt
are available for BigInt
values; for example, there is no square root or
-primality test for signed integers. When you need to call one of these, just extract the absolute value:
-
BigInt(255).abs.isPrime() // Returns false
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public enum Sign
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public typealias Magnitude = BigUInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
The type representing a digit in BigInt
‘s underlying number system.
-
-
-
-
Declaration
-
-
Swift
-
public typealias Word = BigUInt . Word
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static var isSigned : Bool { get }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
The absolute value of this integer.
-
-
-
-
Declaration
-
-
Swift
-
public var magnitude : BigUInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
True iff the value of this integer is negative.
-
-
-
-
Declaration
-
-
Swift
-
public var sign : Sign
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Initializes a new big integer with the provided absolute number and sign flag.
-
-
-
-
Declaration
-
-
Swift
-
public init ( sign : Sign , magnitude : BigUInt )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Return true iff this integer is zero.
-
-
-
-
-
Declaration
-
-
Swift
-
public var isZero : Bool { get }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Returns -1
if this value is negative and 1
if it’s positive; otherwise, 0
.
-
-
-
-
Declaration
-
-
Swift
-
public func signum () -> BigInt
-
-
-
-
-
Return Value
-
The sign of this number, expressed as an integer of the same type.
-
-
-
-
-
-
-
-
-
-
-
-
-
Add a
to b
and return the result.
-
-
-
-
Declaration
-
-
Swift
-
public static func + ( a : BigInt , b : BigInt ) -> BigInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Add b
to a
in place.
-
-
-
-
Declaration
-
-
Swift
-
public static func += ( a : inout BigInt , b : BigInt )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Bitwise Operations
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public prefix static func ~ ( x : BigInt ) -> BigInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func & ( lhs : inout BigInt , rhs : BigInt ) -> BigInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func | ( lhs : inout BigInt , rhs : BigInt ) -> BigInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func ^ ( lhs : inout BigInt , rhs : BigInt ) -> BigInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func &= ( lhs : inout BigInt , rhs : BigInt )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func |= ( lhs : inout BigInt , rhs : BigInt )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func ^= ( lhs : inout BigInt , rhs : BigInt )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public init ( from decoder : Decoder ) throws
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public func encode ( to encoder : Encoder ) throws
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Return true iff a
is equal to b
.
-
-
-
-
Declaration
-
-
Swift
-
public static func == ( a : BigInt , b : BigInt ) -> Bool
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Return true iff a
is less than b
.
-
-
-
-
Declaration
-
-
Swift
-
public static func < ( a : BigInt , b : BigInt ) -> Bool
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Initialize a BigInt from bytes accessed from an UnsafeRawBufferPointer,
-where the first byte indicates sign (0 for positive, 1 for negative)
-
-
-
-
Declaration
-
-
Swift
-
public init ( _ buffer : UnsafeRawBufferPointer )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Initializes an integer from the bits stored inside a piece of Data
.
-The data is assumed to be in network (big-endian) byte order with a first
-byte to represent the sign (0 for positive, 1 for negative)
-
-
-
-
Declaration
-
-
Swift
-
public init ( _ data : Data )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Return a Data
value that contains the base-256 representation of this integer, in network (big-endian) byte order and a prepended byte to indicate the sign (0 for positive, 1 for negative)
-
-
-
-
Declaration
-
-
Swift
-
public func serialize () -> Data
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Full-width multiplication and division
-
-
-
-
-
-
-
-
-
-
-
-
Divide this integer by y
and return the resulting quotient and remainder.
-
-
Complexity
- O(count^2)
-
-
-
-
-
-
Declaration
-
-
Swift
-
public func quotientAndRemainder ( dividingBy y : BigInt ) -> ( quotient : BigInt , remainder : BigInt )
-
-
-
-
-
Return Value
-
(quotient, remainder)
where quotient = floor(self/y)
, remainder = self - quotient * y
-
-
-
-
-
-
-
-
-
-
-
-
-
Divide a
by b
and return the quotient. Traps if b
is zero.
-
-
-
-
Declaration
-
-
Swift
-
public static func / ( a : BigInt , b : BigInt ) -> BigInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Divide a
by b
and return the remainder. The result has the same sign as a
.
-
-
-
-
Declaration
-
-
Swift
-
public static func % ( a : BigInt , b : BigInt ) -> BigInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Return the result of a
mod b
. The result is always a nonnegative integer that is less than the absolute value of b
.
-
-
-
-
Declaration
-
-
Swift
-
public func modulus ( _ mod : BigInt ) -> BigInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Divide a
by b
storing the quotient in a
.
-
-
-
-
Declaration
-
-
Swift
-
public static func /= ( a : inout BigInt , b : BigInt )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Divide a
by b
storing the remainder in a
.
-
-
-
-
Declaration
-
-
Swift
-
public static func %= ( a : inout BigInt , b : BigInt )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Returns this integer raised to the power exponent
.
-
-
This function calculates the result by successively squaring the base while halving the exponent .
-
-
Note
- This function can be unreasonably expensive for large exponents, which is why
exponent
is
- a simple integer value. If you want to calculate big exponents, you’ll probably need to use
- the modulo arithmetic variant.
-
-
-
See also
-
BigUInt.power(_:, modulus:)
-
-
-
Complexity
- O((exponent * self.count)^log2(3)) or somesuch. The result may require a large amount of memory, too.
-
-
-
-
-
-
Declaration
-
-
Swift
-
public func power ( _ exponent : Int ) -> BigInt
-
-
-
-
-
Return Value
-
1 if exponent == 0
, otherwise self
raised to exponent
. (This implies that 0.power(0) == 1
.)
-
-
-
-
-
-
-
-
-
-
-
-
-
Returns the remainder of this integer raised to the power exponent
in modulo arithmetic under modulus
.
-
-
Uses the right-to-left binary method .
-
-
Complexity
- O(exponent.count * modulus.count^log2(3)) or somesuch
-
-
-
-
-
-
Declaration
-
-
Swift
-
public func power ( _ exponent : BigInt , modulus : BigInt ) -> BigInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public init ? < T > ( exactly source : T ) where T : BinaryFloatingPoint
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public init < T > ( _ source : T ) where T : BinaryFloatingPoint
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Returns the greatest common divisor of a
and b
.
-
-
Complexity
- O(count^2) where count = max(a.count, b.count)
-
-
-
-
-
-
Declaration
-
-
Swift
-
public func greatestCommonDivisor ( with b : BigInt ) -> BigInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public func inverse ( _ modulus : BigInt ) -> BigInt ?
-
-
-
-
-
Return Value
-
If gcd(self, modulus) == 1
, the value returned is an integer a < modulus
such that (a * self) % modulus == 1
. If self
and modulus
aren’t coprime, the return value is nil
.
-
-
-
-
-
-
-
-
-
-
-
-
-
Append this BigInt
to the specified hasher.
-
-
-
-
Declaration
-
-
Swift
-
public func hash ( into hasher : inout Hasher )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public init ()
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Initializes a new signed big integer with the same value as the specified unsigned big integer.
-
-
-
-
Declaration
-
-
Swift
-
public init ( _ integer : BigUInt )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public init < T > ( _ source : T ) where T : BinaryInteger
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public init ? < T > ( exactly source : T ) where T : BinaryInteger
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public init < T > ( clamping source : T ) where T : BinaryInteger
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public init < T > ( truncatingIfNeeded source : T ) where T : BinaryInteger
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Initialize a new big integer from an integer literal.
-
-
-
-
Declaration
-
-
Swift
-
public init ( integerLiteral value : Int64 )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Multiply a
with b
and return the result.
-
-
-
-
Declaration
-
-
Swift
-
public static func * ( a : BigInt , b : BigInt ) -> BigInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Multiply a
with b
in place.
-
-
-
-
Declaration
-
-
Swift
-
public static func *= ( a : inout BigInt , b : BigInt )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Primality Testing
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public func isStrongProbablePrime ( _ base : BigInt ) -> Bool
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Returns true if this integer is probably prime. Returns false if this integer is definitely not prime.
-
-
This function performs a probabilistic Miller-Rabin Primality Test , consisting of rounds
iterations,
-each calculating the strong probable prime test for a random base. The number of rounds is 10 by default,
-but you may specify your own choice.
-
-
To speed things up, the function checks if self
is divisible by the first few prime numbers before
-diving into (slower) Miller-Rabin testing.
-
-
Also, when self
is less than 82 bits wide, isPrime
does a deterministic test that is guaranteed to
-return a correct result.
-
-
-
-
Declaration
-
-
Swift
-
public func isPrime ( rounds : Int = 10 ) -> Bool
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func &<< ( left : BigInt , right : BigInt ) -> BigInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func &<<= ( left : inout BigInt , right : BigInt )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func &>> ( left : BigInt , right : BigInt ) -> BigInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func &>>= ( left : inout BigInt , right : BigInt )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func << < Other > ( lhs : BigInt , rhs : Other ) -> BigInt where Other : BinaryInteger
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func <<= < Other > ( lhs : inout BigInt , rhs : Other ) where Other : BinaryInteger
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func >> < Other > ( lhs : BigInt , rhs : Other ) -> BigInt where Other : BinaryInteger
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func >>= < Other > ( lhs : inout BigInt , rhs : Other ) where Other : BinaryInteger
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Returns the integer square root of a big integer; i.e., the largest integer whose square isn’t greater than value
.
-
-
Requires
- self >= 0
-
-
-
-
-
-
Declaration
-
-
Swift
-
public func squareRoot () -> BigInt
-
-
-
-
-
Return Value
-
floor(sqrt(self))
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public typealias Stride = BigInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public func advanced ( by n : Stride ) -> BigInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Returns other - self
.
-
-
-
-
Declaration
-
-
Swift
-
public func distance ( to other : BigInt ) -> Stride
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Initialize a big integer from an ASCII representation in a given radix. Numerals above 9
are represented by
-letters from the English alphabet.
-
-
Requires
-
radix > 1 && radix < 36
-
-
-
-
-
-
Declaration
-
-
Swift
-
public init ? < S > ( _ text : S , radix : Int = 10 ) where S : StringProtocol
-
-
-
-
-
Return Value
-
The integer represented by text
, or nil if text
contains a character that does not represent a numeral in radix
.
-
-
-
-
-
-
-
-
-
-
-
-
-
Initialize a new big integer from a Unicode scalar.
-The scalar must represent a decimal digit.
-
-
-
-
Declaration
-
-
Swift
-
public init ( unicodeScalarLiteral value : UnicodeScalar )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Initialize a new big integer from an extended grapheme cluster.
-The cluster must consist of a decimal digit.
-
-
-
-
Declaration
-
-
Swift
-
public init ( extendedGraphemeClusterLiteral value : String )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Initialize a new big integer from a decimal number represented by a string literal of arbitrary length.
-The string must contain only decimal digits.
-
-
-
-
Declaration
-
-
Swift
-
public init ( stringLiteral value : StringLiteralType )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Return the decimal representation of this integer.
-
-
-
-
Declaration
-
-
Swift
-
public var description : String { get }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Return the playground quick look representation of this integer.
-
-
-
-
Declaration
-
-
Swift
-
public var playgroundDescription : Any { get }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public mutating func negate ()
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Subtract b
from a
and return the result.
-
-
-
-
Declaration
-
-
Swift
-
public static func - ( a : BigInt , b : BigInt ) -> BigInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Subtract b
from a
in place.
-
-
-
-
Declaration
-
-
Swift
-
public static func -= ( a : inout BigInt , b : BigInt )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public var bitWidth : Int { get }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public var trailingZeroBitCount : Int { get }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public struct Words : RandomAccessCollection
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public var words : Words { get }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public init < S > ( words : S ) where S : Sequence , S . Element == BigInt . Word
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Structs/BigInt/Sign.html b/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Structs/BigInt/Sign.html
deleted file mode 100644
index 93984a5b3..000000000
--- a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Structs/BigInt/Sign.html
+++ /dev/null
@@ -1,189 +0,0 @@
-
-
-
- Sign Enumeration Reference
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- BigInt Reference
-
- Sign Enumeration Reference
-
-
-
-
-
-
-
-
-
-
-
Sign
-
-
Undocumented
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Structs/BigInt/Words.html b/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Structs/BigInt/Words.html
deleted file mode 100644
index d070e5056..000000000
--- a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Structs/BigInt/Words.html
+++ /dev/null
@@ -1,302 +0,0 @@
-
-
-
- Words Structure Reference
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- BigInt Reference
-
- Words Structure Reference
-
-
-
-
-
-
-
-
-
-
-
Words
-
-
-
-
public struct Words : RandomAccessCollection
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public typealias Indices = CountableRange < Int >
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public var count : Int { get }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public var indices : Indices { get }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public var startIndex : Int { get }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public var endIndex : Int { get }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public subscript ( index : Int ) -> UInt { get }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Structs/BigUInt.html b/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Structs/BigUInt.html
deleted file mode 100644
index 5d164ca90..000000000
--- a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Structs/BigUInt.html
+++ /dev/null
@@ -1,3220 +0,0 @@
-
-
-
- BigUInt Structure Reference
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- BigInt Reference
-
- BigUInt Structure Reference
-
-
-
-
-
-
-
-
-
-
-
BigUInt
-
-
-
-
public struct BigUInt : UnsignedInteger
-
extension BigUInt : Codable
-
extension BigUInt : Comparable
-
extension BigUInt : Hashable
-
extension BigUInt : ExpressibleByIntegerLiteral
-
extension BigUInt : Strideable
-
extension BigUInt : ExpressibleByStringLiteral
-
extension BigUInt : CustomStringConvertible
-
extension BigUInt : CustomPlaygroundDisplayConvertible
-
-
-
-
An arbitary precision unsigned integer type, also known as a “big integer”.
-
-
Operations on big integers never overflow, but they may take a long time to execute.
-The amount of memory (and address space) available is the only constraint to the magnitude of these numbers.
-
-
This particular big integer type uses base-2^64 digits to represent integers; you can think of it as a wrapper
-around Array<UInt64>
. (In fact, BigUInt
only uses an array if there are more than two digits.)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
The type representing a digit in BigUInt
‘s underlying number system.
-
-
-
-
Declaration
-
-
Swift
-
public typealias Word = UInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Initializes a new BigUInt with value 0.
-
-
-
-
Declaration
-
-
Swift
-
public init ()
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Initializes a new BigUInt with the specified digits. The digits are ordered from least to most significant.
-
-
-
-
Declaration
-
-
Swift
-
public init ( words : [ Word ])
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Add a
and b
together and return the result.
-
-
Complexity
- O(max(a.count, b.count))
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func + ( a : BigUInt , b : BigUInt ) -> BigUInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Add a
and b
together, and store the sum in a
.
-
-
Complexity
- O(max(a.count, b.count))
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func += ( a : inout BigUInt , b : BigUInt )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static var isSigned : Bool { get }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Returns 1
if this value is, positive; otherwise, 0
.
-
-
-
-
Declaration
-
-
Swift
-
public func signum () -> BigUInt
-
-
-
-
-
Return Value
-
The sign of this number, expressed as an integer of the same type.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Bitwise Operations
-
-
-
-
-
-
-
-
-
-
-
-
Return the ones’ complement of a
.
-
-
Complexity
- O(a.count)
-
-
-
-
-
-
Declaration
-
-
Swift
-
public prefix static func ~ ( a : BigUInt ) -> BigUInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Calculate the bitwise OR of a
and b
, and store the result in a
.
-
-
Complexity
- O(max(a.count, b.count))
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func |= ( a : inout BigUInt , b : BigUInt )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Calculate the bitwise AND of a
and b
and return the result.
-
-
Complexity
- O(max(a.count, b.count))
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func &= ( a : inout BigUInt , b : BigUInt )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Calculate the bitwise XOR of a
and b
and return the result.
-
-
Complexity
- O(max(a.count, b.count))
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func ^= ( a : inout BigUInt , b : BigUInt )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public init ( from decoder : Decoder ) throws
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public func encode ( to encoder : Encoder ) throws
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Compare a
to b
and return an NSComparisonResult
indicating their order.
-
-
Complexity
- O(count)
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func compare ( _ a : BigUInt , _ b : BigUInt ) -> ComparisonResult
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Return true iff a
is equal to b
.
-
-
Complexity
- O(count)
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func == ( a : BigUInt , b : BigUInt ) -> Bool
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Return true iff a
is less than b
.
-
-
Complexity
- O(count)
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func < ( a : BigUInt , b : BigUInt ) -> Bool
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
NSData Conversion
-
-
-
-
-
-
-
-
-
-
-
-
Initialize a BigInt from bytes accessed from an UnsafeRawBufferPointer
-
-
-
-
Declaration
-
-
Swift
-
public init ( _ buffer : UnsafeRawBufferPointer )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Initializes an integer from the bits stored inside a piece of Data
.
-The data is assumed to be in network (big-endian) byte order.
-
-
-
-
Declaration
-
-
Swift
-
public init ( _ data : Data )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Return a Data
value that contains the base-256 representation of this integer, in network (big-endian) byte order.
-
-
-
-
Declaration
-
-
Swift
-
public func serialize () -> Data
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Divide this integer by y
and return the resulting quotient and remainder.
-
-
Complexity
- O(count^2)
-
-
-
-
-
-
Declaration
-
-
Swift
-
public func quotientAndRemainder ( dividingBy y : BigUInt ) -> ( quotient : BigUInt , remainder : BigUInt )
-
-
-
-
-
Return Value
-
(quotient, remainder)
where quotient = floor(self/y)
, remainder = self - quotient * y
-
-
-
-
-
-
-
-
-
-
-
-
-
Divide x
by y
and return the quotient.
-
-
Note
- Use
divided(by:)
if you also need the remainder.
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func / ( x : BigUInt , y : BigUInt ) -> BigUInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Divide x
by y
and return the remainder.
-
-
Note
- Use
divided(by:)
if you also need the remainder.
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func % ( x : BigUInt , y : BigUInt ) -> BigUInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Divide x
by y
and store the quotient in x
.
-
-
Note
- Use
divided(by:)
if you also need the remainder.
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func /= ( x : inout BigUInt , y : BigUInt )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Divide x
by y
and store the remainder in x
.
-
-
Note
- Use
divided(by:)
if you also need the remainder.
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func %= ( x : inout BigUInt , y : BigUInt )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Returns this integer raised to the power exponent
.
-
-
This function calculates the result by successively squaring the base while halving the exponent .
-
-
Note
- This function can be unreasonably expensive for large exponents, which is why
exponent
is
- a simple integer value. If you want to calculate big exponents, you’ll probably need to use
- the modulo arithmetic variant.
-
-
-
See also
-
BigUInt.power(_:, modulus:)
-
-
-
Complexity
- O((exponent * self.count)^log2(3)) or somesuch. The result may require a large amount of memory, too.
-
-
-
-
-
-
Declaration
-
-
Swift
-
public func power ( _ exponent : Int ) -> BigUInt
-
-
-
-
-
Return Value
-
1 if exponent == 0
, otherwise self
raised to exponent
. (This implies that 0.power(0) == 1
.)
-
-
-
-
-
-
-
-
-
-
-
-
-
Returns the remainder of this integer raised to the power exponent
in modulo arithmetic under modulus
.
-
-
Uses the right-to-left binary method .
-
-
Complexity
- O(exponent.count * modulus.count^log2(3)) or somesuch
-
-
-
-
-
-
Declaration
-
-
Swift
-
public func power ( _ exponent : BigUInt , modulus : BigUInt ) -> BigUInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public init ? < T > ( exactly source : T ) where T : BinaryFloatingPoint
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public init < T > ( _ source : T ) where T : BinaryFloatingPoint
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Greatest Common Divisor
-
-
-
-
-
-
-
-
-
-
-
-
Returns the greatest common divisor of self
and b
.
-
-
Complexity
- O(count^2) where count = max(self.count, b.count)
-
-
-
-
-
-
Declaration
-
-
Swift
-
public func greatestCommonDivisor ( with b : BigUInt ) -> BigUInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public func inverse ( _ modulus : BigUInt ) -> BigUInt ?
-
-
-
-
-
Return Value
-
If gcd(self, modulus) == 1
, the value returned is an integer a < modulus
such that (a * self) % modulus == 1
. If self
and modulus
aren’t coprime, the return value is nil
.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Append this BigUInt
to the specified hasher.
-
-
-
-
Declaration
-
-
Swift
-
public func hash ( into hasher : inout Hasher )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public init ? < T > ( exactly source : T ) where T : BinaryInteger
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public init < T > ( _ source : T ) where T : BinaryInteger
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public init < T > ( truncatingIfNeeded source : T ) where T : BinaryInteger
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public init < T > ( clamping source : T ) where T : BinaryInteger
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Initialize a new big integer from an integer literal.
-
-
-
-
Declaration
-
-
Swift
-
public init ( integerLiteral value : UInt64 )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Multiply this big integer by a single word, and store the result in place of the original big integer.
-
-
Complexity
- O(count)
-
-
-
-
-
-
Declaration
-
-
Swift
-
public mutating func multiply ( byWord y : Word )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Multiply this big integer by a single Word, and return the result.
-
-
Complexity
- O(count)
-
-
-
-
-
-
Declaration
-
-
Swift
-
public func multiplied ( byWord y : Word ) -> BigUInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Multiply x
by y
, and add the result to this integer, optionally shifted shift
words to the left.
-
-
Note
- This is the fused multiply/shift/add operation; it is more efficient than doing the components
-individually. (The fused operation doesn’t need to allocate space for temporary big integers.)
-
-
-
Complexity
- O(count)
-
-
-
-
-
-
Declaration
-
-
Swift
-
public mutating func multiplyAndAdd ( _ x : BigUInt , _ y : Word , shiftedBy shift : Int = 0 )
-
-
-
-
-
Return Value
-
self
is set to self + (x * y) << (shift * 2^Word.bitWidth)
-
-
-
-
-
-
-
-
-
-
-
-
-
Multiply this integer by y
and return the result.
-
-
Complexity
- O(n^log2(3))
-
-
-
-
-
-
Declaration
-
-
Swift
-
public func multiplied ( by y : BigUInt ) -> BigUInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Multiplication switches to an asymptotically better recursive algorithm when arguments have more words than this limit.
-
-
-
-
Declaration
-
-
Swift
-
public static var directMultiplicationLimit : Int
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Multiply a
by b
and return the result.
-
-
Complexity
- O(n^log2(3))
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func * ( x : BigUInt , y : BigUInt ) -> BigUInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Multiply a
by b
and store the result in a
.
-
-
-
-
Declaration
-
-
Swift
-
public static func *= ( a : inout BigUInt , b : BigUInt )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Primality Testing
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public func isStrongProbablePrime ( _ base : BigUInt ) -> Bool
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Returns true if this integer is probably prime. Returns false if this integer is definitely not prime.
-
-
This function performs a probabilistic Miller-Rabin Primality Test , consisting of rounds
iterations,
-each calculating the strong probable prime test for a random base. The number of rounds is 10 by default,
-but you may specify your own choice.
-
-
To speed things up, the function checks if self
is divisible by the first few prime numbers before
-diving into (slower) Miller-Rabin testing.
-
-
Also, when self
is less than 82 bits wide, isPrime
does a deterministic test that is guaranteed to
-return a correct result.
-
-
-
-
Declaration
-
-
Swift
-
public func isPrime ( rounds : Int = 10 ) -> Bool
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Create a big unsigned integer consisting of width
uniformly distributed random bits.
-
-
-
-
Declaration
-
-
Swift
-
public static func randomInteger < RNG > ( withMaximumWidth width : Int , using generator : inout RNG ) -> BigUInt where RNG : RandomNumberGenerator
-
-
-
-
-
Parameters
-
-
-
-
-
- width
-
-
-
-
-
The maximum number of one bits in the result.
-
-
-
-
-
-
- generator
-
-
-
-
-
The source of randomness.
-
-
-
-
-
-
-
-
Return Value
-
A big unsigned integer less than 1 << width
.
-
-
-
-
-
-
-
-
-
-
-
-
-
Create a big unsigned integer consisting of width
uniformly distributed random bits.
-
-
Note
-
I use a SystemRandomGeneratorGenerator
as the source of randomness.
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func randomInteger ( withMaximumWidth width : Int ) -> BigUInt
-
-
-
-
-
Parameters
-
-
-
-
-
- width
-
-
-
-
-
The maximum number of one bits in the result.
-
-
-
-
-
-
-
-
Return Value
-
A big unsigned integer less than 1 << width
.
-
-
-
-
-
-
-
-
-
-
-
-
-
Create a big unsigned integer consisting of width-1
uniformly distributed random bits followed by a one bit.
-
-
Note
-
If width
is zero, the result is zero.
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func randomInteger < RNG > ( withExactWidth width : Int , using generator : inout RNG ) -> BigUInt where RNG : RandomNumberGenerator
-
-
-
-
-
Parameters
-
-
-
-
-
- width
-
-
-
-
-
The number of bits required to represent the answer.
-
-
-
-
-
-
- generator
-
-
-
-
-
The source of randomness.
-
-
-
-
-
-
-
-
Return Value
-
A random big unsigned integer whose width is width
.
-
-
-
-
-
-
-
-
-
-
-
-
-
Create a big unsigned integer consisting of width-1
uniformly distributed random bits followed by a one bit.
-
-
Note
- If
width
is zero, the result is zero.
-
-
-
Note
-
I use a SystemRandomGeneratorGenerator
as the source of randomness.
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func randomInteger ( withExactWidth width : Int ) -> BigUInt
-
-
-
-
-
Return Value
-
A random big unsigned integer whose width is width
.
-
-
-
-
-
-
-
-
-
-
-
-
-
Create a uniformly distributed random unsigned integer that’s less than the specified limit.
-
-
Precondition
-
limit > 0
.
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func randomInteger < RNG > ( lessThan limit : BigUInt , using generator : inout RNG ) -> BigUInt where RNG : RandomNumberGenerator
-
-
-
-
-
Parameters
-
-
-
-
-
- limit
-
-
-
-
-
The upper bound on the result.
-
-
-
-
-
-
- generator
-
-
-
-
-
The source of randomness.
-
-
-
-
-
-
-
-
Return Value
-
A random big unsigned integer that is less than limit
.
-
-
-
-
-
-
-
-
-
-
-
-
-
Create a uniformly distributed random unsigned integer that’s less than the specified limit.
-
-
Precondition
-
limit > 0
.
-
-
-
Note
-
I use a SystemRandomGeneratorGenerator
as the source of randomness.
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func randomInteger ( lessThan limit : BigUInt ) -> BigUInt
-
-
-
-
-
Parameters
-
-
-
-
-
- limit
-
-
-
-
-
The upper bound on the result.
-
-
-
-
-
-
-
-
Return Value
-
A random big unsigned integer that is less than limit
.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func >>= < Other > ( lhs : inout BigUInt , rhs : Other ) where Other : BinaryInteger
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func <<= < Other > ( lhs : inout BigUInt , rhs : Other ) where Other : BinaryInteger
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func >> < Other > ( lhs : BigUInt , rhs : Other ) -> BigUInt where Other : BinaryInteger
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func << < Other > ( lhs : BigUInt , rhs : Other ) -> BigUInt where Other : BinaryInteger
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Returns the integer square root of a big integer; i.e., the largest integer whose square isn’t greater than value
.
-
-
-
-
Declaration
-
-
Swift
-
public func squareRoot () -> BigUInt
-
-
-
-
-
Return Value
-
floor(sqrt(self))
-
-
-
-
-
-
-
-
-
-
-
-
-
A type that can represent the distance between two values ofa BigUInt
.
-
-
-
-
Declaration
-
-
Swift
-
public typealias Stride = BigInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Adds n
to self
and returns the result. Traps if the result would be less than zero.
-
-
-
-
Declaration
-
-
Swift
-
public func advanced ( by n : BigInt ) -> BigUInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Returns the (potentially negative) difference between self
and other
as a BigInt
. Never traps.
-
-
-
-
Declaration
-
-
Swift
-
public func distance ( to other : BigUInt ) -> BigInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
String Conversion
-
-
-
-
-
-
-
-
-
-
-
-
Initialize a big integer from an ASCII representation in a given radix. Numerals above 9
are represented by
-letters from the English alphabet.
-
-
Requires
-
radix > 1 && radix < 36
-
-
-
-
-
-
Declaration
-
-
Swift
-
public init ? < S > ( _ text : S , radix : Int = 10 ) where S : StringProtocol
-
-
-
-
-
Return Value
-
The integer represented by text
, or nil if text
contains a character that does not represent a numeral in radix
.
-
-
-
-
-
-
-
-
-
-
-
-
-
Initialize a new big integer from a Unicode scalar.
-The scalar must represent a decimal digit.
-
-
-
-
Declaration
-
-
Swift
-
public init ( unicodeScalarLiteral value : UnicodeScalar )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Initialize a new big integer from an extended grapheme cluster.
-The cluster must consist of a decimal digit.
-
-
-
-
Declaration
-
-
Swift
-
public init ( extendedGraphemeClusterLiteral value : String )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Initialize a new big integer from a decimal number represented by a string literal of arbitrary length.
-The string must contain only decimal digits.
-
-
-
-
Declaration
-
-
Swift
-
public init ( stringLiteral value : StringLiteralType )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Return the decimal representation of this integer.
-
-
-
-
Declaration
-
-
Swift
-
public var description : String { get }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Return the playground quick look representation of this integer.
-
-
-
-
Declaration
-
-
Swift
-
public var playgroundDescription : Any { get }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Subtract other
from this integer in place, and return a flag indicating if the operation caused an
-arithmetic overflow. other
is shifted shift
digits to the left before being subtracted.
-
-
Note
- If the result indicates an overflow, then
self
becomes the twos’ complement of the absolute difference.
-
-
-
Complexity
- O(count)
-
-
-
-
-
-
Declaration
-
-
Swift
-
public mutating func subtractReportingOverflow ( _ b : BigUInt , shiftedBy shift : Int = 0 ) -> Bool
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Subtract other
from this integer, returning the difference and a flag indicating arithmetic overflow.
-other
is shifted shift
digits to the left before being subtracted.
-
-
Note
- If
overflow
is true, then the result value is the twos’ complement of the absolute value of the difference.
-
-
-
Complexity
- O(count)
-
-
-
-
-
-
Declaration
-
-
Swift
-
public func subtractingReportingOverflow ( _ other : BigUInt , shiftedBy shift : Int ) -> ( partialValue : BigUInt , overflow : Bool )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Subtracts other
from self
, returning the result and a flag indicating arithmetic overflow.
-
-
Note
- When the operation overflows, then
partialValue
is the twos’ complement of the absolute value of the difference.
-
-
-
Complexity
- O(count)
-
-
-
-
-
-
Declaration
-
-
Swift
-
public func subtractingReportingOverflow ( _ other : BigUInt ) -> ( partialValue : BigUInt , overflow : Bool )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Subtract other
from this integer in place.
-other
is shifted shift
digits to the left before being subtracted.
-
-
Requires
- self >= other * 2^shift
-
-
-
Complexity
- O(count)
-
-
-
-
-
-
Declaration
-
-
Swift
-
public mutating func subtract ( _ other : BigUInt , shiftedBy shift : Int = 0 )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Subtract b
from this integer, and return the difference.
-b
is shifted shift
digits to the left before being subtracted.
-
-
Requires
- self >= b * 2^shift
-
-
-
Complexity
- O(count)
-
-
-
-
-
-
Declaration
-
-
Swift
-
public func subtracting ( _ other : BigUInt , shiftedBy shift : Int = 0 ) -> BigUInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Decrement this integer by one.
-
-
Complexity
- O(count)
-
-
-
-
-
-
Declaration
-
-
Swift
-
public mutating func decrement ( shiftedBy shift : Int = 0 )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Subtract b
from a
and return the result.
-
-
Complexity
- O(a.count)
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func - ( a : BigUInt , b : BigUInt ) -> BigUInt
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Subtract b
from a
and store the result in a
.
-
-
Complexity
- O(a.count)
-
-
-
-
-
-
Declaration
-
-
Swift
-
public static func -= ( a : inout BigUInt , b : BigUInt )
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public subscript ( bitAt index : Int ) -> Bool { get set }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
The minimum number of bits required to represent this integer in binary.
-
-
-
-
-
Declaration
-
-
Swift
-
public var bitWidth : Int { get }
-
-
-
-
-
Return Value
-
floor(log2(2 * self + 1))
-
-
-
-
-
-
-
-
-
-
-
-
-
The number of leading zero bits in the binary representation of this integer in base 2^(Word.bitWidth)
.
-This is useful when you need to normalize a BigUInt
such that the top bit of its most significant word is 1.
-
-
Note
- 0 is considered to have zero leading zero bits.
-
-
-
-
-
-
Declaration
-
-
Swift
-
public var leadingZeroBitCount : Int { get }
-
-
-
-
-
Return Value
-
A value in 0...(Word.bitWidth - 1)
.
-
-
-
-
-
-
-
-
-
-
-
-
-
The number of trailing zero bits in the binary representation of this integer.
-
-
Note
- 0 is considered to have zero trailing zero bits.
-
-
-
Complexity
- O(count)
-
-
-
-
-
-
Declaration
-
-
Swift
-
public var trailingZeroBitCount : Int { get }
-
-
-
-
-
Return Value
-
A value in 0...width
.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public struct Words : RandomAccessCollection
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public var words : Words { get }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Structs/BigUInt/Words.html b/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Structs/BigUInt/Words.html
deleted file mode 100644
index 0c13a2f7a..000000000
--- a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/Structs/BigUInt/Words.html
+++ /dev/null
@@ -1,215 +0,0 @@
-
-
-
- Words Structure Reference
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- BigInt Reference
-
- Words Structure Reference
-
-
-
-
-
-
-
-
-
-
-
Words
-
-
-
-
public struct Words : RandomAccessCollection
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public var startIndex : Int { get }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public var endIndex : Int { get }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Declaration
-
-
Swift
-
public subscript ( index : Int ) -> Word { get }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/css/highlight.css b/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/css/highlight.css
deleted file mode 100644
index d0db0e13b..000000000
--- a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/css/highlight.css
+++ /dev/null
@@ -1,200 +0,0 @@
-/* Credit to https://gist.github.com/wataru420/2048287 */
-.highlight {
- /* Comment */
- /* Error */
- /* Keyword */
- /* Operator */
- /* Comment.Multiline */
- /* Comment.Preproc */
- /* Comment.Single */
- /* Comment.Special */
- /* Generic.Deleted */
- /* Generic.Deleted.Specific */
- /* Generic.Emph */
- /* Generic.Error */
- /* Generic.Heading */
- /* Generic.Inserted */
- /* Generic.Inserted.Specific */
- /* Generic.Output */
- /* Generic.Prompt */
- /* Generic.Strong */
- /* Generic.Subheading */
- /* Generic.Traceback */
- /* Keyword.Constant */
- /* Keyword.Declaration */
- /* Keyword.Pseudo */
- /* Keyword.Reserved */
- /* Keyword.Type */
- /* Literal.Number */
- /* Literal.String */
- /* Name.Attribute */
- /* Name.Builtin */
- /* Name.Class */
- /* Name.Constant */
- /* Name.Entity */
- /* Name.Exception */
- /* Name.Function */
- /* Name.Namespace */
- /* Name.Tag */
- /* Name.Variable */
- /* Operator.Word */
- /* Text.Whitespace */
- /* Literal.Number.Float */
- /* Literal.Number.Hex */
- /* Literal.Number.Integer */
- /* Literal.Number.Oct */
- /* Literal.String.Backtick */
- /* Literal.String.Char */
- /* Literal.String.Doc */
- /* Literal.String.Double */
- /* Literal.String.Escape */
- /* Literal.String.Heredoc */
- /* Literal.String.Interpol */
- /* Literal.String.Other */
- /* Literal.String.Regex */
- /* Literal.String.Single */
- /* Literal.String.Symbol */
- /* Name.Builtin.Pseudo */
- /* Name.Variable.Class */
- /* Name.Variable.Global */
- /* Name.Variable.Instance */
- /* Literal.Number.Integer.Long */ }
- .highlight .c {
- color: #999988;
- font-style: italic; }
- .highlight .err {
- color: #a61717;
- background-color: #e3d2d2; }
- .highlight .k {
- color: #000000;
- font-weight: bold; }
- .highlight .o {
- color: #000000;
- font-weight: bold; }
- .highlight .cm {
- color: #999988;
- font-style: italic; }
- .highlight .cp {
- color: #999999;
- font-weight: bold; }
- .highlight .c1 {
- color: #999988;
- font-style: italic; }
- .highlight .cs {
- color: #999999;
- font-weight: bold;
- font-style: italic; }
- .highlight .gd {
- color: #000000;
- background-color: #ffdddd; }
- .highlight .gd .x {
- color: #000000;
- background-color: #ffaaaa; }
- .highlight .ge {
- color: #000000;
- font-style: italic; }
- .highlight .gr {
- color: #aa0000; }
- .highlight .gh {
- color: #999999; }
- .highlight .gi {
- color: #000000;
- background-color: #ddffdd; }
- .highlight .gi .x {
- color: #000000;
- background-color: #aaffaa; }
- .highlight .go {
- color: #888888; }
- .highlight .gp {
- color: #555555; }
- .highlight .gs {
- font-weight: bold; }
- .highlight .gu {
- color: #aaaaaa; }
- .highlight .gt {
- color: #aa0000; }
- .highlight .kc {
- color: #000000;
- font-weight: bold; }
- .highlight .kd {
- color: #000000;
- font-weight: bold; }
- .highlight .kp {
- color: #000000;
- font-weight: bold; }
- .highlight .kr {
- color: #000000;
- font-weight: bold; }
- .highlight .kt {
- color: #445588; }
- .highlight .m {
- color: #009999; }
- .highlight .s {
- color: #d14; }
- .highlight .na {
- color: #008080; }
- .highlight .nb {
- color: #0086B3; }
- .highlight .nc {
- color: #445588;
- font-weight: bold; }
- .highlight .no {
- color: #008080; }
- .highlight .ni {
- color: #800080; }
- .highlight .ne {
- color: #990000;
- font-weight: bold; }
- .highlight .nf {
- color: #990000; }
- .highlight .nn {
- color: #555555; }
- .highlight .nt {
- color: #000080; }
- .highlight .nv {
- color: #008080; }
- .highlight .ow {
- color: #000000;
- font-weight: bold; }
- .highlight .w {
- color: #bbbbbb; }
- .highlight .mf {
- color: #009999; }
- .highlight .mh {
- color: #009999; }
- .highlight .mi {
- color: #009999; }
- .highlight .mo {
- color: #009999; }
- .highlight .sb {
- color: #d14; }
- .highlight .sc {
- color: #d14; }
- .highlight .sd {
- color: #d14; }
- .highlight .s2 {
- color: #d14; }
- .highlight .se {
- color: #d14; }
- .highlight .sh {
- color: #d14; }
- .highlight .si {
- color: #d14; }
- .highlight .sx {
- color: #d14; }
- .highlight .sr {
- color: #009926; }
- .highlight .s1 {
- color: #d14; }
- .highlight .ss {
- color: #990073; }
- .highlight .bp {
- color: #999999; }
- .highlight .vc {
- color: #008080; }
- .highlight .vg {
- color: #008080; }
- .highlight .vi {
- color: #008080; }
- .highlight .il {
- color: #009999; }
diff --git a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/css/jazzy.css b/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/css/jazzy.css
deleted file mode 100644
index ff59f5f86..000000000
--- a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/css/jazzy.css
+++ /dev/null
@@ -1,395 +0,0 @@
-*, *:before, *:after {
- box-sizing: inherit; }
-
-body {
- margin: 0;
- background: #fff;
- color: #333;
- font: 16px/1.7 "Helvetica Neue", Helvetica, Arial, sans-serif;
- letter-spacing: .2px;
- -webkit-font-smoothing: antialiased;
- box-sizing: border-box; }
-
-h1 {
- font-size: 2rem;
- font-weight: 700;
- margin: 1.275em 0 0.6em; }
-
-h2 {
- font-size: 1.75rem;
- font-weight: 700;
- margin: 1.275em 0 0.3em; }
-
-h3 {
- font-size: 1.5rem;
- font-weight: 700;
- margin: 1em 0 0.3em; }
-
-h4 {
- font-size: 1.25rem;
- font-weight: 700;
- margin: 1.275em 0 0.85em; }
-
-h5 {
- font-size: 1rem;
- font-weight: 700;
- margin: 1.275em 0 0.85em; }
-
-h6 {
- font-size: 1rem;
- font-weight: 700;
- margin: 1.275em 0 0.85em;
- color: #777; }
-
-p {
- margin: 0 0 1em; }
-
-ul, ol {
- padding: 0 0 0 2em;
- margin: 0 0 0.85em; }
-
-blockquote {
- margin: 0 0 0.85em;
- padding: 0 15px;
- color: #858585;
- border-left: 4px solid #e5e5e5; }
-
-img {
- max-width: 100%; }
-
-a {
- color: #4183c4;
- text-decoration: none; }
- a:hover, a:focus {
- outline: 0;
- text-decoration: underline; }
- a.discouraged {
- text-decoration: line-through; }
- a.discouraged:hover, a.discouraged:focus {
- text-decoration: underline line-through; }
-
-table {
- background: #fff;
- width: 100%;
- border-collapse: collapse;
- border-spacing: 0;
- overflow: auto;
- margin: 0 0 0.85em; }
-
-tr:nth-child(2n) {
- background-color: #fbfbfb; }
-
-th, td {
- padding: 6px 13px;
- border: 1px solid #ddd; }
-
-pre {
- margin: 0 0 1.275em;
- padding: .85em 1em;
- overflow: auto;
- background: #f7f7f7;
- font-size: .85em;
- font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; }
-
-code {
- font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; }
-
-.item-container p > code, .item-container li > code, .top-matter p > code, .top-matter li > code {
- background: #f7f7f7;
- padding: .2em; }
- .item-container p > code:before, .item-container p > code:after, .item-container li > code:before, .item-container li > code:after, .top-matter p > code:before, .top-matter p > code:after, .top-matter li > code:before, .top-matter li > code:after {
- letter-spacing: -.2em;
- content: "\00a0"; }
-
-pre code {
- padding: 0;
- white-space: pre; }
-
-.content-wrapper {
- display: flex;
- flex-direction: column; }
- @media (min-width: 768px) {
- .content-wrapper {
- flex-direction: row; } }
-.header {
- display: flex;
- padding: 8px;
- font-size: 0.875em;
- background: #444;
- color: #999; }
-
-.header-col {
- margin: 0;
- padding: 0 8px; }
-
-.header-col--primary {
- flex: 1; }
-
-.header-link {
- color: #fff; }
-
-.header-icon {
- padding-right: 6px;
- vertical-align: -4px;
- height: 16px; }
-
-.breadcrumbs {
- font-size: 0.875em;
- padding: 8px 16px;
- margin: 0;
- background: #fbfbfb;
- border-bottom: 1px solid #ddd; }
-
-.carat {
- height: 10px;
- margin: 0 5px; }
-
-.navigation {
- order: 2; }
- @media (min-width: 768px) {
- .navigation {
- order: 1;
- width: 25%;
- max-width: 300px;
- padding-bottom: 64px;
- overflow: hidden;
- word-wrap: normal;
- background: #fbfbfb;
- border-right: 1px solid #ddd; } }
-.nav-groups {
- list-style-type: none;
- padding-left: 0; }
-
-.nav-group-name {
- border-bottom: 1px solid #ddd;
- padding: 8px 0 8px 16px; }
-
-.nav-group-name-link {
- color: #333; }
-
-.nav-group-tasks {
- margin: 8px 0;
- padding: 0 0 0 8px; }
-
-.nav-group-task {
- font-size: 1em;
- list-style-type: none;
- white-space: nowrap; }
-
-.nav-group-task-link {
- color: #808080; }
-
-.main-content {
- order: 1; }
- @media (min-width: 768px) {
- .main-content {
- order: 2;
- flex: 1;
- padding-bottom: 60px; } }
-.section {
- padding: 0 32px;
- border-bottom: 1px solid #ddd; }
-
-.section-content {
- max-width: 834px;
- margin: 0 auto;
- padding: 16px 0; }
-
-.section-name {
- color: #666;
- display: block; }
- .section-name p {
- margin-bottom: inherit; }
-
-.declaration .highlight {
- overflow-x: initial;
- padding: 8px 0;
- margin: 0;
- background-color: transparent;
- border: none; }
-
-.task-group-section {
- border-top: 1px solid #ddd; }
-
-.task-group {
- padding-top: 0px; }
-
-.task-name-container a[name]:before {
- content: "";
- display: block; }
-
-.section-name-container {
- position: relative; }
- .section-name-container .section-name-link {
- position: absolute;
- top: 0;
- left: 0;
- bottom: 0;
- right: 0;
- margin-bottom: 0; }
- .section-name-container .section-name {
- position: relative;
- pointer-events: none;
- z-index: 1; }
- .section-name-container .section-name a {
- pointer-events: auto; }
-
-.item-container {
- padding: 0; }
-
-.item {
- padding-top: 8px;
- width: 100%;
- list-style-type: none; }
- .item a[name]:before {
- content: "";
- display: block; }
- .item .token, .item .direct-link {
- display: inline-block;
- text-indent: -20px;
- padding-left: 3px;
- margin-left: 20px;
- font-size: 1rem; }
- .item .declaration-note {
- font-size: .85em;
- color: #808080;
- font-style: italic; }
-
-.pointer-container {
- border-bottom: 1px solid #ddd;
- left: -23px;
- padding-bottom: 13px;
- position: relative;
- width: 110%; }
-
-.pointer {
- left: 21px;
- top: 7px;
- display: block;
- position: absolute;
- width: 12px;
- height: 12px;
- border-left: 1px solid #ddd;
- border-top: 1px solid #ddd;
- background: #fff;
- transform: rotate(45deg); }
-
-.height-container {
- display: none;
- position: relative;
- width: 100%;
- overflow: hidden; }
- .height-container .section {
- background: #fff;
- border: 1px solid #ddd;
- border-top-width: 0;
- padding-top: 10px;
- padding-bottom: 5px;
- padding: 8px 16px; }
-
-.aside, .language {
- padding: 6px 12px;
- margin: 12px 0;
- border-left: 5px solid #dddddd;
- overflow-y: hidden; }
- .aside .aside-title, .language .aside-title {
- font-size: 9px;
- letter-spacing: 2px;
- text-transform: uppercase;
- padding-bottom: 0;
- margin: 0;
- color: #aaa;
- -webkit-user-select: none; }
- .aside p:last-child, .language p:last-child {
- margin-bottom: 0; }
-
-.language {
- border-left: 5px solid #cde9f4; }
- .language .aside-title {
- color: #4183c4; }
-
-.aside-warning, .aside-deprecated, .aside-unavailable {
- border-left: 5px solid #ff6666; }
- .aside-warning .aside-title, .aside-deprecated .aside-title, .aside-unavailable .aside-title {
- color: #ff0000; }
-
-.graybox {
- border-collapse: collapse;
- width: 100%; }
- .graybox p {
- margin: 0;
- word-break: break-word;
- min-width: 50px; }
- .graybox td {
- border: 1px solid #ddd;
- padding: 5px 25px 5px 10px;
- vertical-align: middle; }
- .graybox tr td:first-of-type {
- text-align: right;
- padding: 7px;
- vertical-align: top;
- word-break: normal;
- width: 40px; }
-
-.slightly-smaller {
- font-size: 0.9em; }
-
-.footer {
- padding: 8px 16px;
- background: #444;
- color: #ddd;
- font-size: 0.8em; }
- .footer p {
- margin: 8px 0; }
- .footer a {
- color: #fff; }
-
-html.dash .header, html.dash .breadcrumbs, html.dash .navigation {
- display: none; }
-
-html.dash .height-container {
- display: block; }
-
-form[role=search] input {
- font: 16px/1.7 "Helvetica Neue", Helvetica, Arial, sans-serif;
- font-size: 14px;
- line-height: 24px;
- padding: 0 10px;
- margin: 0;
- border: none;
- border-radius: 1em; }
- .loading form[role=search] input {
- background: white url(../img/spinner.gif) center right 4px no-repeat; }
-
-form[role=search] .tt-menu {
- margin: 0;
- min-width: 300px;
- background: #fbfbfb;
- color: #333;
- border: 1px solid #ddd; }
-
-form[role=search] .tt-highlight {
- font-weight: bold; }
-
-form[role=search] .tt-suggestion {
- font: 16px/1.7 "Helvetica Neue", Helvetica, Arial, sans-serif;
- padding: 0 8px; }
- form[role=search] .tt-suggestion span {
- display: table-cell;
- white-space: nowrap; }
- form[role=search] .tt-suggestion .doc-parent-name {
- width: 100%;
- text-align: right;
- font-weight: normal;
- font-size: 0.9em;
- padding-left: 16px; }
-
-form[role=search] .tt-suggestion:hover,
-form[role=search] .tt-suggestion.tt-cursor {
- cursor: pointer;
- background-color: #4183c4;
- color: #fff; }
-
-form[role=search] .tt-suggestion:hover .doc-parent-name,
-form[role=search] .tt-suggestion.tt-cursor .doc-parent-name {
- color: #fff; }
diff --git a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/img/carat.png b/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/img/carat.png
deleted file mode 100755
index 29d2f7fd4..000000000
Binary files a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/img/carat.png and /dev/null differ
diff --git a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/img/dash.png b/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/img/dash.png
deleted file mode 100755
index 6f694c7a0..000000000
Binary files a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/img/dash.png and /dev/null differ
diff --git a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/img/gh.png b/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/img/gh.png
deleted file mode 100755
index 628da97c7..000000000
Binary files a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/img/gh.png and /dev/null differ
diff --git a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/img/spinner.gif b/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/img/spinner.gif
deleted file mode 100644
index e3038d0a4..000000000
Binary files a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/img/spinner.gif and /dev/null differ
diff --git a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/index.html b/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/index.html
deleted file mode 100644
index cb588bb2b..000000000
--- a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/index.html
+++ /dev/null
@@ -1,493 +0,0 @@
-
-
-
- BigInt Reference
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- BigInt Reference
-
- BigInt Reference
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
This repository provides integer types of arbitrary width implemented
-in 100% pure Swift. The underlying representation is in base 2^64, using Array<UInt64>
.
-
-
This module is handy when you need an integer type that’s wider than UIntMax
, but
-you don’t want to add The GNU Multiple Precision Arithmetic Library
-as a dependency.
-
-
Two big integer types are included: BigUInt
and BigInt
,
-the latter being the signed variant.
-Both of these are Swift structs with copy-on-write value semantics, and they can be used much
-like any other integer type.
-
-
The library provides implementations for some of the most frequently useful functions on
-big integers, including
-
-
-All functionality from Comparable
and Hashable
-The full set of arithmetic operators : +
, -
, *
, /
, %
, +=
, -=
, *=
, /=
, %=
-
-
-Addition and subtraction have variants that allow for
-shifting the digits of the second operand on the fly.
-Unsigned subtraction will trap when the result would be negative.
-(There are variants that return an overflow flag.)
-Multiplication uses brute force for numbers up to 1024 digits, then switches to Karatsuba’s recursive method.
-(This limit is configurable, see BigUInt.directMultiplicationLimit
.)
-A fused multiply-add method is also available, along with other special-case variants .
-Division uses Knuth’s Algorithm D, with its 3/2 digits wide quotient approximation.
-It will trap when the divisor is zero.
-BigUInt.divide
returns the quotient and
-remainder at once; this is faster than calculating them separately.
-
-Bitwise operators : ~
, |
, &
, ^
, |=
, &=
, ^=
, plus the following read-only properties:
-
-
-width
: the minimum number of bits required to store the integer,
-trailingZeroBitCount
: the number of trailing zero bits in the binary representation,
-leadingZeroBitCount
: the number of leading zero bits (when the last digit isn’t full),
-
-Shift operators : >>
, <<
, >>=
, <<=
-Methods to convert NSData
to big integers and vice versa.
-Support for generating random integers of specified maximum width or magnitude.
-Radix conversion to/from String
s and big integers up to base 36 (using repeated divisions).
-
-
-Big integers use this to implement StringLiteralConvertible
(in base 10).
-
-sqrt(n)
: The square root of an integer (using Newton’s method).
-BigUInt.gcd(n, m)
: The greatest common divisor of two integers (Stein’s algorithm).
-base.power(exponent, modulus)
: Modular exponentiation (right-to-left binary method).
-Vanilla exponentiation is also available.
-n.inverse(modulus)
: Multiplicative inverse in modulo arithmetic (extended Euclidean algorithm).
-n.isPrime()
: Miller–Rabin primality test.
-
-
-
The implementations are intended to be reasonably efficient, but they are unlikely to be
-competitive with GMP at all, even when I happened to implement an algorithm with same asymptotic
-behavior as GMP. (I haven’t performed a comparison benchmark, though.)
-
-
The library has 100% unit test coverage. Sadly this does not imply that there are no bugs
-in it.
-
-
-
Generated API docs are available at https://attaswift.github.io/BigInt/ .
-
-
-
BigInt can be used, distributed and modified under the MIT license .
-
-
-
BigInt 4.0.0 requires Swift 4.2 (The last version with support for Swift 3.x was BigInt 2.1.0.
-The last version with support for Swift 2 was BigInt 1.3.0.)
-
-
-
-Swift Version
-last BigInt Version
-
-
-
-3.x
-2.1.0
-
-
-4.0
-3.1.0
-
-
-4.2
-4.0.0
-
-
-5.x
-5.2.1
-
-
-
-
BigInt deploys to macOS 10.10, iOS 9, watchOS 2 and tvOS 9.
-It has been tested on the latest OS releases only—however, as the module uses very few platform-provided APIs,
-there should be very few issues with earlier versions.
-
-
BigInt uses no APIs specific to Apple platforms, so
-it should be easy to port it to other operating systems.
-
-
Setup instructions:
-
-
-Swift Package Manager:
-Although the Package Manager is still in its infancy, BigInt provides experimental support for it.
-Add this to the dependency section of your Package.swift
manifest:
-.package(url: "https://github.com/attaswift/BigInt.git", from: "5.2.1")
-
-CocoaPods: Put this in your Podfile
:
-pod 'BigInt', '~> 5.2'
-
-Carthage: Put this in your Cartfile
:
-github "attaswift/BigInt" ~> 5.2
-
-
-
-
-
BigUInt
is a MutableCollectionType
of its 64-bit digits, with the least significant
-digit at index 0. As a convenience, BigUInt
allows you to subscript it with indexes at
-or above its count
. The subscript operator returns 0 for out-of-bound get
s and
-automatically extends the array on out-of-bound set
s. This makes memory management simpler.
-
-
BigInt
is just a tiny wrapper around a BigUInt
absolute value and a
-sign bit , both of which are accessible as public read-write properties.
-
-
-
The types provided by BigInt
are not parametric—this is very much intentional, as
-Swift generics cost us dearly at runtime in this use case. In every approach I tried,
-making arbitrary-precision arithmetic operations work with a generic Digit
type parameter
-resulted in code that was literally ten times slower . If you can make the algorithms generic
-without such a huge performance hit, please enlighten me !
-
-
This is an area that I plan to investigate more, as it would be useful to have generic
-implementations for arbitrary-width arithmetic operations. (Polynomial division and decimal bases
-are two examples.) The library already implements double-digit multiplication and division as
-extension methods on a protocol with an associated type requirement; this has not measurably affected
-performance. Unfortunately, the same is not true for BigUInt
‘s methods.
-
-
Of course, as a last resort, we could just duplicate the code to create a separate
-generic variant that was slower but more flexible.
-
-
-
-
It is easy to use BigInt
to calculate the factorial function for any integer:
-
import BigInt
-
-func factorial(_ n: Int) -> BigInt {
- return (1 ... n).map { BigInt($0) }.reduce(BigInt(1), *)
-}
-
-print(factorial(10))
-==> 362880
-
-print(factorial(100))
-==> 93326215443944152681699238856266700490715968264381621468592963895217599993229915
- 6089414639761565182862536979208272237582511852109168640000000000000000000000
-
-print(factorial(1000))
-==> 40238726007709377354370243392300398571937486421071463254379991042993851239862902
- 05920442084869694048004799886101971960586316668729948085589013238296699445909974
- 24504087073759918823627727188732519779505950995276120874975462497043601418278094
- 64649629105639388743788648733711918104582578364784997701247663288983595573543251
- 31853239584630755574091142624174743493475534286465766116677973966688202912073791
- 43853719588249808126867838374559731746136085379534524221586593201928090878297308
- 43139284440328123155861103697680135730421616874760967587134831202547858932076716
- 91324484262361314125087802080002616831510273418279777047846358681701643650241536
- 91398281264810213092761244896359928705114964975419909342221566832572080821333186
- 11681155361583654698404670897560290095053761647584772842188967964624494516076535
- 34081989013854424879849599533191017233555566021394503997362807501378376153071277
- 61926849034352625200015888535147331611702103968175921510907788019393178114194545
- 25722386554146106289218796022383897147608850627686296714667469756291123408243920
- 81601537808898939645182632436716167621791689097799119037540312746222899880051954
- 44414282012187361745992642956581746628302955570299024324153181617210465832036786
- 90611726015878352075151628422554026517048330422614397428693306169089796848259012
- 54583271682264580665267699586526822728070757813918581788896522081643483448259932
- 66043367660176999612831860788386150279465955131156552036093988180612138558600301
- 43569452722420634463179746059468257310379008402443243846565724501440282188525247
- 09351906209290231364932734975655139587205596542287497740114133469627154228458623
- 77387538230483865688976461927383814900140767310446640259899490222221765904339901
- 88601856652648506179970235619389701786004081188972991831102117122984590164192106
- 88843871218556461249607987229085192968193723886426148396573822911231250241866493
- 53143970137428531926649875337218940694281434118520158014123344828015051399694290
- 15348307764456909907315243327828826986460278986432113908350621709500259738986355
- 42771967428222487575867657523442202075736305694988250879689281627538488633969099
- 59826280956121450994871701244516461260379029309120889086942028510640182154399457
- 15680594187274899809425474217358240106367740459574178516082923013535808184009699
- 63725242305608559037006242712434169090041536901059339838357779394109700277534720
- 00000000000000000000000000000000000000000000000000000000000000000000000000000000
- 00000000000000000000000000000000000000000000000000000000000000000000000000000000
- 00000000000000000000000000000000000000000000000000000000000000000000000000000000
- 00000
-
-
-
Well, I guess that’s all right, but it’s not very interesting. Let’s try something more useful.
-
-
-
The BigInt
module provides all necessary parts to implement an (overly)
-simple RSA cryptography system .
-
-
Let’s start with a simple function that generates a random n-bit prime. The module
-includes a function to generate random integers of a specific size, and also an
-isPrime
method that performs the Miller–Rabin primality test. These are all we need:
-
func generatePrime(_ width: Int) -> BigUInt {
- while true {
- var random = BigUInt.randomInteger(withExactWidth: width)
- random |= BigUInt(1)
- if random.isPrime() {
- return random
- }
- }
-}
-
-let p = generatePrime(1024)
-==> 13308187650642192396256419911012544845370493728424936791561478318443071617242872
- 81980956747087187419914435169914161116601678883358611076800743580556055714173922
- 08406194264346635072293912609713085260354070700055888678514690878149253177960273
- 775659537560220378850112471985434373425534121373466492101182463962031
-
-let q = generatePrime(1024)
-==> 17072954422657145489547308812333368925007949054501204983863958355897172093173783
- 10108226596943999553784252564650624766276133157586733504784616138305701168410157
- 80784336308507083874651158029602582993233111593356512531869546706885170044355115
- 669728424124141763799008880327106952436883614887277350838425336156327
-
-
-
Cool! Now that we have two large primes, we can produce an RSA public/private keypair
-out of them.
-
typealias Key = (modulus: BigUInt, exponent: BigUInt)
-
-let n = p * q
-==> 22721008120758282530010953362926306641542233757318103044313144976976529789946696
- 15454966720907712515917481418981591379647635391260569349099666410127279690367978
- 81184375533755888994370640857883754985364288413796100527262763202679037134021810
- 57933883525572232242690805678883227791774442041516929419640051653934584376704034
- 63953169772816907280591934423237977258358097846511079947337857778137177570668391
- 57455417707100275487770399281417352829897118140972240757708561027087217205975220
- 02207275447810167397968435583004676293892340103729490987263776871467057582629588
- 916498579594964478080508868267360515953225283461208420137
-
-let e: BigUInt = 65537
-let phi = (p - 1) * (q - 1)
-let d = e.inverse(phi)! // d * e % phi == 1
-==> 13964664343869014759736350480776837992604500903989703383202366291905558996277719
- 77822086142456362972689566985925179681282432115598451765899180050962461295573831
- 37069237934291884106584820998146965085531433195106686745474222222620986858696591
- 69836532468835154412554521152103642453158895363417640676611704542784576974374954
- 45789456921660619938185093118762690200980720312508614337759620606992462563490422
- 76669559556568917533268479190948959560397579572761529852891246283539604545691244
- 89999692877158676643042118662613875863504016129837099223040687512684532694527109
- 80742873307409704484365002175294665608486688146261327793
-
-let publicKey: Key = (n, e)
-let privateKey: Key = (n, d)
-
-
-
In RSA, modular exponentiation is used to encrypt (and decrypt) messages.
-
func encrypt(_ message: BigUInt, key: Key) -> BigUInt {
- return message.power(key.exponent, modulus: key.modulus)
-}
-
-
-
Let’s try out our new keypair by converting a string into UTF-8, interpreting
-the resulting binary representation as a big integer, and encrypting it with the
-public key. BigUInt
has an initializer that takes an NSData
, so this is pretty
-easy to do:
-
let secret: BigUInt = BigUInt("Arbitrary precision arithmetic is fun!".dataUsingEncoding(NSUTF8StringEncoding)!)
-==> 83323446846105976078466731524728681905293067701804838925389198929123912971229457
- 68818568737
-
-let cyphertext = encrypt(secret, key: publicKey)
-==> 95186982543485985200666516508066093880038842892337880561554910904277290917831453
- 54854954722744805432145474047391353716305176389470779020645959135298322520888633
- 61674945129099575943384767330342554525120384485469428048962027149169876127890306
- 77028183904699491962050888974524603226290836984166164759586952419343589385279641
- 47999991283152843977988979846238236160274201261075188190509539751990119132013021
- 74866638595734222867005089157198503204192264814750832072844208520394603054901706
- 06024394731371973402595826456435944968439153664617188570808940022471990638468783
- 49208193955207336172861151720299024935127021719852700882
-
-
-
Well, it looks encrypted all right, but can we get the original message back?
-In theory, encrypting the cyphertext with the private key returns the original message.
-Let’s see:
-
let plaintext = encrypt(cyphertext, key: privateKey)
-==> 83323446846105976078466731524728681905293067701804838925389198929123912971229457
- 68818568737
-
-let received = String(data: plaintext.serialize(), encoding: NSUTF8StringEncoding)
-==> "Arbitrary precision arithmetic is fun!"
-
-
-
Yay! This is truly terrific, but please don’t use this example code in an actual
-cryptography system. RSA has lots of subtle (and some not so subtle) complications
-that we ignored to keep this example short.
-
-
-
Another fun activity to try with BigInt
s is to generate the digits of π.
-Let’s try implementing Jeremy Gibbon’s spigot algorithm .
-This is a rather slow algorithm as π-generators go, but it makes up for it with its grooviness
-factor: it’s remarkably short, it only uses (big) integer arithmetic, and every iteration
-produces a single new digit in the base-10 representation of π. This naturally leads to an
-implementation as an infinite GeneratorType
:
-
func digitsOfPi() -> AnyGenerator<Int> {
- var q: BigUInt = 1
- var r: BigUInt = 180
- var t: BigUInt = 60
- var i: UInt64 = 2 // Does not overflow until digit #826_566_842
- return AnyIterator {
- let u: UInt64 = 3 * (3 * i + 1) * (3 * i + 2)
- let y = (q.multiplied(byDigit: 27 * i - 12) + 5 * r) / (5 * t)
- (q, r, t) = (
- 10 * q.multiplied(byDigit: i * (2 * i - 1)),
- 10 * (q.multiplied(byDigit: 5 * i - 2) + r - y * t).multiplied(byDigit: u),
- t.multiplied(byDigit: u))
- i += 1
- return Int(y[0])
- }
-}
-
-
-
Well, that was surprisingly easy. But does it work? Of course it does!
-
var digits = "π ≈ "
-var count = 0
-for digit in digitsOfPi() {
- assert(digit < 10)
- digits += String(digit)
- count += 1
- if count == 1 { digits += "." }
- if count == 1000 { break }
-}
-
-digits
-==> π ≈ 3.14159265358979323846264338327950288419716939937510582097494459230781640628
- 62089986280348253421170679821480865132823066470938446095505822317253594081284811
- 17450284102701938521105559644622948954930381964428810975665933446128475648233786
- 78316527120190914564856692346034861045432664821339360726024914127372458700660631
- 55881748815209209628292540917153643678925903600113305305488204665213841469519415
- 11609433057270365759591953092186117381932611793105118548074462379962749567351885
- 75272489122793818301194912983367336244065664308602139494639522473719070217986094
- 37027705392171762931767523846748184676694051320005681271452635608277857713427577
- 89609173637178721468440901224953430146549585371050792279689258923542019956112129
- 02196086403441815981362977477130996051870721134999999837297804995105973173281609
- 63185950244594553469083026425223082533446850352619311881710100031378387528865875
- 33208381420617177669147303598253490428755468731159562863882353787593751957781857
- 780532171226806613001927876611195909216420198
-
-
-
Now go and have some fun with big integers on your own!
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/js/jazzy.js b/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/js/jazzy.js
deleted file mode 100755
index 1e55d6ef0..000000000
--- a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/js/jazzy.js
+++ /dev/null
@@ -1,70 +0,0 @@
-window.jazzy = {'docset': false}
-if (typeof window.dash != 'undefined') {
- document.documentElement.className += ' dash'
- window.jazzy.docset = true
-}
-if (navigator.userAgent.match(/xcode/i)) {
- document.documentElement.className += ' xcode'
- window.jazzy.docset = true
-}
-
-function toggleItem($link, $content) {
- var animationDuration = 300;
- $link.toggleClass('token-open');
- $content.slideToggle(animationDuration);
-}
-
-function itemLinkToContent($link) {
- return $link.parent().parent().next();
-}
-
-// On doc load + hash-change, open any targetted item
-function openCurrentItemIfClosed() {
- if (window.jazzy.docset) {
- return;
- }
- var $link = $(`a[name="${location.hash.substring(1)}"]`).nextAll('.token');
- $content = itemLinkToContent($link);
- if ($content.is(':hidden')) {
- toggleItem($link, $content);
- }
-}
-
-$(openCurrentItemIfClosed);
-$(window).on('hashchange', openCurrentItemIfClosed);
-
-// On item link ('token') click, toggle its discussion
-$('.token').on('click', function(event) {
- if (window.jazzy.docset) {
- return;
- }
- var $link = $(this);
- toggleItem($link, itemLinkToContent($link));
-
- // Keeps the document from jumping to the hash.
- var href = $link.attr('href');
- if (history.pushState) {
- history.pushState({}, '', href);
- } else {
- location.hash = href;
- }
- event.preventDefault();
-});
-
-// Clicks on links to the current, closed, item need to open the item
-$("a:not('.token')").on('click', function() {
- if (location == this.href) {
- openCurrentItemIfClosed();
- }
-});
-
-// KaTeX rendering
-if ("katex" in window) {
- $($('.math').each( (_, element) => {
- katex.render(element.textContent, element, {
- displayMode: $(element).hasClass('m-block'),
- throwOnError: false,
- trust: true
- });
- }))
-}
diff --git a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/js/jazzy.search.js b/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/js/jazzy.search.js
deleted file mode 100644
index e3d1ab905..000000000
--- a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/js/jazzy.search.js
+++ /dev/null
@@ -1,70 +0,0 @@
-$(function(){
- var $typeahead = $('[data-typeahead]');
- var $form = $typeahead.parents('form');
- var searchURL = $form.attr('action');
-
- function displayTemplate(result) {
- return result.name;
- }
-
- function suggestionTemplate(result) {
- var t = '';
- t += '' + result.name + ' ';
- if (result.parent_name) {
- t += '' + result.parent_name + ' ';
- }
- t += '
';
- return t;
- }
-
- $typeahead.one('focus', function() {
- $form.addClass('loading');
-
- $.getJSON(searchURL).then(function(searchData) {
- const searchIndex = lunr(function() {
- this.ref('url');
- this.field('name');
- this.field('abstract');
- for (const [url, doc] of Object.entries(searchData)) {
- this.add({url: url, name: doc.name, abstract: doc.abstract});
- }
- });
-
- $typeahead.typeahead(
- {
- highlight: true,
- minLength: 3,
- autoselect: true
- },
- {
- limit: 10,
- display: displayTemplate,
- templates: { suggestion: suggestionTemplate },
- source: function(query, sync) {
- const lcSearch = query.toLowerCase();
- const results = searchIndex.query(function(q) {
- q.term(lcSearch, { boost: 100 });
- q.term(lcSearch, {
- boost: 10,
- wildcard: lunr.Query.wildcard.TRAILING
- });
- }).map(function(result) {
- var doc = searchData[result.ref];
- doc.url = result.ref;
- return doc;
- });
- sync(results);
- }
- }
- );
- $form.removeClass('loading');
- $typeahead.trigger('focus');
- });
- });
-
- var baseURL = searchURL.slice(0, -"search.json".length);
-
- $typeahead.on('typeahead:select', function(e, result) {
- window.location = baseURL + result.url;
- });
-});
diff --git a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/js/jquery.min.js b/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/js/jquery.min.js
deleted file mode 100644
index b0614034a..000000000
--- a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/js/jquery.min.js
+++ /dev/null
@@ -1,2 +0,0 @@
-/*! jQuery v3.5.1 | (c) JS Foundation and other contributors | jquery.org/license */
-!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.5.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML=" ",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML=" ";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||j,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,j=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML=" ",y.option=!!ce.lastChild;var ge={thead:[1,""],col:[2,""],tr:[2,""],td:[3,""],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function qe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):("number"==typeof f.top&&(f.top+="px"),"number"==typeof f.left&&(f.left+="px"),c.css(f))}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=$e(y.pixelPosition,function(e,t){if(t)return t=Be(e,n),Me.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 00){var c=e.utils.clone(r)||{};c.position=[a,l],c.index=s.length,s.push(new e.Token(i.slice(a,o),c))}a=o+1}}return s},e.tokenizer.separator=/[\s\-]+/,e.Pipeline=function(){this._stack=[]},e.Pipeline.registeredFunctions=Object.create(null),e.Pipeline.registerFunction=function(t,r){r in this.registeredFunctions&&e.utils.warn("Overwriting existing registered function: "+r),t.label=r,e.Pipeline.registeredFunctions[t.label]=t},e.Pipeline.warnIfFunctionNotRegistered=function(t){var r=t.label&&t.label in this.registeredFunctions;r||e.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",t)},e.Pipeline.load=function(t){var r=new e.Pipeline;return t.forEach(function(t){var i=e.Pipeline.registeredFunctions[t];if(!i)throw new Error("Cannot load unregistered function: "+t);r.add(i)}),r},e.Pipeline.prototype.add=function(){var t=Array.prototype.slice.call(arguments);t.forEach(function(t){e.Pipeline.warnIfFunctionNotRegistered(t),this._stack.push(t)},this)},e.Pipeline.prototype.after=function(t,r){e.Pipeline.warnIfFunctionNotRegistered(r);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");i+=1,this._stack.splice(i,0,r)},e.Pipeline.prototype.before=function(t,r){e.Pipeline.warnIfFunctionNotRegistered(r);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");this._stack.splice(i,0,r)},e.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);t!=-1&&this._stack.splice(t,1)},e.Pipeline.prototype.run=function(e){for(var t=this._stack.length,r=0;r1&&(se&&(r=n),s!=e);)i=r-t,n=t+Math.floor(i/2),s=this.elements[2*n];return s==e?2*n:s>e?2*n:sa?l+=2:o==a&&(t+=r[u+1]*i[l+1],u+=2,l+=2);return t},e.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},e.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,r=0;t0){var o,a=s.str.charAt(0);a in s.node.edges?o=s.node.edges[a]:(o=new e.TokenSet,s.node.edges[a]=o),1==s.str.length&&(o["final"]=!0),n.push({node:o,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(0!=s.editsRemaining){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new e.TokenSet;s.node.edges["*"]=u}if(0==s.str.length&&(u["final"]=!0),n.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&n.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),1==s.str.length&&(s.node["final"]=!0),s.str.length>=1){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new e.TokenSet;s.node.edges["*"]=l}1==s.str.length&&(l["final"]=!0),n.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var c,h=s.str.charAt(0),d=s.str.charAt(1);d in s.node.edges?c=s.node.edges[d]:(c=new e.TokenSet,s.node.edges[d]=c),1==s.str.length&&(c["final"]=!0),n.push({node:c,editsRemaining:s.editsRemaining-1,str:h+s.str.slice(2)})}}}return i},e.TokenSet.fromString=function(t){for(var r=new e.TokenSet,i=r,n=0,s=t.length;n=e;t--){var r=this.uncheckedNodes[t],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r["char"]]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}},e.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},e.Index.prototype.search=function(t){return this.query(function(r){var i=new e.QueryParser(t,r);i.parse()})},e.Index.prototype.query=function(t){for(var r=new e.Query(this.fields),i=Object.create(null),n=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),u=0;u1?this._b=1:this._b=e},e.Builder.prototype.k1=function(e){this._k1=e},e.Builder.prototype.add=function(t,r){var i=t[this._ref],n=Object.keys(this._fields);this._documents[i]=r||{},this.documentCount+=1;for(var s=0;s=this.length)return e.QueryLexer.EOS;var t=this.str.charAt(this.pos);return this.pos+=1,t},e.QueryLexer.prototype.width=function(){return this.pos-this.start},e.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},e.QueryLexer.prototype.backup=function(){this.pos-=1},e.QueryLexer.prototype.acceptDigitRun=function(){var t,r;do t=this.next(),r=t.charCodeAt(0);while(r>47&&r<58);t!=e.QueryLexer.EOS&&this.backup()},e.QueryLexer.prototype.more=function(){return this.pos1&&(t.backup(),t.emit(e.QueryLexer.TERM)),t.ignore(),t.more())return e.QueryLexer.lexText},e.QueryLexer.lexEditDistance=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.EDIT_DISTANCE),e.QueryLexer.lexText},e.QueryLexer.lexBoost=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.BOOST),e.QueryLexer.lexText},e.QueryLexer.lexEOS=function(t){t.width()>0&&t.emit(e.QueryLexer.TERM)},e.QueryLexer.termSeparator=e.tokenizer.separator,e.QueryLexer.lexText=function(t){for(;;){var r=t.next();if(r==e.QueryLexer.EOS)return e.QueryLexer.lexEOS;if(92!=r.charCodeAt(0)){if(":"==r)return e.QueryLexer.lexField;if("~"==r)return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexEditDistance;if("^"==r)return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexBoost;if("+"==r&&1===t.width())return t.emit(e.QueryLexer.PRESENCE),e.QueryLexer.lexText;if("-"==r&&1===t.width())return t.emit(e.QueryLexer.PRESENCE),e.QueryLexer.lexText;if(r.match(e.QueryLexer.termSeparator))return e.QueryLexer.lexTerm}else t.escapeCharacter()}},e.QueryParser=function(t,r){this.lexer=new e.QueryLexer(t),this.query=r,this.currentClause={},this.lexemeIdx=0},e.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var t=e.QueryParser.parseClause;t;)t=t(this);return this.query},e.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},e.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},e.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},e.QueryParser.parseClause=function(t){var r=t.peekLexeme();if(void 0!=r)switch(r.type){case e.QueryLexer.PRESENCE:return e.QueryParser.parsePresence;case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expected either a field or a term, found "+r.type;throw r.str.length>=1&&(i+=" with value '"+r.str+"'"),new e.QueryParseError(i,r.start,r.end)}},e.QueryParser.parsePresence=function(t){var r=t.consumeLexeme();if(void 0!=r){switch(r.str){case"-":t.currentClause.presence=e.Query.presence.PROHIBITED;break;case"+":t.currentClause.presence=e.Query.presence.REQUIRED;break;default:var i="unrecognised presence operator'"+r.str+"'";throw new e.QueryParseError(i,r.start,r.end)}var n=t.peekLexeme();if(void 0==n){var i="expecting term or field, found nothing";throw new e.QueryParseError(i,r.start,r.end)}switch(n.type){case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expecting term or field, found '"+n.type+"'";throw new e.QueryParseError(i,n.start,n.end)}}},e.QueryParser.parseField=function(t){var r=t.consumeLexeme();if(void 0!=r){if(t.query.allFields.indexOf(r.str)==-1){var i=t.query.allFields.map(function(e){return"'"+e+"'"}).join(", "),n="unrecognised field '"+r.str+"', possible fields: "+i;throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.fields=[r.str];var s=t.peekLexeme();if(void 0==s){var n="expecting term, found nothing";throw new e.QueryParseError(n,r.start,r.end)}switch(s.type){case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var n="expecting term, found '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},e.QueryParser.parseTerm=function(t){var r=t.consumeLexeme();if(void 0!=r){t.currentClause.term=r.str.toLowerCase(),r.str.indexOf("*")!=-1&&(t.currentClause.usePipeline=!1);var i=t.peekLexeme();if(void 0==i)return void t.nextClause();switch(i.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+i.type+"'";throw new e.QueryParseError(n,i.start,i.end)}}},e.QueryParser.parseEditDistance=function(t){var r=t.consumeLexeme();if(void 0!=r){var i=parseInt(r.str,10);if(isNaN(i)){var n="edit distance must be numeric";throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.editDistance=i;var s=t.peekLexeme();if(void 0==s)return void t.nextClause();switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},e.QueryParser.parseBoost=function(t){var r=t.consumeLexeme();if(void 0!=r){var i=parseInt(r.str,10);if(isNaN(i)){var n="boost must be numeric";throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.boost=i;var s=t.peekLexeme();if(void 0==s)return void t.nextClause();switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.lunr=t()}(this,function(){return e})}();
diff --git a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/js/typeahead.jquery.js b/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/js/typeahead.jquery.js
deleted file mode 100644
index 3a2d2ab03..000000000
--- a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/js/typeahead.jquery.js
+++ /dev/null
@@ -1,1694 +0,0 @@
-/*!
- * typeahead.js 1.3.1
- * https://github.com/corejavascript/typeahead.js
- * Copyright 2013-2020 Twitter, Inc. and other contributors; Licensed MIT
- */
-
-
-(function(root, factory) {
- if (typeof define === "function" && define.amd) {
- define([ "jquery" ], function(a0) {
- return factory(a0);
- });
- } else if (typeof module === "object" && module.exports) {
- module.exports = factory(require("jquery"));
- } else {
- factory(root["jQuery"]);
- }
-})(this, function($) {
- var _ = function() {
- "use strict";
- return {
- isMsie: function() {
- return /(msie|trident)/i.test(navigator.userAgent) ? navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2] : false;
- },
- isBlankString: function(str) {
- return !str || /^\s*$/.test(str);
- },
- escapeRegExChars: function(str) {
- return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
- },
- isString: function(obj) {
- return typeof obj === "string";
- },
- isNumber: function(obj) {
- return typeof obj === "number";
- },
- isArray: $.isArray,
- isFunction: $.isFunction,
- isObject: $.isPlainObject,
- isUndefined: function(obj) {
- return typeof obj === "undefined";
- },
- isElement: function(obj) {
- return !!(obj && obj.nodeType === 1);
- },
- isJQuery: function(obj) {
- return obj instanceof $;
- },
- toStr: function toStr(s) {
- return _.isUndefined(s) || s === null ? "" : s + "";
- },
- bind: $.proxy,
- each: function(collection, cb) {
- $.each(collection, reverseArgs);
- function reverseArgs(index, value) {
- return cb(value, index);
- }
- },
- map: $.map,
- filter: $.grep,
- every: function(obj, test) {
- var result = true;
- if (!obj) {
- return result;
- }
- $.each(obj, function(key, val) {
- if (!(result = test.call(null, val, key, obj))) {
- return false;
- }
- });
- return !!result;
- },
- some: function(obj, test) {
- var result = false;
- if (!obj) {
- return result;
- }
- $.each(obj, function(key, val) {
- if (result = test.call(null, val, key, obj)) {
- return false;
- }
- });
- return !!result;
- },
- mixin: $.extend,
- identity: function(x) {
- return x;
- },
- clone: function(obj) {
- return $.extend(true, {}, obj);
- },
- getIdGenerator: function() {
- var counter = 0;
- return function() {
- return counter++;
- };
- },
- templatify: function templatify(obj) {
- return $.isFunction(obj) ? obj : template;
- function template() {
- return String(obj);
- }
- },
- defer: function(fn) {
- setTimeout(fn, 0);
- },
- debounce: function(func, wait, immediate) {
- var timeout, result;
- return function() {
- var context = this, args = arguments, later, callNow;
- later = function() {
- timeout = null;
- if (!immediate) {
- result = func.apply(context, args);
- }
- };
- callNow = immediate && !timeout;
- clearTimeout(timeout);
- timeout = setTimeout(later, wait);
- if (callNow) {
- result = func.apply(context, args);
- }
- return result;
- };
- },
- throttle: function(func, wait) {
- var context, args, timeout, result, previous, later;
- previous = 0;
- later = function() {
- previous = new Date();
- timeout = null;
- result = func.apply(context, args);
- };
- return function() {
- var now = new Date(), remaining = wait - (now - previous);
- context = this;
- args = arguments;
- if (remaining <= 0) {
- clearTimeout(timeout);
- timeout = null;
- previous = now;
- result = func.apply(context, args);
- } else if (!timeout) {
- timeout = setTimeout(later, remaining);
- }
- return result;
- };
- },
- stringify: function(val) {
- return _.isString(val) ? val : JSON.stringify(val);
- },
- guid: function() {
- function _p8(s) {
- var p = (Math.random().toString(16) + "000000000").substr(2, 8);
- return s ? "-" + p.substr(0, 4) + "-" + p.substr(4, 4) : p;
- }
- return "tt-" + _p8() + _p8(true) + _p8(true) + _p8();
- },
- noop: function() {}
- };
- }();
- var WWW = function() {
- "use strict";
- var defaultClassNames = {
- wrapper: "twitter-typeahead",
- input: "tt-input",
- hint: "tt-hint",
- menu: "tt-menu",
- dataset: "tt-dataset",
- suggestion: "tt-suggestion",
- selectable: "tt-selectable",
- empty: "tt-empty",
- open: "tt-open",
- cursor: "tt-cursor",
- highlight: "tt-highlight"
- };
- return build;
- function build(o) {
- var www, classes;
- classes = _.mixin({}, defaultClassNames, o);
- www = {
- css: buildCss(),
- classes: classes,
- html: buildHtml(classes),
- selectors: buildSelectors(classes)
- };
- return {
- css: www.css,
- html: www.html,
- classes: www.classes,
- selectors: www.selectors,
- mixin: function(o) {
- _.mixin(o, www);
- }
- };
- }
- function buildHtml(c) {
- return {
- wrapper: ' ',
- menu: ''
- };
- }
- function buildSelectors(classes) {
- var selectors = {};
- _.each(classes, function(v, k) {
- selectors[k] = "." + v;
- });
- return selectors;
- }
- function buildCss() {
- var css = {
- wrapper: {
- position: "relative",
- display: "inline-block"
- },
- hint: {
- position: "absolute",
- top: "0",
- left: "0",
- borderColor: "transparent",
- boxShadow: "none",
- opacity: "1"
- },
- input: {
- position: "relative",
- verticalAlign: "top",
- backgroundColor: "transparent"
- },
- inputWithNoHint: {
- position: "relative",
- verticalAlign: "top"
- },
- menu: {
- position: "absolute",
- top: "100%",
- left: "0",
- zIndex: "100",
- display: "none"
- },
- ltr: {
- left: "0",
- right: "auto"
- },
- rtl: {
- left: "auto",
- right: " 0"
- }
- };
- if (_.isMsie()) {
- _.mixin(css.input, {
- backgroundImage: "url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"
- });
- }
- return css;
- }
- }();
- var EventBus = function() {
- "use strict";
- var namespace, deprecationMap;
- namespace = "typeahead:";
- deprecationMap = {
- render: "rendered",
- cursorchange: "cursorchanged",
- select: "selected",
- autocomplete: "autocompleted"
- };
- function EventBus(o) {
- if (!o || !o.el) {
- $.error("EventBus initialized without el");
- }
- this.$el = $(o.el);
- }
- _.mixin(EventBus.prototype, {
- _trigger: function(type, args) {
- var $e = $.Event(namespace + type);
- this.$el.trigger.call(this.$el, $e, args || []);
- return $e;
- },
- before: function(type) {
- var args, $e;
- args = [].slice.call(arguments, 1);
- $e = this._trigger("before" + type, args);
- return $e.isDefaultPrevented();
- },
- trigger: function(type) {
- var deprecatedType;
- this._trigger(type, [].slice.call(arguments, 1));
- if (deprecatedType = deprecationMap[type]) {
- this._trigger(deprecatedType, [].slice.call(arguments, 1));
- }
- }
- });
- return EventBus;
- }();
- var EventEmitter = function() {
- "use strict";
- var splitter = /\s+/, nextTick = getNextTick();
- return {
- onSync: onSync,
- onAsync: onAsync,
- off: off,
- trigger: trigger
- };
- function on(method, types, cb, context) {
- var type;
- if (!cb) {
- return this;
- }
- types = types.split(splitter);
- cb = context ? bindContext(cb, context) : cb;
- this._callbacks = this._callbacks || {};
- while (type = types.shift()) {
- this._callbacks[type] = this._callbacks[type] || {
- sync: [],
- async: []
- };
- this._callbacks[type][method].push(cb);
- }
- return this;
- }
- function onAsync(types, cb, context) {
- return on.call(this, "async", types, cb, context);
- }
- function onSync(types, cb, context) {
- return on.call(this, "sync", types, cb, context);
- }
- function off(types) {
- var type;
- if (!this._callbacks) {
- return this;
- }
- types = types.split(splitter);
- while (type = types.shift()) {
- delete this._callbacks[type];
- }
- return this;
- }
- function trigger(types) {
- var type, callbacks, args, syncFlush, asyncFlush;
- if (!this._callbacks) {
- return this;
- }
- types = types.split(splitter);
- args = [].slice.call(arguments, 1);
- while ((type = types.shift()) && (callbacks = this._callbacks[type])) {
- syncFlush = getFlush(callbacks.sync, this, [ type ].concat(args));
- asyncFlush = getFlush(callbacks.async, this, [ type ].concat(args));
- syncFlush() && nextTick(asyncFlush);
- }
- return this;
- }
- function getFlush(callbacks, context, args) {
- return flush;
- function flush() {
- var cancelled;
- for (var i = 0, len = callbacks.length; !cancelled && i < len; i += 1) {
- cancelled = callbacks[i].apply(context, args) === false;
- }
- return !cancelled;
- }
- }
- function getNextTick() {
- var nextTickFn;
- if (window.setImmediate) {
- nextTickFn = function nextTickSetImmediate(fn) {
- setImmediate(function() {
- fn();
- });
- };
- } else {
- nextTickFn = function nextTickSetTimeout(fn) {
- setTimeout(function() {
- fn();
- }, 0);
- };
- }
- return nextTickFn;
- }
- function bindContext(fn, context) {
- return fn.bind ? fn.bind(context) : function() {
- fn.apply(context, [].slice.call(arguments, 0));
- };
- }
- }();
- var highlight = function(doc) {
- "use strict";
- var defaults = {
- node: null,
- pattern: null,
- tagName: "strong",
- className: null,
- wordsOnly: false,
- caseSensitive: false,
- diacriticInsensitive: false
- };
- var accented = {
- A: "[AaªÀ-Åà-åĀ-ąǍǎȀ-ȃȦȧᴬᵃḀḁẚẠ-ảₐ℀℁℻⒜Ⓐⓐ㍱-㍴㎀-㎄㎈㎉㎩-㎯㏂㏊㏟㏿Aa]",
- B: "[BbᴮᵇḂ-ḇℬ⒝Ⓑⓑ㍴㎅-㎇㏃㏈㏔㏝Bb]",
- C: "[CcÇçĆ-čᶜ℀ℂ℃℅℆ℭⅭⅽ⒞Ⓒⓒ㍶㎈㎉㎝㎠㎤㏄-㏇Cc]",
- D: "[DdĎďDŽ-džDZ-dzᴰᵈḊ-ḓⅅⅆⅮⅾ⒟Ⓓⓓ㋏㍲㍷-㍹㎗㎭-㎯㏅㏈Dd]",
- E: "[EeÈ-Ëè-ëĒ-ěȄ-ȇȨȩᴱᵉḘ-ḛẸ-ẽₑ℡ℯℰⅇ⒠Ⓔⓔ㉐㋍㋎Ee]",
- F: "[FfᶠḞḟ℉ℱ℻⒡Ⓕⓕ㎊-㎌㎙ff-fflFf]",
- G: "[GgĜ-ģǦǧǴǵᴳᵍḠḡℊ⒢Ⓖⓖ㋌㋍㎇㎍-㎏㎓㎬㏆㏉㏒㏿Gg]",
- H: "[HhĤĥȞȟʰᴴḢ-ḫẖℋ-ℎ⒣Ⓗⓗ㋌㍱㎐-㎔㏊㏋㏗Hh]",
- I: "[IiÌ-Ïì-ïĨ-İIJijǏǐȈ-ȋᴵᵢḬḭỈ-ịⁱℐℑℹⅈⅠ-ⅣⅥ-ⅨⅪⅫⅰ-ⅳⅵ-ⅸⅺⅻ⒤Ⓘⓘ㍺㏌㏕fiffiIi]",
- J: "[JjIJ-ĵLJ-njǰʲᴶⅉ⒥ⒿⓙⱼJj]",
- K: "[KkĶķǨǩᴷᵏḰ-ḵK⒦Ⓚⓚ㎄㎅㎉㎏㎑㎘㎞㎢㎦㎪㎸㎾㏀㏆㏍-㏏Kk]",
- L: "[LlĹ-ŀLJ-ljˡᴸḶḷḺ-ḽℒℓ℡Ⅼⅼ⒧Ⓛⓛ㋏㎈㎉㏐-㏓㏕㏖㏿flfflLl]",
- M: "[MmᴹᵐḾ-ṃ℠™ℳⅯⅿ⒨Ⓜⓜ㍷-㍹㎃㎆㎎㎒㎖㎙-㎨㎫㎳㎷㎹㎽㎿㏁㏂㏎㏐㏔-㏖㏘㏙㏞㏟Mm]",
- N: "[NnÑñŃ-ʼnNJ-njǸǹᴺṄ-ṋⁿℕ№⒩Ⓝⓝ㎁㎋㎚㎱㎵㎻㏌㏑Nn]",
- O: "[OoºÒ-Öò-öŌ-őƠơǑǒǪǫȌ-ȏȮȯᴼᵒỌ-ỏₒ℅№ℴ⒪Ⓞⓞ㍵㏇㏒㏖Oo]",
- P: "[PpᴾᵖṔ-ṗℙ⒫Ⓟⓟ㉐㍱㍶㎀㎊㎩-㎬㎰㎴㎺㏋㏗-㏚Pp]",
- Q: "[Qqℚ⒬Ⓠⓠ㏃Qq]",
- R: "[RrŔ-řȐ-ȓʳᴿᵣṘ-ṛṞṟ₨ℛ-ℝ⒭Ⓡⓡ㋍㍴㎭-㎯㏚㏛Rr]",
- S: "[SsŚ-šſȘșˢṠ-ṣ₨℁℠⒮Ⓢⓢ㎧㎨㎮-㎳㏛㏜stSs]",
- T: "[TtŢ-ťȚțᵀᵗṪ-ṱẗ℡™⒯Ⓣⓣ㉐㋏㎔㏏ſtstTt]",
- U: "[UuÙ-Üù-üŨ-ųƯưǓǔȔ-ȗᵁᵘᵤṲ-ṷỤ-ủ℆⒰Ⓤⓤ㍳㍺Uu]",
- V: "[VvᵛᵥṼ-ṿⅣ-Ⅷⅳ-ⅷ⒱Ⓥⓥⱽ㋎㍵㎴-㎹㏜㏞Vv]",
- W: "[WwŴŵʷᵂẀ-ẉẘ⒲Ⓦⓦ㎺-㎿㏝Ww]",
- X: "[XxˣẊ-ẍₓ℻Ⅸ-Ⅻⅸ-ⅻ⒳Ⓧⓧ㏓Xx]",
- Y: "[YyÝýÿŶ-ŸȲȳʸẎẏẙỲ-ỹ⒴Ⓨⓨ㏉Yy]",
- Z: "[ZzŹ-žDZ-dzᶻẐ-ẕℤℨ⒵Ⓩⓩ㎐-㎔Zz]"
- };
- return function hightlight(o) {
- var regex;
- o = _.mixin({}, defaults, o);
- if (!o.node || !o.pattern) {
- return;
- }
- o.pattern = _.isArray(o.pattern) ? o.pattern : [ o.pattern ];
- regex = getRegex(o.pattern, o.caseSensitive, o.wordsOnly, o.diacriticInsensitive);
- traverse(o.node, hightlightTextNode);
- function hightlightTextNode(textNode) {
- var match, patternNode, wrapperNode;
- if (match = regex.exec(textNode.data)) {
- wrapperNode = doc.createElement(o.tagName);
- o.className && (wrapperNode.className = o.className);
- patternNode = textNode.splitText(match.index);
- patternNode.splitText(match[0].length);
- wrapperNode.appendChild(patternNode.cloneNode(true));
- textNode.parentNode.replaceChild(wrapperNode, patternNode);
- }
- return !!match;
- }
- function traverse(el, hightlightTextNode) {
- var childNode, TEXT_NODE_TYPE = 3;
- for (var i = 0; i < el.childNodes.length; i++) {
- childNode = el.childNodes[i];
- if (childNode.nodeType === TEXT_NODE_TYPE) {
- i += hightlightTextNode(childNode) ? 1 : 0;
- } else {
- traverse(childNode, hightlightTextNode);
- }
- }
- }
- };
- function accent_replacer(chr) {
- return accented[chr.toUpperCase()] || chr;
- }
- function getRegex(patterns, caseSensitive, wordsOnly, diacriticInsensitive) {
- var escapedPatterns = [], regexStr;
- for (var i = 0, len = patterns.length; i < len; i++) {
- var escapedWord = _.escapeRegExChars(patterns[i]);
- if (diacriticInsensitive) {
- escapedWord = escapedWord.replace(/\S/g, accent_replacer);
- }
- escapedPatterns.push(escapedWord);
- }
- regexStr = wordsOnly ? "\\b(" + escapedPatterns.join("|") + ")\\b" : "(" + escapedPatterns.join("|") + ")";
- return caseSensitive ? new RegExp(regexStr) : new RegExp(regexStr, "i");
- }
- }(window.document);
- var Input = function() {
- "use strict";
- var specialKeyCodeMap;
- specialKeyCodeMap = {
- 9: "tab",
- 27: "esc",
- 37: "left",
- 39: "right",
- 13: "enter",
- 38: "up",
- 40: "down"
- };
- function Input(o, www) {
- var id;
- o = o || {};
- if (!o.input) {
- $.error("input is missing");
- }
- www.mixin(this);
- this.$hint = $(o.hint);
- this.$input = $(o.input);
- this.$menu = $(o.menu);
- id = this.$input.attr("id") || _.guid();
- this.$menu.attr("id", id + "_listbox");
- this.$hint.attr({
- "aria-hidden": true
- });
- this.$input.attr({
- "aria-owns": id + "_listbox",
- role: "combobox",
- "aria-autocomplete": "list",
- "aria-expanded": false
- });
- this.query = this.$input.val();
- this.queryWhenFocused = this.hasFocus() ? this.query : null;
- this.$overflowHelper = buildOverflowHelper(this.$input);
- this._checkLanguageDirection();
- if (this.$hint.length === 0) {
- this.setHint = this.getHint = this.clearHint = this.clearHintIfInvalid = _.noop;
- }
- this.onSync("cursorchange", this._updateDescendent);
- }
- Input.normalizeQuery = function(str) {
- return _.toStr(str).replace(/^\s*/g, "").replace(/\s{2,}/g, " ");
- };
- _.mixin(Input.prototype, EventEmitter, {
- _onBlur: function onBlur() {
- this.resetInputValue();
- this.trigger("blurred");
- },
- _onFocus: function onFocus() {
- this.queryWhenFocused = this.query;
- this.trigger("focused");
- },
- _onKeydown: function onKeydown($e) {
- var keyName = specialKeyCodeMap[$e.which || $e.keyCode];
- this._managePreventDefault(keyName, $e);
- if (keyName && this._shouldTrigger(keyName, $e)) {
- this.trigger(keyName + "Keyed", $e);
- }
- },
- _onInput: function onInput() {
- this._setQuery(this.getInputValue());
- this.clearHintIfInvalid();
- this._checkLanguageDirection();
- },
- _managePreventDefault: function managePreventDefault(keyName, $e) {
- var preventDefault;
- switch (keyName) {
- case "up":
- case "down":
- preventDefault = !withModifier($e);
- break;
-
- default:
- preventDefault = false;
- }
- preventDefault && $e.preventDefault();
- },
- _shouldTrigger: function shouldTrigger(keyName, $e) {
- var trigger;
- switch (keyName) {
- case "tab":
- trigger = !withModifier($e);
- break;
-
- default:
- trigger = true;
- }
- return trigger;
- },
- _checkLanguageDirection: function checkLanguageDirection() {
- var dir = (this.$input.css("direction") || "ltr").toLowerCase();
- if (this.dir !== dir) {
- this.dir = dir;
- this.$hint.attr("dir", dir);
- this.trigger("langDirChanged", dir);
- }
- },
- _setQuery: function setQuery(val, silent) {
- var areEquivalent, hasDifferentWhitespace;
- areEquivalent = areQueriesEquivalent(val, this.query);
- hasDifferentWhitespace = areEquivalent ? this.query.length !== val.length : false;
- this.query = val;
- if (!silent && !areEquivalent) {
- this.trigger("queryChanged", this.query);
- } else if (!silent && hasDifferentWhitespace) {
- this.trigger("whitespaceChanged", this.query);
- }
- },
- _updateDescendent: function updateDescendent(event, id) {
- this.$input.attr("aria-activedescendant", id);
- },
- bind: function() {
- var that = this, onBlur, onFocus, onKeydown, onInput;
- onBlur = _.bind(this._onBlur, this);
- onFocus = _.bind(this._onFocus, this);
- onKeydown = _.bind(this._onKeydown, this);
- onInput = _.bind(this._onInput, this);
- this.$input.on("blur.tt", onBlur).on("focus.tt", onFocus).on("keydown.tt", onKeydown);
- if (!_.isMsie() || _.isMsie() > 9) {
- this.$input.on("input.tt", onInput);
- } else {
- this.$input.on("keydown.tt keypress.tt cut.tt paste.tt", function($e) {
- if (specialKeyCodeMap[$e.which || $e.keyCode]) {
- return;
- }
- _.defer(_.bind(that._onInput, that, $e));
- });
- }
- return this;
- },
- focus: function focus() {
- this.$input.focus();
- },
- blur: function blur() {
- this.$input.blur();
- },
- getLangDir: function getLangDir() {
- return this.dir;
- },
- getQuery: function getQuery() {
- return this.query || "";
- },
- setQuery: function setQuery(val, silent) {
- this.setInputValue(val);
- this._setQuery(val, silent);
- },
- hasQueryChangedSinceLastFocus: function hasQueryChangedSinceLastFocus() {
- return this.query !== this.queryWhenFocused;
- },
- getInputValue: function getInputValue() {
- return this.$input.val();
- },
- setInputValue: function setInputValue(value) {
- this.$input.val(value);
- this.clearHintIfInvalid();
- this._checkLanguageDirection();
- },
- resetInputValue: function resetInputValue() {
- this.setInputValue(this.query);
- },
- getHint: function getHint() {
- return this.$hint.val();
- },
- setHint: function setHint(value) {
- this.$hint.val(value);
- },
- clearHint: function clearHint() {
- this.setHint("");
- },
- clearHintIfInvalid: function clearHintIfInvalid() {
- var val, hint, valIsPrefixOfHint, isValid;
- val = this.getInputValue();
- hint = this.getHint();
- valIsPrefixOfHint = val !== hint && hint.indexOf(val) === 0;
- isValid = val !== "" && valIsPrefixOfHint && !this.hasOverflow();
- !isValid && this.clearHint();
- },
- hasFocus: function hasFocus() {
- return this.$input.is(":focus");
- },
- hasOverflow: function hasOverflow() {
- var constraint = this.$input.width() - 2;
- this.$overflowHelper.text(this.getInputValue());
- return this.$overflowHelper.width() >= constraint;
- },
- isCursorAtEnd: function() {
- var valueLength, selectionStart, range;
- valueLength = this.$input.val().length;
- selectionStart = this.$input[0].selectionStart;
- if (_.isNumber(selectionStart)) {
- return selectionStart === valueLength;
- } else if (document.selection) {
- range = document.selection.createRange();
- range.moveStart("character", -valueLength);
- return valueLength === range.text.length;
- }
- return true;
- },
- destroy: function destroy() {
- this.$hint.off(".tt");
- this.$input.off(".tt");
- this.$overflowHelper.remove();
- this.$hint = this.$input = this.$overflowHelper = $("");
- },
- setAriaExpanded: function setAriaExpanded(value) {
- this.$input.attr("aria-expanded", value);
- }
- });
- return Input;
- function buildOverflowHelper($input) {
- return $('
').css({
- position: "absolute",
- visibility: "hidden",
- whiteSpace: "pre",
- fontFamily: $input.css("font-family"),
- fontSize: $input.css("font-size"),
- fontStyle: $input.css("font-style"),
- fontVariant: $input.css("font-variant"),
- fontWeight: $input.css("font-weight"),
- wordSpacing: $input.css("word-spacing"),
- letterSpacing: $input.css("letter-spacing"),
- textIndent: $input.css("text-indent"),
- textRendering: $input.css("text-rendering"),
- textTransform: $input.css("text-transform")
- }).insertAfter($input);
- }
- function areQueriesEquivalent(a, b) {
- return Input.normalizeQuery(a) === Input.normalizeQuery(b);
- }
- function withModifier($e) {
- return $e.altKey || $e.ctrlKey || $e.metaKey || $e.shiftKey;
- }
- }();
- var Dataset = function() {
- "use strict";
- var keys, nameGenerator;
- keys = {
- dataset: "tt-selectable-dataset",
- val: "tt-selectable-display",
- obj: "tt-selectable-object"
- };
- nameGenerator = _.getIdGenerator();
- function Dataset(o, www) {
- o = o || {};
- o.templates = o.templates || {};
- o.templates.notFound = o.templates.notFound || o.templates.empty;
- if (!o.source) {
- $.error("missing source");
- }
- if (!o.node) {
- $.error("missing node");
- }
- if (o.name && !isValidName(o.name)) {
- $.error("invalid dataset name: " + o.name);
- }
- www.mixin(this);
- this.highlight = !!o.highlight;
- this.name = _.toStr(o.name || nameGenerator());
- this.limit = o.limit || 5;
- this.displayFn = getDisplayFn(o.display || o.displayKey);
- this.templates = getTemplates(o.templates, this.displayFn);
- this.source = o.source.__ttAdapter ? o.source.__ttAdapter() : o.source;
- this.async = _.isUndefined(o.async) ? this.source.length > 2 : !!o.async;
- this._resetLastSuggestion();
- this.$el = $(o.node).attr("role", "presentation").addClass(this.classes.dataset).addClass(this.classes.dataset + "-" + this.name);
- }
- Dataset.extractData = function extractData(el) {
- var $el = $(el);
- if ($el.data(keys.obj)) {
- return {
- dataset: $el.data(keys.dataset) || "",
- val: $el.data(keys.val) || "",
- obj: $el.data(keys.obj) || null
- };
- }
- return null;
- };
- _.mixin(Dataset.prototype, EventEmitter, {
- _overwrite: function overwrite(query, suggestions) {
- suggestions = suggestions || [];
- if (suggestions.length) {
- this._renderSuggestions(query, suggestions);
- } else if (this.async && this.templates.pending) {
- this._renderPending(query);
- } else if (!this.async && this.templates.notFound) {
- this._renderNotFound(query);
- } else {
- this._empty();
- }
- this.trigger("rendered", suggestions, false, this.name);
- },
- _append: function append(query, suggestions) {
- suggestions = suggestions || [];
- if (suggestions.length && this.$lastSuggestion.length) {
- this._appendSuggestions(query, suggestions);
- } else if (suggestions.length) {
- this._renderSuggestions(query, suggestions);
- } else if (!this.$lastSuggestion.length && this.templates.notFound) {
- this._renderNotFound(query);
- }
- this.trigger("rendered", suggestions, true, this.name);
- },
- _renderSuggestions: function renderSuggestions(query, suggestions) {
- var $fragment;
- $fragment = this._getSuggestionsFragment(query, suggestions);
- this.$lastSuggestion = $fragment.children().last();
- this.$el.html($fragment).prepend(this._getHeader(query, suggestions)).append(this._getFooter(query, suggestions));
- },
- _appendSuggestions: function appendSuggestions(query, suggestions) {
- var $fragment, $lastSuggestion;
- $fragment = this._getSuggestionsFragment(query, suggestions);
- $lastSuggestion = $fragment.children().last();
- this.$lastSuggestion.after($fragment);
- this.$lastSuggestion = $lastSuggestion;
- },
- _renderPending: function renderPending(query) {
- var template = this.templates.pending;
- this._resetLastSuggestion();
- template && this.$el.html(template({
- query: query,
- dataset: this.name
- }));
- },
- _renderNotFound: function renderNotFound(query) {
- var template = this.templates.notFound;
- this._resetLastSuggestion();
- template && this.$el.html(template({
- query: query,
- dataset: this.name
- }));
- },
- _empty: function empty() {
- this.$el.empty();
- this._resetLastSuggestion();
- },
- _getSuggestionsFragment: function getSuggestionsFragment(query, suggestions) {
- var that = this, fragment;
- fragment = document.createDocumentFragment();
- _.each(suggestions, function getSuggestionNode(suggestion) {
- var $el, context;
- context = that._injectQuery(query, suggestion);
- $el = $(that.templates.suggestion(context)).data(keys.dataset, that.name).data(keys.obj, suggestion).data(keys.val, that.displayFn(suggestion)).addClass(that.classes.suggestion + " " + that.classes.selectable);
- fragment.appendChild($el[0]);
- });
- this.highlight && highlight({
- className: this.classes.highlight,
- node: fragment,
- pattern: query
- });
- return $(fragment);
- },
- _getFooter: function getFooter(query, suggestions) {
- return this.templates.footer ? this.templates.footer({
- query: query,
- suggestions: suggestions,
- dataset: this.name
- }) : null;
- },
- _getHeader: function getHeader(query, suggestions) {
- return this.templates.header ? this.templates.header({
- query: query,
- suggestions: suggestions,
- dataset: this.name
- }) : null;
- },
- _resetLastSuggestion: function resetLastSuggestion() {
- this.$lastSuggestion = $();
- },
- _injectQuery: function injectQuery(query, obj) {
- return _.isObject(obj) ? _.mixin({
- _query: query
- }, obj) : obj;
- },
- update: function update(query) {
- var that = this, canceled = false, syncCalled = false, rendered = 0;
- this.cancel();
- this.cancel = function cancel() {
- canceled = true;
- that.cancel = $.noop;
- that.async && that.trigger("asyncCanceled", query, that.name);
- };
- this.source(query, sync, async);
- !syncCalled && sync([]);
- function sync(suggestions) {
- if (syncCalled) {
- return;
- }
- syncCalled = true;
- suggestions = (suggestions || []).slice(0, that.limit);
- rendered = suggestions.length;
- that._overwrite(query, suggestions);
- if (rendered < that.limit && that.async) {
- that.trigger("asyncRequested", query, that.name);
- }
- }
- function async(suggestions) {
- suggestions = suggestions || [];
- if (!canceled && rendered < that.limit) {
- that.cancel = $.noop;
- var idx = Math.abs(rendered - that.limit);
- rendered += idx;
- that._append(query, suggestions.slice(0, idx));
- that.async && that.trigger("asyncReceived", query, that.name);
- }
- }
- },
- cancel: $.noop,
- clear: function clear() {
- this._empty();
- this.cancel();
- this.trigger("cleared");
- },
- isEmpty: function isEmpty() {
- return this.$el.is(":empty");
- },
- destroy: function destroy() {
- this.$el = $("
");
- }
- });
- return Dataset;
- function getDisplayFn(display) {
- display = display || _.stringify;
- return _.isFunction(display) ? display : displayFn;
- function displayFn(obj) {
- return obj[display];
- }
- }
- function getTemplates(templates, displayFn) {
- return {
- notFound: templates.notFound && _.templatify(templates.notFound),
- pending: templates.pending && _.templatify(templates.pending),
- header: templates.header && _.templatify(templates.header),
- footer: templates.footer && _.templatify(templates.footer),
- suggestion: templates.suggestion ? userSuggestionTemplate : suggestionTemplate
- };
- function userSuggestionTemplate(context) {
- var template = templates.suggestion;
- return $(template(context)).attr("id", _.guid());
- }
- function suggestionTemplate(context) {
- return $('
').attr("id", _.guid()).text(displayFn(context));
- }
- }
- function isValidName(str) {
- return /^[_a-zA-Z0-9-]+$/.test(str);
- }
- }();
- var Menu = function() {
- "use strict";
- function Menu(o, www) {
- var that = this;
- o = o || {};
- if (!o.node) {
- $.error("node is required");
- }
- www.mixin(this);
- this.$node = $(o.node);
- this.query = null;
- this.datasets = _.map(o.datasets, initializeDataset);
- function initializeDataset(oDataset) {
- var node = that.$node.find(oDataset.node).first();
- oDataset.node = node.length ? node : $("
").appendTo(that.$node);
- return new Dataset(oDataset, www);
- }
- }
- _.mixin(Menu.prototype, EventEmitter, {
- _onSelectableClick: function onSelectableClick($e) {
- this.trigger("selectableClicked", $($e.currentTarget));
- },
- _onRendered: function onRendered(type, dataset, suggestions, async) {
- this.$node.toggleClass(this.classes.empty, this._allDatasetsEmpty());
- this.trigger("datasetRendered", dataset, suggestions, async);
- },
- _onCleared: function onCleared() {
- this.$node.toggleClass(this.classes.empty, this._allDatasetsEmpty());
- this.trigger("datasetCleared");
- },
- _propagate: function propagate() {
- this.trigger.apply(this, arguments);
- },
- _allDatasetsEmpty: function allDatasetsEmpty() {
- return _.every(this.datasets, _.bind(function isDatasetEmpty(dataset) {
- var isEmpty = dataset.isEmpty();
- this.$node.attr("aria-expanded", !isEmpty);
- return isEmpty;
- }, this));
- },
- _getSelectables: function getSelectables() {
- return this.$node.find(this.selectors.selectable);
- },
- _removeCursor: function _removeCursor() {
- var $selectable = this.getActiveSelectable();
- $selectable && $selectable.removeClass(this.classes.cursor);
- },
- _ensureVisible: function ensureVisible($el) {
- var elTop, elBottom, nodeScrollTop, nodeHeight;
- elTop = $el.position().top;
- elBottom = elTop + $el.outerHeight(true);
- nodeScrollTop = this.$node.scrollTop();
- nodeHeight = this.$node.height() + parseInt(this.$node.css("paddingTop"), 10) + parseInt(this.$node.css("paddingBottom"), 10);
- if (elTop < 0) {
- this.$node.scrollTop(nodeScrollTop + elTop);
- } else if (nodeHeight < elBottom) {
- this.$node.scrollTop(nodeScrollTop + (elBottom - nodeHeight));
- }
- },
- bind: function() {
- var that = this, onSelectableClick;
- onSelectableClick = _.bind(this._onSelectableClick, this);
- this.$node.on("click.tt", this.selectors.selectable, onSelectableClick);
- this.$node.on("mouseover", this.selectors.selectable, function() {
- that.setCursor($(this));
- });
- this.$node.on("mouseleave", function() {
- that._removeCursor();
- });
- _.each(this.datasets, function(dataset) {
- dataset.onSync("asyncRequested", that._propagate, that).onSync("asyncCanceled", that._propagate, that).onSync("asyncReceived", that._propagate, that).onSync("rendered", that._onRendered, that).onSync("cleared", that._onCleared, that);
- });
- return this;
- },
- isOpen: function isOpen() {
- return this.$node.hasClass(this.classes.open);
- },
- open: function open() {
- this.$node.scrollTop(0);
- this.$node.addClass(this.classes.open);
- },
- close: function close() {
- this.$node.attr("aria-expanded", false);
- this.$node.removeClass(this.classes.open);
- this._removeCursor();
- },
- setLanguageDirection: function setLanguageDirection(dir) {
- this.$node.attr("dir", dir);
- },
- selectableRelativeToCursor: function selectableRelativeToCursor(delta) {
- var $selectables, $oldCursor, oldIndex, newIndex;
- $oldCursor = this.getActiveSelectable();
- $selectables = this._getSelectables();
- oldIndex = $oldCursor ? $selectables.index($oldCursor) : -1;
- newIndex = oldIndex + delta;
- newIndex = (newIndex + 1) % ($selectables.length + 1) - 1;
- newIndex = newIndex < -1 ? $selectables.length - 1 : newIndex;
- return newIndex === -1 ? null : $selectables.eq(newIndex);
- },
- setCursor: function setCursor($selectable) {
- this._removeCursor();
- if ($selectable = $selectable && $selectable.first()) {
- $selectable.addClass(this.classes.cursor);
- this._ensureVisible($selectable);
- }
- },
- getSelectableData: function getSelectableData($el) {
- return $el && $el.length ? Dataset.extractData($el) : null;
- },
- getActiveSelectable: function getActiveSelectable() {
- var $selectable = this._getSelectables().filter(this.selectors.cursor).first();
- return $selectable.length ? $selectable : null;
- },
- getTopSelectable: function getTopSelectable() {
- var $selectable = this._getSelectables().first();
- return $selectable.length ? $selectable : null;
- },
- update: function update(query) {
- var isValidUpdate = query !== this.query;
- if (isValidUpdate) {
- this.query = query;
- _.each(this.datasets, updateDataset);
- }
- return isValidUpdate;
- function updateDataset(dataset) {
- dataset.update(query);
- }
- },
- empty: function empty() {
- _.each(this.datasets, clearDataset);
- this.query = null;
- this.$node.addClass(this.classes.empty);
- function clearDataset(dataset) {
- dataset.clear();
- }
- },
- destroy: function destroy() {
- this.$node.off(".tt");
- this.$node = $("
");
- _.each(this.datasets, destroyDataset);
- function destroyDataset(dataset) {
- dataset.destroy();
- }
- }
- });
- return Menu;
- }();
- var Status = function() {
- "use strict";
- function Status(options) {
- this.$el = $("
", {
- role: "status",
- "aria-live": "polite"
- }).css({
- position: "absolute",
- padding: "0",
- border: "0",
- height: "1px",
- width: "1px",
- "margin-bottom": "-1px",
- "margin-right": "-1px",
- overflow: "hidden",
- clip: "rect(0 0 0 0)",
- "white-space": "nowrap"
- });
- options.$input.after(this.$el);
- _.each(options.menu.datasets, _.bind(function(dataset) {
- if (dataset.onSync) {
- dataset.onSync("rendered", _.bind(this.update, this));
- dataset.onSync("cleared", _.bind(this.cleared, this));
- }
- }, this));
- }
- _.mixin(Status.prototype, {
- update: function update(event, suggestions) {
- var length = suggestions.length;
- var words;
- if (length === 1) {
- words = {
- result: "result",
- is: "is"
- };
- } else {
- words = {
- result: "results",
- is: "are"
- };
- }
- this.$el.text(length + " " + words.result + " " + words.is + " available, use up and down arrow keys to navigate.");
- },
- cleared: function() {
- this.$el.text("");
- }
- });
- return Status;
- }();
- var DefaultMenu = function() {
- "use strict";
- var s = Menu.prototype;
- function DefaultMenu() {
- Menu.apply(this, [].slice.call(arguments, 0));
- }
- _.mixin(DefaultMenu.prototype, Menu.prototype, {
- open: function open() {
- !this._allDatasetsEmpty() && this._show();
- return s.open.apply(this, [].slice.call(arguments, 0));
- },
- close: function close() {
- this._hide();
- return s.close.apply(this, [].slice.call(arguments, 0));
- },
- _onRendered: function onRendered() {
- if (this._allDatasetsEmpty()) {
- this._hide();
- } else {
- this.isOpen() && this._show();
- }
- return s._onRendered.apply(this, [].slice.call(arguments, 0));
- },
- _onCleared: function onCleared() {
- if (this._allDatasetsEmpty()) {
- this._hide();
- } else {
- this.isOpen() && this._show();
- }
- return s._onCleared.apply(this, [].slice.call(arguments, 0));
- },
- setLanguageDirection: function setLanguageDirection(dir) {
- this.$node.css(dir === "ltr" ? this.css.ltr : this.css.rtl);
- return s.setLanguageDirection.apply(this, [].slice.call(arguments, 0));
- },
- _hide: function hide() {
- this.$node.hide();
- },
- _show: function show() {
- this.$node.css("display", "block");
- }
- });
- return DefaultMenu;
- }();
- var Typeahead = function() {
- "use strict";
- function Typeahead(o, www) {
- var onFocused, onBlurred, onEnterKeyed, onTabKeyed, onEscKeyed, onUpKeyed, onDownKeyed, onLeftKeyed, onRightKeyed, onQueryChanged, onWhitespaceChanged;
- o = o || {};
- if (!o.input) {
- $.error("missing input");
- }
- if (!o.menu) {
- $.error("missing menu");
- }
- if (!o.eventBus) {
- $.error("missing event bus");
- }
- www.mixin(this);
- this.eventBus = o.eventBus;
- this.minLength = _.isNumber(o.minLength) ? o.minLength : 1;
- this.input = o.input;
- this.menu = o.menu;
- this.enabled = true;
- this.autoselect = !!o.autoselect;
- this.active = false;
- this.input.hasFocus() && this.activate();
- this.dir = this.input.getLangDir();
- this._hacks();
- this.menu.bind().onSync("selectableClicked", this._onSelectableClicked, this).onSync("asyncRequested", this._onAsyncRequested, this).onSync("asyncCanceled", this._onAsyncCanceled, this).onSync("asyncReceived", this._onAsyncReceived, this).onSync("datasetRendered", this._onDatasetRendered, this).onSync("datasetCleared", this._onDatasetCleared, this);
- onFocused = c(this, "activate", "open", "_onFocused");
- onBlurred = c(this, "deactivate", "_onBlurred");
- onEnterKeyed = c(this, "isActive", "isOpen", "_onEnterKeyed");
- onTabKeyed = c(this, "isActive", "isOpen", "_onTabKeyed");
- onEscKeyed = c(this, "isActive", "_onEscKeyed");
- onUpKeyed = c(this, "isActive", "open", "_onUpKeyed");
- onDownKeyed = c(this, "isActive", "open", "_onDownKeyed");
- onLeftKeyed = c(this, "isActive", "isOpen", "_onLeftKeyed");
- onRightKeyed = c(this, "isActive", "isOpen", "_onRightKeyed");
- onQueryChanged = c(this, "_openIfActive", "_onQueryChanged");
- onWhitespaceChanged = c(this, "_openIfActive", "_onWhitespaceChanged");
- this.input.bind().onSync("focused", onFocused, this).onSync("blurred", onBlurred, this).onSync("enterKeyed", onEnterKeyed, this).onSync("tabKeyed", onTabKeyed, this).onSync("escKeyed", onEscKeyed, this).onSync("upKeyed", onUpKeyed, this).onSync("downKeyed", onDownKeyed, this).onSync("leftKeyed", onLeftKeyed, this).onSync("rightKeyed", onRightKeyed, this).onSync("queryChanged", onQueryChanged, this).onSync("whitespaceChanged", onWhitespaceChanged, this).onSync("langDirChanged", this._onLangDirChanged, this);
- }
- _.mixin(Typeahead.prototype, {
- _hacks: function hacks() {
- var $input, $menu;
- $input = this.input.$input || $("
");
- $menu = this.menu.$node || $("
");
- $input.on("blur.tt", function($e) {
- var active, isActive, hasActive;
- active = document.activeElement;
- isActive = $menu.is(active);
- hasActive = $menu.has(active).length > 0;
- if (_.isMsie() && (isActive || hasActive)) {
- $e.preventDefault();
- $e.stopImmediatePropagation();
- _.defer(function() {
- $input.focus();
- });
- }
- });
- $menu.on("mousedown.tt", function($e) {
- $e.preventDefault();
- });
- },
- _onSelectableClicked: function onSelectableClicked(type, $el) {
- this.select($el);
- },
- _onDatasetCleared: function onDatasetCleared() {
- this._updateHint();
- },
- _onDatasetRendered: function onDatasetRendered(type, suggestions, async, dataset) {
- this._updateHint();
- if (this.autoselect) {
- var cursorClass = this.selectors.cursor.substr(1);
- this.menu.$node.find(this.selectors.suggestion).first().addClass(cursorClass);
- }
- this.eventBus.trigger("render", suggestions, async, dataset);
- },
- _onAsyncRequested: function onAsyncRequested(type, dataset, query) {
- this.eventBus.trigger("asyncrequest", query, dataset);
- },
- _onAsyncCanceled: function onAsyncCanceled(type, dataset, query) {
- this.eventBus.trigger("asynccancel", query, dataset);
- },
- _onAsyncReceived: function onAsyncReceived(type, dataset, query) {
- this.eventBus.trigger("asyncreceive", query, dataset);
- },
- _onFocused: function onFocused() {
- this._minLengthMet() && this.menu.update(this.input.getQuery());
- },
- _onBlurred: function onBlurred() {
- if (this.input.hasQueryChangedSinceLastFocus()) {
- this.eventBus.trigger("change", this.input.getQuery());
- }
- },
- _onEnterKeyed: function onEnterKeyed(type, $e) {
- var $selectable;
- if ($selectable = this.menu.getActiveSelectable()) {
- if (this.select($selectable)) {
- $e.preventDefault();
- $e.stopPropagation();
- }
- } else if (this.autoselect) {
- if (this.select(this.menu.getTopSelectable())) {
- $e.preventDefault();
- $e.stopPropagation();
- }
- }
- },
- _onTabKeyed: function onTabKeyed(type, $e) {
- var $selectable;
- if ($selectable = this.menu.getActiveSelectable()) {
- this.select($selectable) && $e.preventDefault();
- } else if (this.autoselect) {
- if ($selectable = this.menu.getTopSelectable()) {
- this.autocomplete($selectable) && $e.preventDefault();
- }
- }
- },
- _onEscKeyed: function onEscKeyed() {
- this.close();
- },
- _onUpKeyed: function onUpKeyed() {
- this.moveCursor(-1);
- },
- _onDownKeyed: function onDownKeyed() {
- this.moveCursor(+1);
- },
- _onLeftKeyed: function onLeftKeyed() {
- if (this.dir === "rtl" && this.input.isCursorAtEnd()) {
- this.autocomplete(this.menu.getActiveSelectable() || this.menu.getTopSelectable());
- }
- },
- _onRightKeyed: function onRightKeyed() {
- if (this.dir === "ltr" && this.input.isCursorAtEnd()) {
- this.autocomplete(this.menu.getActiveSelectable() || this.menu.getTopSelectable());
- }
- },
- _onQueryChanged: function onQueryChanged(e, query) {
- this._minLengthMet(query) ? this.menu.update(query) : this.menu.empty();
- },
- _onWhitespaceChanged: function onWhitespaceChanged() {
- this._updateHint();
- },
- _onLangDirChanged: function onLangDirChanged(e, dir) {
- if (this.dir !== dir) {
- this.dir = dir;
- this.menu.setLanguageDirection(dir);
- }
- },
- _openIfActive: function openIfActive() {
- this.isActive() && this.open();
- },
- _minLengthMet: function minLengthMet(query) {
- query = _.isString(query) ? query : this.input.getQuery() || "";
- return query.length >= this.minLength;
- },
- _updateHint: function updateHint() {
- var $selectable, data, val, query, escapedQuery, frontMatchRegEx, match;
- $selectable = this.menu.getTopSelectable();
- data = this.menu.getSelectableData($selectable);
- val = this.input.getInputValue();
- if (data && !_.isBlankString(val) && !this.input.hasOverflow()) {
- query = Input.normalizeQuery(val);
- escapedQuery = _.escapeRegExChars(query);
- frontMatchRegEx = new RegExp("^(?:" + escapedQuery + ")(.+$)", "i");
- match = frontMatchRegEx.exec(data.val);
- match && this.input.setHint(val + match[1]);
- } else {
- this.input.clearHint();
- }
- },
- isEnabled: function isEnabled() {
- return this.enabled;
- },
- enable: function enable() {
- this.enabled = true;
- },
- disable: function disable() {
- this.enabled = false;
- },
- isActive: function isActive() {
- return this.active;
- },
- activate: function activate() {
- if (this.isActive()) {
- return true;
- } else if (!this.isEnabled() || this.eventBus.before("active")) {
- return false;
- } else {
- this.active = true;
- this.eventBus.trigger("active");
- return true;
- }
- },
- deactivate: function deactivate() {
- if (!this.isActive()) {
- return true;
- } else if (this.eventBus.before("idle")) {
- return false;
- } else {
- this.active = false;
- this.close();
- this.eventBus.trigger("idle");
- return true;
- }
- },
- isOpen: function isOpen() {
- return this.menu.isOpen();
- },
- open: function open() {
- if (!this.isOpen() && !this.eventBus.before("open")) {
- this.input.setAriaExpanded(true);
- this.menu.open();
- this._updateHint();
- this.eventBus.trigger("open");
- }
- return this.isOpen();
- },
- close: function close() {
- if (this.isOpen() && !this.eventBus.before("close")) {
- this.input.setAriaExpanded(false);
- this.menu.close();
- this.input.clearHint();
- this.input.resetInputValue();
- this.eventBus.trigger("close");
- }
- return !this.isOpen();
- },
- setVal: function setVal(val) {
- this.input.setQuery(_.toStr(val));
- },
- getVal: function getVal() {
- return this.input.getQuery();
- },
- select: function select($selectable) {
- var data = this.menu.getSelectableData($selectable);
- if (data && !this.eventBus.before("select", data.obj, data.dataset)) {
- this.input.setQuery(data.val, true);
- this.eventBus.trigger("select", data.obj, data.dataset);
- this.close();
- return true;
- }
- return false;
- },
- autocomplete: function autocomplete($selectable) {
- var query, data, isValid;
- query = this.input.getQuery();
- data = this.menu.getSelectableData($selectable);
- isValid = data && query !== data.val;
- if (isValid && !this.eventBus.before("autocomplete", data.obj, data.dataset)) {
- this.input.setQuery(data.val);
- this.eventBus.trigger("autocomplete", data.obj, data.dataset);
- return true;
- }
- return false;
- },
- moveCursor: function moveCursor(delta) {
- var query, $candidate, data, suggestion, datasetName, cancelMove, id;
- query = this.input.getQuery();
- $candidate = this.menu.selectableRelativeToCursor(delta);
- data = this.menu.getSelectableData($candidate);
- suggestion = data ? data.obj : null;
- datasetName = data ? data.dataset : null;
- id = $candidate ? $candidate.attr("id") : null;
- this.input.trigger("cursorchange", id);
- cancelMove = this._minLengthMet() && this.menu.update(query);
- if (!cancelMove && !this.eventBus.before("cursorchange", suggestion, datasetName)) {
- this.menu.setCursor($candidate);
- if (data) {
- if (typeof data.val === "string") {
- this.input.setInputValue(data.val);
- }
- } else {
- this.input.resetInputValue();
- this._updateHint();
- }
- this.eventBus.trigger("cursorchange", suggestion, datasetName);
- return true;
- }
- return false;
- },
- destroy: function destroy() {
- this.input.destroy();
- this.menu.destroy();
- }
- });
- return Typeahead;
- function c(ctx) {
- var methods = [].slice.call(arguments, 1);
- return function() {
- var args = [].slice.call(arguments);
- _.each(methods, function(method) {
- return ctx[method].apply(ctx, args);
- });
- };
- }
- }();
- (function() {
- "use strict";
- var old, keys, methods;
- old = $.fn.typeahead;
- keys = {
- www: "tt-www",
- attrs: "tt-attrs",
- typeahead: "tt-typeahead"
- };
- methods = {
- initialize: function initialize(o, datasets) {
- var www;
- datasets = _.isArray(datasets) ? datasets : [].slice.call(arguments, 1);
- o = o || {};
- www = WWW(o.classNames);
- return this.each(attach);
- function attach() {
- var $input, $wrapper, $hint, $menu, defaultHint, defaultMenu, eventBus, input, menu, status, typeahead, MenuConstructor;
- _.each(datasets, function(d) {
- d.highlight = !!o.highlight;
- });
- $input = $(this);
- $wrapper = $(www.html.wrapper);
- $hint = $elOrNull(o.hint);
- $menu = $elOrNull(o.menu);
- defaultHint = o.hint !== false && !$hint;
- defaultMenu = o.menu !== false && !$menu;
- defaultHint && ($hint = buildHintFromInput($input, www));
- defaultMenu && ($menu = $(www.html.menu).css(www.css.menu));
- $hint && $hint.val("");
- $input = prepInput($input, www);
- if (defaultHint || defaultMenu) {
- $wrapper.css(www.css.wrapper);
- $input.css(defaultHint ? www.css.input : www.css.inputWithNoHint);
- $input.wrap($wrapper).parent().prepend(defaultHint ? $hint : null).append(defaultMenu ? $menu : null);
- }
- MenuConstructor = defaultMenu ? DefaultMenu : Menu;
- eventBus = new EventBus({
- el: $input
- });
- input = new Input({
- hint: $hint,
- input: $input,
- menu: $menu
- }, www);
- menu = new MenuConstructor({
- node: $menu,
- datasets: datasets
- }, www);
- status = new Status({
- $input: $input,
- menu: menu
- });
- typeahead = new Typeahead({
- input: input,
- menu: menu,
- eventBus: eventBus,
- minLength: o.minLength,
- autoselect: o.autoselect
- }, www);
- $input.data(keys.www, www);
- $input.data(keys.typeahead, typeahead);
- }
- },
- isEnabled: function isEnabled() {
- var enabled;
- ttEach(this.first(), function(t) {
- enabled = t.isEnabled();
- });
- return enabled;
- },
- enable: function enable() {
- ttEach(this, function(t) {
- t.enable();
- });
- return this;
- },
- disable: function disable() {
- ttEach(this, function(t) {
- t.disable();
- });
- return this;
- },
- isActive: function isActive() {
- var active;
- ttEach(this.first(), function(t) {
- active = t.isActive();
- });
- return active;
- },
- activate: function activate() {
- ttEach(this, function(t) {
- t.activate();
- });
- return this;
- },
- deactivate: function deactivate() {
- ttEach(this, function(t) {
- t.deactivate();
- });
- return this;
- },
- isOpen: function isOpen() {
- var open;
- ttEach(this.first(), function(t) {
- open = t.isOpen();
- });
- return open;
- },
- open: function open() {
- ttEach(this, function(t) {
- t.open();
- });
- return this;
- },
- close: function close() {
- ttEach(this, function(t) {
- t.close();
- });
- return this;
- },
- select: function select(el) {
- var success = false, $el = $(el);
- ttEach(this.first(), function(t) {
- success = t.select($el);
- });
- return success;
- },
- autocomplete: function autocomplete(el) {
- var success = false, $el = $(el);
- ttEach(this.first(), function(t) {
- success = t.autocomplete($el);
- });
- return success;
- },
- moveCursor: function moveCursoe(delta) {
- var success = false;
- ttEach(this.first(), function(t) {
- success = t.moveCursor(delta);
- });
- return success;
- },
- val: function val(newVal) {
- var query;
- if (!arguments.length) {
- ttEach(this.first(), function(t) {
- query = t.getVal();
- });
- return query;
- } else {
- ttEach(this, function(t) {
- t.setVal(_.toStr(newVal));
- });
- return this;
- }
- },
- destroy: function destroy() {
- ttEach(this, function(typeahead, $input) {
- revert($input);
- typeahead.destroy();
- });
- return this;
- }
- };
- $.fn.typeahead = function(method) {
- if (methods[method]) {
- return methods[method].apply(this, [].slice.call(arguments, 1));
- } else {
- return methods.initialize.apply(this, arguments);
- }
- };
- $.fn.typeahead.noConflict = function noConflict() {
- $.fn.typeahead = old;
- return this;
- };
- function ttEach($els, fn) {
- $els.each(function() {
- var $input = $(this), typeahead;
- (typeahead = $input.data(keys.typeahead)) && fn(typeahead, $input);
- });
- }
- function buildHintFromInput($input, www) {
- return $input.clone().addClass(www.classes.hint).removeData().css(www.css.hint).css(getBackgroundStyles($input)).prop({
- readonly: true,
- required: false
- }).removeAttr("id name placeholder").removeClass("required").attr({
- spellcheck: "false",
- tabindex: -1
- });
- }
- function prepInput($input, www) {
- $input.data(keys.attrs, {
- dir: $input.attr("dir"),
- autocomplete: $input.attr("autocomplete"),
- spellcheck: $input.attr("spellcheck"),
- style: $input.attr("style")
- });
- $input.addClass(www.classes.input).attr({
- spellcheck: false
- });
- try {
- !$input.attr("dir") && $input.attr("dir", "auto");
- } catch (e) {}
- return $input;
- }
- function getBackgroundStyles($el) {
- return {
- backgroundAttachment: $el.css("background-attachment"),
- backgroundClip: $el.css("background-clip"),
- backgroundColor: $el.css("background-color"),
- backgroundImage: $el.css("background-image"),
- backgroundOrigin: $el.css("background-origin"),
- backgroundPosition: $el.css("background-position"),
- backgroundRepeat: $el.css("background-repeat"),
- backgroundSize: $el.css("background-size")
- };
- }
- function revert($input) {
- var www, $wrapper;
- www = $input.data(keys.www);
- $wrapper = $input.parent().filter(www.selectors.wrapper);
- _.each($input.data(keys.attrs), function(val, key) {
- _.isUndefined(val) ? $input.removeAttr(key) : $input.attr(key, val);
- });
- $input.removeData(keys.typeahead).removeData(keys.www).removeData(keys.attr).removeClass(www.classes.input);
- if ($wrapper.length) {
- $input.detach().insertAfter($wrapper);
- $wrapper.remove();
- }
- }
- function $elOrNull(obj) {
- var isValid, $el;
- isValid = _.isJQuery(obj) || _.isElement(obj);
- $el = isValid ? $(obj).first() : [];
- return $el.length ? $el : null;
- }
- })();
-});
\ No newline at end of file
diff --git a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/search.json b/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/search.json
deleted file mode 100644
index 6f79c6be5..000000000
--- a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/Documents/search.json
+++ /dev/null
@@ -1 +0,0 @@
-{"Structs/BigInt/Words.html#/s:Sl7IndicesQa":{"name":"Indices","parent_name":"Words"},"Structs/BigInt/Words.html#/s:Sl5countSivp":{"name":"count","parent_name":"Words"},"Structs/BigInt/Words.html#/s:Sk7indices7IndicesQzvp":{"name":"indices","parent_name":"Words"},"Structs/BigInt/Words.html#/s:Sl10startIndex0B0Qzvp":{"name":"startIndex","parent_name":"Words"},"Structs/BigInt/Words.html#/s:Sl8endIndex0B0Qzvp":{"name":"endIndex","parent_name":"Words"},"Structs/BigInt/Words.html#/s:Sly7ElementQz5IndexQzcip":{"name":"subscript(_:)","parent_name":"Words"},"Structs/BigInt/Sign.html#/s:6BigIntAAV4SignO4plusyA2DmF":{"name":"plus","abstract":"
Undocumented
","parent_name":"Sign"},"Structs/BigInt/Sign.html#/s:6BigIntAAV4SignO5minusyA2DmF":{"name":"minus","abstract":"
Undocumented
","parent_name":"Sign"},"Structs/BigInt/Sign.html":{"name":"Sign","abstract":"
Undocumented
","parent_name":"BigInt"},"Structs/BigInt.html#/s:Sj9MagnitudeQa":{"name":"Magnitude","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV4Worda":{"name":"Word","abstract":"
The type representing a digit in BigInt
‘s underlying number system.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:Sz8isSignedSbvpZ":{"name":"isSigned","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV9magnitudeAA0A4UIntVvp":{"name":"magnitude","abstract":"
The absolute value of this integer.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV4signAB4SignOvp":{"name":"sign","abstract":"
True iff the value of this integer is negative.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV4sign9magnitudeA2B4SignO_AA0A4UIntVtcfc":{"name":"init(sign:magnitude:)","abstract":"
Initializes a new big integer with the provided absolute number and sign flag.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV6isZeroSbvp":{"name":"isZero","abstract":"
Return true iff this integer is zero.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV6signumAByF":{"name":"signum()","abstract":"
Returns -1
if this value is negative and 1
if it’s positive; otherwise, 0
.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV1poiyA2B_ABtFZ":{"name":"+(_:_:)","abstract":"
Add a
to b
and return the result.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV2peoiyyABz_ABtFZ":{"name":"+=(_:_:)","abstract":"
Add b
to a
in place.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV1topyA2BFZ":{"name":"~(_:)","abstract":"
Undocumented
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV1aoiyA2Bz_ABtFZ":{"name":"&(_:_:)","abstract":"
Undocumented
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV1ooiyA2Bz_ABtFZ":{"name":"|(_:_:)","abstract":"
Undocumented
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV1xoiyA2Bz_ABtFZ":{"name":"^(_:_:)","abstract":"
Undocumented
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV2aeoiyyABz_ABtFZ":{"name":"&=(_:_:)","abstract":"
Undocumented
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV2oeoiyyABz_ABtFZ":{"name":"|=(_:_:)","abstract":"
Undocumented
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV2xeoiyyABz_ABtFZ":{"name":"^=(_:_:)","abstract":"
Undocumented
","parent_name":"BigInt"},"Structs/BigInt.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"BigInt"},"Structs/BigInt.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV2eeoiySbAB_ABtFZ":{"name":"==(_:_:)","abstract":"
Return true iff a
is equal to b
.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV1loiySbAB_ABtFZ":{"name":"<(_:_:)","abstract":"
Return true iff a
is less than b
.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAVyABSWcfc":{"name":"init(_:)","abstract":"
Initialize a BigInt from bytes accessed from an UnsafeRawBufferPointer,","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAVyAB10Foundation4DataVcfc":{"name":"init(_:)","abstract":"
Initializes an integer from the bits stored inside a piece of Data
.","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV9serialize10Foundation4DataVyF":{"name":"serialize()","abstract":"
Return a Data
value that contains the base-256 representation of this integer, in network (big-endian) byte order and a prepended byte to indicate the sign (0 for positive, 1 for negative)
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV20quotientAndRemainder10dividingByAB0C0_AB9remaindertAB_tF":{"name":"quotientAndRemainder(dividingBy:)","abstract":"
Divide this integer by y
and return the resulting quotient and remainder.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV1doiyA2B_ABtFZ":{"name":"/(_:_:)","abstract":"
Divide a
by b
and return the quotient. Traps if b
is zero.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV1roiyA2B_ABtFZ":{"name":"%(_:_:)","abstract":"
Divide a
by b
and return the remainder. The result has the same sign as a
.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV7modulusyA2BF":{"name":"modulus(_:)","abstract":"
Return the result of a
mod b
. The result is always a nonnegative integer that is less than the absolute value of b
.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV2deoiyyABz_ABtFZ":{"name":"/=(_:_:)","abstract":"
Divide a
by b
storing the quotient in a
.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV2reoiyyABz_ABtFZ":{"name":"%=(_:_:)","abstract":"
Divide a
by b
storing the remainder in a
.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV5poweryABSiF":{"name":"power(_:)","abstract":"
Returns this integer raised to the power exponent
.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV5power_7modulusA2B_ABtF":{"name":"power(_:modulus:)","abstract":"
Returns the remainder of this integer raised to the power exponent
in modulo arithmetic under modulus
.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:Sz7exactlyxSgqd___tcSBRd__lufc":{"name":"init(exactly:)","parent_name":"BigInt"},"Structs/BigInt.html#/s:Szyxqd__cSBRd__lufc":{"name":"init(_:)","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV21greatestCommonDivisor4withA2B_tF":{"name":"greatestCommonDivisor(with:)","abstract":"
Returns the greatest common divisor of a
and b
.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV7inverseyABSgABF":{"name":"inverse(_:)","abstract":"
Returns the multiplicative inverse of this integer in modulo modulus
arithmetic ,","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV4hash4intoys6HasherVz_tF":{"name":"hash(into:)","abstract":"
Append this BigInt
to the specified hasher.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAVABycfc":{"name":"init()","abstract":"
Undocumented
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAVyAbA0A4UIntVcfc":{"name":"init(_:)","abstract":"
Initializes a new signed big integer with the same value as the specified unsigned big integer.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:Szyxqd__cSzRd__lufc":{"name":"init(_:)","parent_name":"BigInt"},"Structs/BigInt.html#/s:Sj7exactlyxSgqd___tcSzRd__lufc":{"name":"init(exactly:)","parent_name":"BigInt"},"Structs/BigInt.html#/s:Sz8clampingxqd___tcSzRd__lufc":{"name":"init(clamping:)","parent_name":"BigInt"},"Structs/BigInt.html#/s:Sz18truncatingIfNeededxqd___tcSzRd__lufc":{"name":"init(truncatingIfNeeded:)","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV14integerLiteralABs5Int64V_tcfc":{"name":"init(integerLiteral:)","abstract":"
Initialize a new big integer from an integer literal.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV1moiyA2B_ABtFZ":{"name":"*(_:_:)","abstract":"
Multiply a
with b
and return the result.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV2meoiyyABz_ABtFZ":{"name":"*=(_:_:)","abstract":"
Multiply a
with b
in place.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV21isStrongProbablePrimeySbABF":{"name":"isStrongProbablePrime(_:)","abstract":"
Returns true iff this integer passes the strong probable prime test for the specified base.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV7isPrime6roundsSbSi_tF":{"name":"isPrime(rounds:)","abstract":"
Returns true if this integer is probably prime. Returns false if this integer is definitely not prime.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV3alloiyA2B_ABtFZ":{"name":"&<<(_:_:)","abstract":"
Undocumented
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV4alleoiyyABz_ABtFZ":{"name":"&<<=(_:_:)","abstract":"
Undocumented
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV3aggoiyA2B_ABtFZ":{"name":"&>>(_:_:)","abstract":"
Undocumented
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV4aggeoiyyABz_ABtFZ":{"name":"&>>=(_:_:)","abstract":"
Undocumented
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV2lloiyA2B_xtSzRzlFZ":{"name":"<<(_:_:)","abstract":"
Undocumented
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV3lleoiyyABz_xtSzRzlFZ":{"name":"<<=(_:_:)","abstract":"
Undocumented
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV2ggoiyA2B_xtSzRzlFZ":{"name":">>(_:_:)","abstract":"
Undocumented
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV3ggeoiyyABz_xtSzRzlFZ":{"name":">>=(_:_:)","abstract":"
Undocumented
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV10squareRootAByF":{"name":"squareRoot()","abstract":"
Returns the integer square root of a big integer; i.e., the largest integer whose square isn’t greater than value
.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:Sx6StrideQa":{"name":"Stride","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV8advanced2byA2B_tF":{"name":"advanced(by:)","abstract":"
Returns self + n
.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV8distance2toA2B_tF":{"name":"distance(to:)","abstract":"
Returns other - self
.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV_5radixABSgx_SitcSyRzlufc":{"name":"init(_:radix:)","abstract":"
Initialize a big integer from an ASCII representation in a given radix. Numerals above 9
are represented by","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV20unicodeScalarLiteralABs7UnicodeO0D0V_tcfc":{"name":"init(unicodeScalarLiteral:)","abstract":"
Initialize a new big integer from a Unicode scalar.","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV30extendedGraphemeClusterLiteralABSS_tcfc":{"name":"init(extendedGraphemeClusterLiteral:)","abstract":"
Initialize a new big integer from an extended grapheme cluster.","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV13stringLiteralABSS_tcfc":{"name":"init(stringLiteral:)","abstract":"
Initialize a new big integer from a decimal number represented by a string literal of arbitrary length.","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV11descriptionSSvp":{"name":"description","abstract":"
Return the decimal representation of this integer.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV21playgroundDescriptionypvp":{"name":"playgroundDescription","abstract":"
Return the playground quick look representation of this integer.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV6negateyyF":{"name":"negate()","abstract":"
Undocumented
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV1soiyA2B_ABtFZ":{"name":"-(_:_:)","abstract":"
Subtract b
from a
and return the result.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV2seoiyyABz_ABtFZ":{"name":"-=(_:_:)","abstract":"
Subtract b
from a
in place.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV8bitWidthSivp":{"name":"bitWidth","abstract":"
Undocumented
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV20trailingZeroBitCountSivp":{"name":"trailingZeroBitCount","abstract":"
Undocumented
","parent_name":"BigInt"},"Structs/BigInt/Words.html":{"name":"Words","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV5wordsAB5WordsVvp":{"name":"words","abstract":"
Undocumented
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV5wordsABx_tcSTRzSu7ElementRtzlufc":{"name":"init(words:)","abstract":"
Undocumented
","parent_name":"BigInt"},"Structs/BigUInt/Words.html#/s:Sl10startIndex0B0Qzvp":{"name":"startIndex","parent_name":"Words"},"Structs/BigUInt/Words.html#/s:Sl8endIndex0B0Qzvp":{"name":"endIndex","parent_name":"Words"},"Structs/BigUInt/Words.html#/s:Sly7ElementQz5IndexQzcip":{"name":"subscript(_:)","parent_name":"Words"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV4Worda":{"name":"Word","abstract":"
The type representing a digit in BigUInt
‘s underlying number system.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntVACycfc":{"name":"init()","abstract":"
Initializes a new BigUInt with value 0.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV5wordsACSaySuG_tcfc":{"name":"init(words:)","abstract":"
Initializes a new BigUInt with the specified digits. The digits are ordered from least to most significant.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV1poiyA2C_ACtFZ":{"name":"+(_:_:)","abstract":"
Add a
and b
together and return the result.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV2peoiyyACz_ACtFZ":{"name":"+=(_:_:)","abstract":"
Add a
and b
together, and store the sum in a
.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:Sz8isSignedSbvpZ":{"name":"isSigned","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV6signumACyF":{"name":"signum()","abstract":"
Returns 1
if this value is, positive; otherwise, 0
.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV1topyA2CFZ":{"name":"~(_:)","abstract":"
Return the ones’ complement of a
.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV2oeoiyyACz_ACtFZ":{"name":"|=(_:_:)","abstract":"
Calculate the bitwise OR of a
and b
, and store the result in a
.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV2aeoiyyACz_ACtFZ":{"name":"&=(_:_:)","abstract":"
Calculate the bitwise AND of a
and b
and return the result.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV2xeoiyyACz_ACtFZ":{"name":"^=(_:_:)","abstract":"
Calculate the bitwise XOR of a
and b
and return the result.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV7compareySo18NSComparisonResultVAC_ACtFZ":{"name":"compare(_:_:)","abstract":"
Compare a
to b
and return an NSComparisonResult
indicating their order.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV2eeoiySbAC_ACtFZ":{"name":"==(_:_:)","abstract":"
Return true iff a
is equal to b
.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV1loiySbAC_ACtFZ":{"name":"<(_:_:)","abstract":"
Return true iff a
is less than b
.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntVyACSWcfc":{"name":"init(_:)","abstract":"
Initialize a BigInt from bytes accessed from an UnsafeRawBufferPointer
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntVyAC10Foundation4DataVcfc":{"name":"init(_:)","abstract":"
Initializes an integer from the bits stored inside a piece of Data
.","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV9serialize10Foundation4DataVyF":{"name":"serialize()","abstract":"
Return a Data
value that contains the base-256 representation of this integer, in network (big-endian) byte order.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV20quotientAndRemainder10dividingByAC0D0_AC9remaindertAC_tF":{"name":"quotientAndRemainder(dividingBy:)","abstract":"
Divide this integer by y
and return the resulting quotient and remainder.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV1doiyA2C_ACtFZ":{"name":"/(_:_:)","abstract":"
Divide x
by y
and return the quotient.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV1roiyA2C_ACtFZ":{"name":"%(_:_:)","abstract":"
Divide x
by y
and return the remainder.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV2deoiyyACz_ACtFZ":{"name":"/=(_:_:)","abstract":"
Divide x
by y
and store the quotient in x
.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV2reoiyyACz_ACtFZ":{"name":"%=(_:_:)","abstract":"
Divide x
by y
and store the remainder in x
.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV5poweryACSiF":{"name":"power(_:)","abstract":"
Returns this integer raised to the power exponent
.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV5power_7modulusA2C_ACtF":{"name":"power(_:modulus:)","abstract":"
Returns the remainder of this integer raised to the power exponent
in modulo arithmetic under modulus
.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:Sz7exactlyxSgqd___tcSBRd__lufc":{"name":"init(exactly:)","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:Szyxqd__cSBRd__lufc":{"name":"init(_:)","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV21greatestCommonDivisor4withA2C_tF":{"name":"greatestCommonDivisor(with:)","abstract":"
Returns the greatest common divisor of self
and b
.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV7inverseyACSgACF":{"name":"inverse(_:)","abstract":"
Returns the multiplicative inverse of this integer in modulo modulus
arithmetic ,","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV4hash4intoys6HasherVz_tF":{"name":"hash(into:)","abstract":"
Append this BigUInt
to the specified hasher.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:Sj7exactlyxSgqd___tcSzRd__lufc":{"name":"init(exactly:)","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:Szyxqd__cSzRd__lufc":{"name":"init(_:)","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:Sz18truncatingIfNeededxqd___tcSzRd__lufc":{"name":"init(truncatingIfNeeded:)","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:Sz8clampingxqd___tcSzRd__lufc":{"name":"init(clamping:)","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV14integerLiteralACs6UInt64V_tcfc":{"name":"init(integerLiteral:)","abstract":"
Initialize a new big integer from an integer literal.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV8multiply6byWordySu_tF":{"name":"multiply(byWord:)","abstract":"
Multiply this big integer by a single word, and store the result in place of the original big integer.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV10multiplied6byWordACSu_tF":{"name":"multiplied(byWord:)","abstract":"
Multiply this big integer by a single Word, and return the result.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV14multiplyAndAdd__9shiftedByyAC_SuSitF":{"name":"multiplyAndAdd(_:_:shiftedBy:)","abstract":"
Multiply x
by y
, and add the result to this integer, optionally shifted shift
words to the left.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV10multiplied2byA2C_tF":{"name":"multiplied(by:)","abstract":"
Multiply this integer by y
and return the result.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV25directMultiplicationLimitSivpZ":{"name":"directMultiplicationLimit","abstract":"
Multiplication switches to an asymptotically better recursive algorithm when arguments have more words than this limit.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV1moiyA2C_ACtFZ":{"name":"*(_:_:)","abstract":"
Multiply a
by b
and return the result.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV2meoiyyACz_ACtFZ":{"name":"*=(_:_:)","abstract":"
Multiply a
by b
and store the result in a
.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV21isStrongProbablePrimeySbACF":{"name":"isStrongProbablePrime(_:)","abstract":"
Returns true iff this integer passes the strong probable prime test for the specified base.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV7isPrime6roundsSbSi_tF":{"name":"isPrime(rounds:)","abstract":"
Returns true if this integer is probably prime. Returns false if this integer is definitely not prime.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV13randomInteger16withMaximumWidth5usingACSi_xztSGRzlFZ":{"name":"randomInteger(withMaximumWidth:using:)","abstract":"
Create a big unsigned integer consisting of width
uniformly distributed random bits.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV13randomInteger16withMaximumWidthACSi_tFZ":{"name":"randomInteger(withMaximumWidth:)","abstract":"
Create a big unsigned integer consisting of width
uniformly distributed random bits.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV13randomInteger14withExactWidth5usingACSi_xztSGRzlFZ":{"name":"randomInteger(withExactWidth:using:)","abstract":"
Create a big unsigned integer consisting of width-1
uniformly distributed random bits followed by a one bit.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV13randomInteger14withExactWidthACSi_tFZ":{"name":"randomInteger(withExactWidth:)","abstract":"
Create a big unsigned integer consisting of width-1
uniformly distributed random bits followed by a one bit.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV13randomInteger8lessThan5usingA2C_xztSGRzlFZ":{"name":"randomInteger(lessThan:using:)","abstract":"
Create a uniformly distributed random unsigned integer that’s less than the specified limit.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV13randomInteger8lessThanA2C_tFZ":{"name":"randomInteger(lessThan:)","abstract":"
Create a uniformly distributed random unsigned integer that’s less than the specified limit.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV3ggeoiyyACz_xtSzRzlFZ":{"name":">>=(_:_:)","abstract":"
Undocumented
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV3lleoiyyACz_xtSzRzlFZ":{"name":"<<=(_:_:)","abstract":"
Undocumented
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV2ggoiyA2C_xtSzRzlFZ":{"name":">>(_:_:)","abstract":"
Undocumented
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV2lloiyA2C_xtSzRzlFZ":{"name":"<<(_:_:)","abstract":"
Undocumented
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV10squareRootACyF":{"name":"squareRoot()","abstract":"
Returns the integer square root of a big integer; i.e., the largest integer whose square isn’t greater than value
.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV6Stridea":{"name":"Stride","abstract":"
A type that can represent the distance between two values ofa BigUInt
.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV8advanced2byAc2AV_tF":{"name":"advanced(by:)","abstract":"
Adds n
to self
and returns the result. Traps if the result would be less than zero.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV8distance2toA2AVAC_tF":{"name":"distance(to:)","abstract":"
Returns the (potentially negative) difference between self
and other
as a BigInt
. Never traps.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV_5radixACSgx_SitcSyRzlufc":{"name":"init(_:radix:)","abstract":"
Initialize a big integer from an ASCII representation in a given radix. Numerals above 9
are represented by","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV20unicodeScalarLiteralACs7UnicodeO0E0V_tcfc":{"name":"init(unicodeScalarLiteral:)","abstract":"
Initialize a new big integer from a Unicode scalar.","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV30extendedGraphemeClusterLiteralACSS_tcfc":{"name":"init(extendedGraphemeClusterLiteral:)","abstract":"
Initialize a new big integer from an extended grapheme cluster.","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV13stringLiteralACSS_tcfc":{"name":"init(stringLiteral:)","abstract":"
Initialize a new big integer from a decimal number represented by a string literal of arbitrary length.","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV11descriptionSSvp":{"name":"description","abstract":"
Return the decimal representation of this integer.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV21playgroundDescriptionypvp":{"name":"playgroundDescription","abstract":"
Return the playground quick look representation of this integer.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV25subtractReportingOverflow_9shiftedBySbAC_SitF":{"name":"subtractReportingOverflow(_:shiftedBy:)","abstract":"
Subtract other
from this integer in place, and return a flag indicating if the operation caused an","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV28subtractingReportingOverflow_9shiftedByAC12partialValue_Sb8overflowtAC_SitF":{"name":"subtractingReportingOverflow(_:shiftedBy:)","abstract":"
Subtract other
from this integer, returning the difference and a flag indicating arithmetic overflow.","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV28subtractingReportingOverflowyAC12partialValue_Sb8overflowtACF":{"name":"subtractingReportingOverflow(_:)","abstract":"
Subtracts other
from self
, returning the result and a flag indicating arithmetic overflow.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV8subtract_9shiftedByyAC_SitF":{"name":"subtract(_:shiftedBy:)","abstract":"
Subtract other
from this integer in place.","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV11subtracting_9shiftedByA2C_SitF":{"name":"subtracting(_:shiftedBy:)","abstract":"
Subtract b
from this integer, and return the difference.","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV9decrement9shiftedByySi_tF":{"name":"decrement(shiftedBy:)","abstract":"
Decrement this integer by one.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV1soiyA2C_ACtFZ":{"name":"-(_:_:)","abstract":"
Subtract b
from a
and return the result.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV2seoiyyACz_ACtFZ":{"name":"-=(_:_:)","abstract":"
Subtract b
from a
and store the result in a
.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV5bitAtSbSi_tcip":{"name":"subscript(bitAt:)","abstract":"
Undocumented
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV8bitWidthSivp":{"name":"bitWidth","abstract":"
The minimum number of bits required to represent this integer in binary.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV19leadingZeroBitCountSivp":{"name":"leadingZeroBitCount","abstract":"
The number of leading zero bits in the binary representation of this integer in base 2^(Word.bitWidth)
.","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV20trailingZeroBitCountSivp":{"name":"trailingZeroBitCount","abstract":"
The number of trailing zero bits in the binary representation of this integer.
","parent_name":"BigUInt"},"Structs/BigUInt/Words.html":{"name":"Words","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:Sz5words5WordsQzvp":{"name":"words","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV5wordsACx_tcSTRzSu7ElementRtzlufc":{"name":"init(words:)","abstract":"
Undocumented
","parent_name":"BigUInt"},"Structs/BigUInt.html":{"name":"BigUInt","abstract":"
An arbitary precision unsigned integer type, also known as a “big integer”.
"},"Structs/BigInt.html":{"name":"BigInt","abstract":"
An arbitary precision signed integer type, also known as a “big integer”.
"},"Extensions/String.html#/s:SS6BigIntEySSAA0A4UIntVcfc":{"name":"init(_:)","abstract":"
Initialize a new string with the base-10 representation of an unsigned big integer.
","parent_name":"String"},"Extensions/String.html#/s:SS6BigIntE_5radix9uppercaseSSAA0A4UIntV_SiSbtcfc":{"name":"init(_:radix:uppercase:)","abstract":"
Initialize a new string representing an unsigned big integer in the given radix (base).
","parent_name":"String"},"Extensions/String.html#/s:SS6BigIntE_5radix9uppercaseSSA2AV_SiSbtcfc":{"name":"init(_:radix:uppercase:)","abstract":"
Initialize a new string representing a signed big integer in the given radix (base).
","parent_name":"String"},"Extensions/BinaryFloatingPoint.html#/s:SB6BigInts17FixedWidthInteger11RawExponentRpzsAB0F11SignificandRpzrlEyxA2AVcfc":{"name":"init(_:)","abstract":"
Undocumented
","parent_name":"BinaryFloatingPoint"},"Extensions/BinaryFloatingPoint.html#/s:SB6BigInts17FixedWidthInteger11RawExponentRpzsAB0F11SignificandRpzrlEyxAA0A4UIntVcfc":{"name":"init(_:)","abstract":"
Undocumented
","parent_name":"BinaryFloatingPoint"},"Extensions/BinaryFloatingPoint.html":{"name":"BinaryFloatingPoint"},"Extensions/String.html":{"name":"String"},"Extensions.html":{"name":"Extensions","abstract":"
The following extensions are available globally.
"},"Structs.html":{"name":"Structures","abstract":"
The following structures are available globally.
"}}
\ No newline at end of file
diff --git a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/docSet.dsidx b/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/docSet.dsidx
deleted file mode 100644
index 8378812bb..000000000
Binary files a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.docset/Contents/Resources/docSet.dsidx and /dev/null differ
diff --git a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.tgz b/Carthage/Checkouts/BigInt/docs/docsets/BigInt.tgz
deleted file mode 100644
index cb79a7c0a..000000000
Binary files a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.tgz and /dev/null differ
diff --git a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.xml b/Carthage/Checkouts/BigInt/docs/docsets/BigInt.xml
deleted file mode 100644
index 21509e218..000000000
--- a/Carthage/Checkouts/BigInt/docs/docsets/BigInt.xml
+++ /dev/null
@@ -1 +0,0 @@
-
v5.2.1 https://attaswift.github.io/BigInt/reference/docsets/BigInt.tgz
diff --git a/Carthage/Checkouts/BigInt/docs/img/carat.png b/Carthage/Checkouts/BigInt/docs/img/carat.png
deleted file mode 100755
index 29d2f7fd4..000000000
Binary files a/Carthage/Checkouts/BigInt/docs/img/carat.png and /dev/null differ
diff --git a/Carthage/Checkouts/BigInt/docs/img/dash.png b/Carthage/Checkouts/BigInt/docs/img/dash.png
deleted file mode 100755
index 6f694c7a0..000000000
Binary files a/Carthage/Checkouts/BigInt/docs/img/dash.png and /dev/null differ
diff --git a/Carthage/Checkouts/BigInt/docs/img/gh.png b/Carthage/Checkouts/BigInt/docs/img/gh.png
deleted file mode 100755
index 628da97c7..000000000
Binary files a/Carthage/Checkouts/BigInt/docs/img/gh.png and /dev/null differ
diff --git a/Carthage/Checkouts/BigInt/docs/img/spinner.gif b/Carthage/Checkouts/BigInt/docs/img/spinner.gif
deleted file mode 100644
index e3038d0a4..000000000
Binary files a/Carthage/Checkouts/BigInt/docs/img/spinner.gif and /dev/null differ
diff --git a/Carthage/Checkouts/BigInt/docs/index.html b/Carthage/Checkouts/BigInt/docs/index.html
deleted file mode 100644
index cb588bb2b..000000000
--- a/Carthage/Checkouts/BigInt/docs/index.html
+++ /dev/null
@@ -1,493 +0,0 @@
-
-
-
-
BigInt Reference
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- BigInt Reference
-
- BigInt Reference
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
This repository provides integer types of arbitrary width implemented
-in 100% pure Swift. The underlying representation is in base 2^64, using Array<UInt64>
.
-
-
This module is handy when you need an integer type that’s wider than UIntMax
, but
-you don’t want to add The GNU Multiple Precision Arithmetic Library
-as a dependency.
-
-
Two big integer types are included: BigUInt
and BigInt
,
-the latter being the signed variant.
-Both of these are Swift structs with copy-on-write value semantics, and they can be used much
-like any other integer type.
-
-
The library provides implementations for some of the most frequently useful functions on
-big integers, including
-
-
-All functionality from Comparable
and Hashable
-The full set of arithmetic operators : +
, -
, *
, /
, %
, +=
, -=
, *=
, /=
, %=
-
-
-Addition and subtraction have variants that allow for
-shifting the digits of the second operand on the fly.
-Unsigned subtraction will trap when the result would be negative.
-(There are variants that return an overflow flag.)
-Multiplication uses brute force for numbers up to 1024 digits, then switches to Karatsuba’s recursive method.
-(This limit is configurable, see BigUInt.directMultiplicationLimit
.)
-A fused multiply-add method is also available, along with other special-case variants .
-Division uses Knuth’s Algorithm D, with its 3/2 digits wide quotient approximation.
-It will trap when the divisor is zero.
-BigUInt.divide
returns the quotient and
-remainder at once; this is faster than calculating them separately.
-
-Bitwise operators : ~
, |
, &
, ^
, |=
, &=
, ^=
, plus the following read-only properties:
-
-
-width
: the minimum number of bits required to store the integer,
-trailingZeroBitCount
: the number of trailing zero bits in the binary representation,
-leadingZeroBitCount
: the number of leading zero bits (when the last digit isn’t full),
-
-Shift operators : >>
, <<
, >>=
, <<=
-Methods to convert NSData
to big integers and vice versa.
-Support for generating random integers of specified maximum width or magnitude.
-Radix conversion to/from String
s and big integers up to base 36 (using repeated divisions).
-
-
-Big integers use this to implement StringLiteralConvertible
(in base 10).
-
-sqrt(n)
: The square root of an integer (using Newton’s method).
-BigUInt.gcd(n, m)
: The greatest common divisor of two integers (Stein’s algorithm).
-base.power(exponent, modulus)
: Modular exponentiation (right-to-left binary method).
-Vanilla exponentiation is also available.
-n.inverse(modulus)
: Multiplicative inverse in modulo arithmetic (extended Euclidean algorithm).
-n.isPrime()
: Miller–Rabin primality test.
-
-
-
The implementations are intended to be reasonably efficient, but they are unlikely to be
-competitive with GMP at all, even when I happened to implement an algorithm with same asymptotic
-behavior as GMP. (I haven’t performed a comparison benchmark, though.)
-
-
The library has 100% unit test coverage. Sadly this does not imply that there are no bugs
-in it.
-
-
-
Generated API docs are available at https://attaswift.github.io/BigInt/ .
-
-
-
BigInt can be used, distributed and modified under the MIT license .
-
-
-
BigInt 4.0.0 requires Swift 4.2 (The last version with support for Swift 3.x was BigInt 2.1.0.
-The last version with support for Swift 2 was BigInt 1.3.0.)
-
-
-
-Swift Version
-last BigInt Version
-
-
-
-3.x
-2.1.0
-
-
-4.0
-3.1.0
-
-
-4.2
-4.0.0
-
-
-5.x
-5.2.1
-
-
-
-
BigInt deploys to macOS 10.10, iOS 9, watchOS 2 and tvOS 9.
-It has been tested on the latest OS releases only—however, as the module uses very few platform-provided APIs,
-there should be very few issues with earlier versions.
-
-
BigInt uses no APIs specific to Apple platforms, so
-it should be easy to port it to other operating systems.
-
-
Setup instructions:
-
-
-Swift Package Manager:
-Although the Package Manager is still in its infancy, BigInt provides experimental support for it.
-Add this to the dependency section of your Package.swift
manifest:
-.package(url: "https://github.com/attaswift/BigInt.git", from: "5.2.1")
-
-CocoaPods: Put this in your Podfile
:
-pod 'BigInt', '~> 5.2'
-
-Carthage: Put this in your Cartfile
:
-github "attaswift/BigInt" ~> 5.2
-
-
-
-
-
BigUInt
is a MutableCollectionType
of its 64-bit digits, with the least significant
-digit at index 0. As a convenience, BigUInt
allows you to subscript it with indexes at
-or above its count
. The subscript operator returns 0 for out-of-bound get
s and
-automatically extends the array on out-of-bound set
s. This makes memory management simpler.
-
-
BigInt
is just a tiny wrapper around a BigUInt
absolute value and a
-sign bit , both of which are accessible as public read-write properties.
-
-
-
The types provided by BigInt
are not parametric—this is very much intentional, as
-Swift generics cost us dearly at runtime in this use case. In every approach I tried,
-making arbitrary-precision arithmetic operations work with a generic Digit
type parameter
-resulted in code that was literally ten times slower . If you can make the algorithms generic
-without such a huge performance hit, please enlighten me !
-
-
This is an area that I plan to investigate more, as it would be useful to have generic
-implementations for arbitrary-width arithmetic operations. (Polynomial division and decimal bases
-are two examples.) The library already implements double-digit multiplication and division as
-extension methods on a protocol with an associated type requirement; this has not measurably affected
-performance. Unfortunately, the same is not true for BigUInt
‘s methods.
-
-
Of course, as a last resort, we could just duplicate the code to create a separate
-generic variant that was slower but more flexible.
-
-
-
-
It is easy to use BigInt
to calculate the factorial function for any integer:
-
import BigInt
-
-func factorial(_ n: Int) -> BigInt {
- return (1 ... n).map { BigInt($0) }.reduce(BigInt(1), *)
-}
-
-print(factorial(10))
-==> 362880
-
-print(factorial(100))
-==> 93326215443944152681699238856266700490715968264381621468592963895217599993229915
- 6089414639761565182862536979208272237582511852109168640000000000000000000000
-
-print(factorial(1000))
-==> 40238726007709377354370243392300398571937486421071463254379991042993851239862902
- 05920442084869694048004799886101971960586316668729948085589013238296699445909974
- 24504087073759918823627727188732519779505950995276120874975462497043601418278094
- 64649629105639388743788648733711918104582578364784997701247663288983595573543251
- 31853239584630755574091142624174743493475534286465766116677973966688202912073791
- 43853719588249808126867838374559731746136085379534524221586593201928090878297308
- 43139284440328123155861103697680135730421616874760967587134831202547858932076716
- 91324484262361314125087802080002616831510273418279777047846358681701643650241536
- 91398281264810213092761244896359928705114964975419909342221566832572080821333186
- 11681155361583654698404670897560290095053761647584772842188967964624494516076535
- 34081989013854424879849599533191017233555566021394503997362807501378376153071277
- 61926849034352625200015888535147331611702103968175921510907788019393178114194545
- 25722386554146106289218796022383897147608850627686296714667469756291123408243920
- 81601537808898939645182632436716167621791689097799119037540312746222899880051954
- 44414282012187361745992642956581746628302955570299024324153181617210465832036786
- 90611726015878352075151628422554026517048330422614397428693306169089796848259012
- 54583271682264580665267699586526822728070757813918581788896522081643483448259932
- 66043367660176999612831860788386150279465955131156552036093988180612138558600301
- 43569452722420634463179746059468257310379008402443243846565724501440282188525247
- 09351906209290231364932734975655139587205596542287497740114133469627154228458623
- 77387538230483865688976461927383814900140767310446640259899490222221765904339901
- 88601856652648506179970235619389701786004081188972991831102117122984590164192106
- 88843871218556461249607987229085192968193723886426148396573822911231250241866493
- 53143970137428531926649875337218940694281434118520158014123344828015051399694290
- 15348307764456909907315243327828826986460278986432113908350621709500259738986355
- 42771967428222487575867657523442202075736305694988250879689281627538488633969099
- 59826280956121450994871701244516461260379029309120889086942028510640182154399457
- 15680594187274899809425474217358240106367740459574178516082923013535808184009699
- 63725242305608559037006242712434169090041536901059339838357779394109700277534720
- 00000000000000000000000000000000000000000000000000000000000000000000000000000000
- 00000000000000000000000000000000000000000000000000000000000000000000000000000000
- 00000000000000000000000000000000000000000000000000000000000000000000000000000000
- 00000
-
-
-
Well, I guess that’s all right, but it’s not very interesting. Let’s try something more useful.
-
-
-
The BigInt
module provides all necessary parts to implement an (overly)
-simple RSA cryptography system .
-
-
Let’s start with a simple function that generates a random n-bit prime. The module
-includes a function to generate random integers of a specific size, and also an
-isPrime
method that performs the Miller–Rabin primality test. These are all we need:
-
func generatePrime(_ width: Int) -> BigUInt {
- while true {
- var random = BigUInt.randomInteger(withExactWidth: width)
- random |= BigUInt(1)
- if random.isPrime() {
- return random
- }
- }
-}
-
-let p = generatePrime(1024)
-==> 13308187650642192396256419911012544845370493728424936791561478318443071617242872
- 81980956747087187419914435169914161116601678883358611076800743580556055714173922
- 08406194264346635072293912609713085260354070700055888678514690878149253177960273
- 775659537560220378850112471985434373425534121373466492101182463962031
-
-let q = generatePrime(1024)
-==> 17072954422657145489547308812333368925007949054501204983863958355897172093173783
- 10108226596943999553784252564650624766276133157586733504784616138305701168410157
- 80784336308507083874651158029602582993233111593356512531869546706885170044355115
- 669728424124141763799008880327106952436883614887277350838425336156327
-
-
-
Cool! Now that we have two large primes, we can produce an RSA public/private keypair
-out of them.
-
typealias Key = (modulus: BigUInt, exponent: BigUInt)
-
-let n = p * q
-==> 22721008120758282530010953362926306641542233757318103044313144976976529789946696
- 15454966720907712515917481418981591379647635391260569349099666410127279690367978
- 81184375533755888994370640857883754985364288413796100527262763202679037134021810
- 57933883525572232242690805678883227791774442041516929419640051653934584376704034
- 63953169772816907280591934423237977258358097846511079947337857778137177570668391
- 57455417707100275487770399281417352829897118140972240757708561027087217205975220
- 02207275447810167397968435583004676293892340103729490987263776871467057582629588
- 916498579594964478080508868267360515953225283461208420137
-
-let e: BigUInt = 65537
-let phi = (p - 1) * (q - 1)
-let d = e.inverse(phi)! // d * e % phi == 1
-==> 13964664343869014759736350480776837992604500903989703383202366291905558996277719
- 77822086142456362972689566985925179681282432115598451765899180050962461295573831
- 37069237934291884106584820998146965085531433195106686745474222222620986858696591
- 69836532468835154412554521152103642453158895363417640676611704542784576974374954
- 45789456921660619938185093118762690200980720312508614337759620606992462563490422
- 76669559556568917533268479190948959560397579572761529852891246283539604545691244
- 89999692877158676643042118662613875863504016129837099223040687512684532694527109
- 80742873307409704484365002175294665608486688146261327793
-
-let publicKey: Key = (n, e)
-let privateKey: Key = (n, d)
-
-
-
In RSA, modular exponentiation is used to encrypt (and decrypt) messages.
-
func encrypt(_ message: BigUInt, key: Key) -> BigUInt {
- return message.power(key.exponent, modulus: key.modulus)
-}
-
-
-
Let’s try out our new keypair by converting a string into UTF-8, interpreting
-the resulting binary representation as a big integer, and encrypting it with the
-public key. BigUInt
has an initializer that takes an NSData
, so this is pretty
-easy to do:
-
let secret: BigUInt = BigUInt("Arbitrary precision arithmetic is fun!".dataUsingEncoding(NSUTF8StringEncoding)!)
-==> 83323446846105976078466731524728681905293067701804838925389198929123912971229457
- 68818568737
-
-let cyphertext = encrypt(secret, key: publicKey)
-==> 95186982543485985200666516508066093880038842892337880561554910904277290917831453
- 54854954722744805432145474047391353716305176389470779020645959135298322520888633
- 61674945129099575943384767330342554525120384485469428048962027149169876127890306
- 77028183904699491962050888974524603226290836984166164759586952419343589385279641
- 47999991283152843977988979846238236160274201261075188190509539751990119132013021
- 74866638595734222867005089157198503204192264814750832072844208520394603054901706
- 06024394731371973402595826456435944968439153664617188570808940022471990638468783
- 49208193955207336172861151720299024935127021719852700882
-
-
-
Well, it looks encrypted all right, but can we get the original message back?
-In theory, encrypting the cyphertext with the private key returns the original message.
-Let’s see:
-
let plaintext = encrypt(cyphertext, key: privateKey)
-==> 83323446846105976078466731524728681905293067701804838925389198929123912971229457
- 68818568737
-
-let received = String(data: plaintext.serialize(), encoding: NSUTF8StringEncoding)
-==> "Arbitrary precision arithmetic is fun!"
-
-
-
Yay! This is truly terrific, but please don’t use this example code in an actual
-cryptography system. RSA has lots of subtle (and some not so subtle) complications
-that we ignored to keep this example short.
-
-
-
Another fun activity to try with BigInt
s is to generate the digits of π.
-Let’s try implementing Jeremy Gibbon’s spigot algorithm .
-This is a rather slow algorithm as π-generators go, but it makes up for it with its grooviness
-factor: it’s remarkably short, it only uses (big) integer arithmetic, and every iteration
-produces a single new digit in the base-10 representation of π. This naturally leads to an
-implementation as an infinite GeneratorType
:
-
func digitsOfPi() -> AnyGenerator<Int> {
- var q: BigUInt = 1
- var r: BigUInt = 180
- var t: BigUInt = 60
- var i: UInt64 = 2 // Does not overflow until digit #826_566_842
- return AnyIterator {
- let u: UInt64 = 3 * (3 * i + 1) * (3 * i + 2)
- let y = (q.multiplied(byDigit: 27 * i - 12) + 5 * r) / (5 * t)
- (q, r, t) = (
- 10 * q.multiplied(byDigit: i * (2 * i - 1)),
- 10 * (q.multiplied(byDigit: 5 * i - 2) + r - y * t).multiplied(byDigit: u),
- t.multiplied(byDigit: u))
- i += 1
- return Int(y[0])
- }
-}
-
-
-
Well, that was surprisingly easy. But does it work? Of course it does!
-
var digits = "π ≈ "
-var count = 0
-for digit in digitsOfPi() {
- assert(digit < 10)
- digits += String(digit)
- count += 1
- if count == 1 { digits += "." }
- if count == 1000 { break }
-}
-
-digits
-==> π ≈ 3.14159265358979323846264338327950288419716939937510582097494459230781640628
- 62089986280348253421170679821480865132823066470938446095505822317253594081284811
- 17450284102701938521105559644622948954930381964428810975665933446128475648233786
- 78316527120190914564856692346034861045432664821339360726024914127372458700660631
- 55881748815209209628292540917153643678925903600113305305488204665213841469519415
- 11609433057270365759591953092186117381932611793105118548074462379962749567351885
- 75272489122793818301194912983367336244065664308602139494639522473719070217986094
- 37027705392171762931767523846748184676694051320005681271452635608277857713427577
- 89609173637178721468440901224953430146549585371050792279689258923542019956112129
- 02196086403441815981362977477130996051870721134999999837297804995105973173281609
- 63185950244594553469083026425223082533446850352619311881710100031378387528865875
- 33208381420617177669147303598253490428755468731159562863882353787593751957781857
- 780532171226806613001927876611195909216420198
-
-
-
Now go and have some fun with big integers on your own!
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Carthage/Checkouts/BigInt/docs/js/jazzy.js b/Carthage/Checkouts/BigInt/docs/js/jazzy.js
deleted file mode 100755
index 1e55d6ef0..000000000
--- a/Carthage/Checkouts/BigInt/docs/js/jazzy.js
+++ /dev/null
@@ -1,70 +0,0 @@
-window.jazzy = {'docset': false}
-if (typeof window.dash != 'undefined') {
- document.documentElement.className += ' dash'
- window.jazzy.docset = true
-}
-if (navigator.userAgent.match(/xcode/i)) {
- document.documentElement.className += ' xcode'
- window.jazzy.docset = true
-}
-
-function toggleItem($link, $content) {
- var animationDuration = 300;
- $link.toggleClass('token-open');
- $content.slideToggle(animationDuration);
-}
-
-function itemLinkToContent($link) {
- return $link.parent().parent().next();
-}
-
-// On doc load + hash-change, open any targetted item
-function openCurrentItemIfClosed() {
- if (window.jazzy.docset) {
- return;
- }
- var $link = $(`a[name="${location.hash.substring(1)}"]`).nextAll('.token');
- $content = itemLinkToContent($link);
- if ($content.is(':hidden')) {
- toggleItem($link, $content);
- }
-}
-
-$(openCurrentItemIfClosed);
-$(window).on('hashchange', openCurrentItemIfClosed);
-
-// On item link ('token') click, toggle its discussion
-$('.token').on('click', function(event) {
- if (window.jazzy.docset) {
- return;
- }
- var $link = $(this);
- toggleItem($link, itemLinkToContent($link));
-
- // Keeps the document from jumping to the hash.
- var href = $link.attr('href');
- if (history.pushState) {
- history.pushState({}, '', href);
- } else {
- location.hash = href;
- }
- event.preventDefault();
-});
-
-// Clicks on links to the current, closed, item need to open the item
-$("a:not('.token')").on('click', function() {
- if (location == this.href) {
- openCurrentItemIfClosed();
- }
-});
-
-// KaTeX rendering
-if ("katex" in window) {
- $($('.math').each( (_, element) => {
- katex.render(element.textContent, element, {
- displayMode: $(element).hasClass('m-block'),
- throwOnError: false,
- trust: true
- });
- }))
-}
diff --git a/Carthage/Checkouts/BigInt/docs/js/jazzy.search.js b/Carthage/Checkouts/BigInt/docs/js/jazzy.search.js
deleted file mode 100644
index e3d1ab905..000000000
--- a/Carthage/Checkouts/BigInt/docs/js/jazzy.search.js
+++ /dev/null
@@ -1,70 +0,0 @@
-$(function(){
- var $typeahead = $('[data-typeahead]');
- var $form = $typeahead.parents('form');
- var searchURL = $form.attr('action');
-
- function displayTemplate(result) {
- return result.name;
- }
-
- function suggestionTemplate(result) {
- var t = '
';
- t += '' + result.name + ' ';
- if (result.parent_name) {
- t += '' + result.parent_name + ' ';
- }
- t += '
';
- return t;
- }
-
- $typeahead.one('focus', function() {
- $form.addClass('loading');
-
- $.getJSON(searchURL).then(function(searchData) {
- const searchIndex = lunr(function() {
- this.ref('url');
- this.field('name');
- this.field('abstract');
- for (const [url, doc] of Object.entries(searchData)) {
- this.add({url: url, name: doc.name, abstract: doc.abstract});
- }
- });
-
- $typeahead.typeahead(
- {
- highlight: true,
- minLength: 3,
- autoselect: true
- },
- {
- limit: 10,
- display: displayTemplate,
- templates: { suggestion: suggestionTemplate },
- source: function(query, sync) {
- const lcSearch = query.toLowerCase();
- const results = searchIndex.query(function(q) {
- q.term(lcSearch, { boost: 100 });
- q.term(lcSearch, {
- boost: 10,
- wildcard: lunr.Query.wildcard.TRAILING
- });
- }).map(function(result) {
- var doc = searchData[result.ref];
- doc.url = result.ref;
- return doc;
- });
- sync(results);
- }
- }
- );
- $form.removeClass('loading');
- $typeahead.trigger('focus');
- });
- });
-
- var baseURL = searchURL.slice(0, -"search.json".length);
-
- $typeahead.on('typeahead:select', function(e, result) {
- window.location = baseURL + result.url;
- });
-});
diff --git a/Carthage/Checkouts/BigInt/docs/js/jquery.min.js b/Carthage/Checkouts/BigInt/docs/js/jquery.min.js
deleted file mode 100644
index b0614034a..000000000
--- a/Carthage/Checkouts/BigInt/docs/js/jquery.min.js
+++ /dev/null
@@ -1,2 +0,0 @@
-/*! jQuery v3.5.1 | (c) JS Foundation and other contributors | jquery.org/license */
-!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.5.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0
+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML=" ",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML=" ";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||j,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,j=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML=" ",y.option=!!ce.lastChild;var ge={thead:[1,""],col:[2,""],tr:[2,""],td:[3,""],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function qe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):("number"==typeof f.top&&(f.top+="px"),"number"==typeof f.left&&(f.left+="px"),c.css(f))}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=$e(y.pixelPosition,function(e,t){if(t)return t=Be(e,n),Me.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 00){var c=e.utils.clone(r)||{};c.position=[a,l],c.index=s.length,s.push(new e.Token(i.slice(a,o),c))}a=o+1}}return s},e.tokenizer.separator=/[\s\-]+/,e.Pipeline=function(){this._stack=[]},e.Pipeline.registeredFunctions=Object.create(null),e.Pipeline.registerFunction=function(t,r){r in this.registeredFunctions&&e.utils.warn("Overwriting existing registered function: "+r),t.label=r,e.Pipeline.registeredFunctions[t.label]=t},e.Pipeline.warnIfFunctionNotRegistered=function(t){var r=t.label&&t.label in this.registeredFunctions;r||e.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",t)},e.Pipeline.load=function(t){var r=new e.Pipeline;return t.forEach(function(t){var i=e.Pipeline.registeredFunctions[t];if(!i)throw new Error("Cannot load unregistered function: "+t);r.add(i)}),r},e.Pipeline.prototype.add=function(){var t=Array.prototype.slice.call(arguments);t.forEach(function(t){e.Pipeline.warnIfFunctionNotRegistered(t),this._stack.push(t)},this)},e.Pipeline.prototype.after=function(t,r){e.Pipeline.warnIfFunctionNotRegistered(r);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");i+=1,this._stack.splice(i,0,r)},e.Pipeline.prototype.before=function(t,r){e.Pipeline.warnIfFunctionNotRegistered(r);var i=this._stack.indexOf(t);if(i==-1)throw new Error("Cannot find existingFn");this._stack.splice(i,0,r)},e.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);t!=-1&&this._stack.splice(t,1)},e.Pipeline.prototype.run=function(e){for(var t=this._stack.length,r=0;r1&&(se&&(r=n),s!=e);)i=r-t,n=t+Math.floor(i/2),s=this.elements[2*n];return s==e?2*n:s>e?2*n:sa?l+=2:o==a&&(t+=r[u+1]*i[l+1],u+=2,l+=2);return t},e.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},e.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,r=0;t0){var o,a=s.str.charAt(0);a in s.node.edges?o=s.node.edges[a]:(o=new e.TokenSet,s.node.edges[a]=o),1==s.str.length&&(o["final"]=!0),n.push({node:o,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(0!=s.editsRemaining){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new e.TokenSet;s.node.edges["*"]=u}if(0==s.str.length&&(u["final"]=!0),n.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&n.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),1==s.str.length&&(s.node["final"]=!0),s.str.length>=1){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new e.TokenSet;s.node.edges["*"]=l}1==s.str.length&&(l["final"]=!0),n.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var c,h=s.str.charAt(0),d=s.str.charAt(1);d in s.node.edges?c=s.node.edges[d]:(c=new e.TokenSet,s.node.edges[d]=c),1==s.str.length&&(c["final"]=!0),n.push({node:c,editsRemaining:s.editsRemaining-1,str:h+s.str.slice(2)})}}}return i},e.TokenSet.fromString=function(t){for(var r=new e.TokenSet,i=r,n=0,s=t.length;n=e;t--){var r=this.uncheckedNodes[t],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r["char"]]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}},e.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},e.Index.prototype.search=function(t){return this.query(function(r){var i=new e.QueryParser(t,r);i.parse()})},e.Index.prototype.query=function(t){for(var r=new e.Query(this.fields),i=Object.create(null),n=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),u=0;u1?this._b=1:this._b=e},e.Builder.prototype.k1=function(e){this._k1=e},e.Builder.prototype.add=function(t,r){var i=t[this._ref],n=Object.keys(this._fields);this._documents[i]=r||{},this.documentCount+=1;for(var s=0;s=this.length)return e.QueryLexer.EOS;var t=this.str.charAt(this.pos);return this.pos+=1,t},e.QueryLexer.prototype.width=function(){return this.pos-this.start},e.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},e.QueryLexer.prototype.backup=function(){this.pos-=1},e.QueryLexer.prototype.acceptDigitRun=function(){var t,r;do t=this.next(),r=t.charCodeAt(0);while(r>47&&r<58);t!=e.QueryLexer.EOS&&this.backup()},e.QueryLexer.prototype.more=function(){return this.pos1&&(t.backup(),t.emit(e.QueryLexer.TERM)),t.ignore(),t.more())return e.QueryLexer.lexText},e.QueryLexer.lexEditDistance=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.EDIT_DISTANCE),e.QueryLexer.lexText},e.QueryLexer.lexBoost=function(t){return t.ignore(),t.acceptDigitRun(),t.emit(e.QueryLexer.BOOST),e.QueryLexer.lexText},e.QueryLexer.lexEOS=function(t){t.width()>0&&t.emit(e.QueryLexer.TERM)},e.QueryLexer.termSeparator=e.tokenizer.separator,e.QueryLexer.lexText=function(t){for(;;){var r=t.next();if(r==e.QueryLexer.EOS)return e.QueryLexer.lexEOS;if(92!=r.charCodeAt(0)){if(":"==r)return e.QueryLexer.lexField;if("~"==r)return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexEditDistance;if("^"==r)return t.backup(),t.width()>0&&t.emit(e.QueryLexer.TERM),e.QueryLexer.lexBoost;if("+"==r&&1===t.width())return t.emit(e.QueryLexer.PRESENCE),e.QueryLexer.lexText;if("-"==r&&1===t.width())return t.emit(e.QueryLexer.PRESENCE),e.QueryLexer.lexText;if(r.match(e.QueryLexer.termSeparator))return e.QueryLexer.lexTerm}else t.escapeCharacter()}},e.QueryParser=function(t,r){this.lexer=new e.QueryLexer(t),this.query=r,this.currentClause={},this.lexemeIdx=0},e.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var t=e.QueryParser.parseClause;t;)t=t(this);return this.query},e.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},e.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},e.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},e.QueryParser.parseClause=function(t){var r=t.peekLexeme();if(void 0!=r)switch(r.type){case e.QueryLexer.PRESENCE:return e.QueryParser.parsePresence;case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expected either a field or a term, found "+r.type;throw r.str.length>=1&&(i+=" with value '"+r.str+"'"),new e.QueryParseError(i,r.start,r.end)}},e.QueryParser.parsePresence=function(t){var r=t.consumeLexeme();if(void 0!=r){switch(r.str){case"-":t.currentClause.presence=e.Query.presence.PROHIBITED;break;case"+":t.currentClause.presence=e.Query.presence.REQUIRED;break;default:var i="unrecognised presence operator'"+r.str+"'";throw new e.QueryParseError(i,r.start,r.end)}var n=t.peekLexeme();if(void 0==n){var i="expecting term or field, found nothing";throw new e.QueryParseError(i,r.start,r.end)}switch(n.type){case e.QueryLexer.FIELD:return e.QueryParser.parseField;case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var i="expecting term or field, found '"+n.type+"'";throw new e.QueryParseError(i,n.start,n.end)}}},e.QueryParser.parseField=function(t){var r=t.consumeLexeme();if(void 0!=r){if(t.query.allFields.indexOf(r.str)==-1){var i=t.query.allFields.map(function(e){return"'"+e+"'"}).join(", "),n="unrecognised field '"+r.str+"', possible fields: "+i;throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.fields=[r.str];var s=t.peekLexeme();if(void 0==s){var n="expecting term, found nothing";throw new e.QueryParseError(n,r.start,r.end)}switch(s.type){case e.QueryLexer.TERM:return e.QueryParser.parseTerm;default:var n="expecting term, found '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},e.QueryParser.parseTerm=function(t){var r=t.consumeLexeme();if(void 0!=r){t.currentClause.term=r.str.toLowerCase(),r.str.indexOf("*")!=-1&&(t.currentClause.usePipeline=!1);var i=t.peekLexeme();if(void 0==i)return void t.nextClause();switch(i.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+i.type+"'";throw new e.QueryParseError(n,i.start,i.end)}}},e.QueryParser.parseEditDistance=function(t){var r=t.consumeLexeme();if(void 0!=r){var i=parseInt(r.str,10);if(isNaN(i)){var n="edit distance must be numeric";throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.editDistance=i;var s=t.peekLexeme();if(void 0==s)return void t.nextClause();switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},e.QueryParser.parseBoost=function(t){var r=t.consumeLexeme();if(void 0!=r){var i=parseInt(r.str,10);if(isNaN(i)){var n="boost must be numeric";throw new e.QueryParseError(n,r.start,r.end)}t.currentClause.boost=i;var s=t.peekLexeme();if(void 0==s)return void t.nextClause();switch(s.type){case e.QueryLexer.TERM:return t.nextClause(),e.QueryParser.parseTerm;case e.QueryLexer.FIELD:return t.nextClause(),e.QueryParser.parseField;case e.QueryLexer.EDIT_DISTANCE:return e.QueryParser.parseEditDistance;case e.QueryLexer.BOOST:return e.QueryParser.parseBoost;case e.QueryLexer.PRESENCE:return t.nextClause(),e.QueryParser.parsePresence;default:var n="Unexpected lexeme type '"+s.type+"'";throw new e.QueryParseError(n,s.start,s.end)}}},function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.lunr=t()}(this,function(){return e})}();
diff --git a/Carthage/Checkouts/BigInt/docs/js/typeahead.jquery.js b/Carthage/Checkouts/BigInt/docs/js/typeahead.jquery.js
deleted file mode 100644
index 3a2d2ab03..000000000
--- a/Carthage/Checkouts/BigInt/docs/js/typeahead.jquery.js
+++ /dev/null
@@ -1,1694 +0,0 @@
-/*!
- * typeahead.js 1.3.1
- * https://github.com/corejavascript/typeahead.js
- * Copyright 2013-2020 Twitter, Inc. and other contributors; Licensed MIT
- */
-
-
-(function(root, factory) {
- if (typeof define === "function" && define.amd) {
- define([ "jquery" ], function(a0) {
- return factory(a0);
- });
- } else if (typeof module === "object" && module.exports) {
- module.exports = factory(require("jquery"));
- } else {
- factory(root["jQuery"]);
- }
-})(this, function($) {
- var _ = function() {
- "use strict";
- return {
- isMsie: function() {
- return /(msie|trident)/i.test(navigator.userAgent) ? navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2] : false;
- },
- isBlankString: function(str) {
- return !str || /^\s*$/.test(str);
- },
- escapeRegExChars: function(str) {
- return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
- },
- isString: function(obj) {
- return typeof obj === "string";
- },
- isNumber: function(obj) {
- return typeof obj === "number";
- },
- isArray: $.isArray,
- isFunction: $.isFunction,
- isObject: $.isPlainObject,
- isUndefined: function(obj) {
- return typeof obj === "undefined";
- },
- isElement: function(obj) {
- return !!(obj && obj.nodeType === 1);
- },
- isJQuery: function(obj) {
- return obj instanceof $;
- },
- toStr: function toStr(s) {
- return _.isUndefined(s) || s === null ? "" : s + "";
- },
- bind: $.proxy,
- each: function(collection, cb) {
- $.each(collection, reverseArgs);
- function reverseArgs(index, value) {
- return cb(value, index);
- }
- },
- map: $.map,
- filter: $.grep,
- every: function(obj, test) {
- var result = true;
- if (!obj) {
- return result;
- }
- $.each(obj, function(key, val) {
- if (!(result = test.call(null, val, key, obj))) {
- return false;
- }
- });
- return !!result;
- },
- some: function(obj, test) {
- var result = false;
- if (!obj) {
- return result;
- }
- $.each(obj, function(key, val) {
- if (result = test.call(null, val, key, obj)) {
- return false;
- }
- });
- return !!result;
- },
- mixin: $.extend,
- identity: function(x) {
- return x;
- },
- clone: function(obj) {
- return $.extend(true, {}, obj);
- },
- getIdGenerator: function() {
- var counter = 0;
- return function() {
- return counter++;
- };
- },
- templatify: function templatify(obj) {
- return $.isFunction(obj) ? obj : template;
- function template() {
- return String(obj);
- }
- },
- defer: function(fn) {
- setTimeout(fn, 0);
- },
- debounce: function(func, wait, immediate) {
- var timeout, result;
- return function() {
- var context = this, args = arguments, later, callNow;
- later = function() {
- timeout = null;
- if (!immediate) {
- result = func.apply(context, args);
- }
- };
- callNow = immediate && !timeout;
- clearTimeout(timeout);
- timeout = setTimeout(later, wait);
- if (callNow) {
- result = func.apply(context, args);
- }
- return result;
- };
- },
- throttle: function(func, wait) {
- var context, args, timeout, result, previous, later;
- previous = 0;
- later = function() {
- previous = new Date();
- timeout = null;
- result = func.apply(context, args);
- };
- return function() {
- var now = new Date(), remaining = wait - (now - previous);
- context = this;
- args = arguments;
- if (remaining <= 0) {
- clearTimeout(timeout);
- timeout = null;
- previous = now;
- result = func.apply(context, args);
- } else if (!timeout) {
- timeout = setTimeout(later, remaining);
- }
- return result;
- };
- },
- stringify: function(val) {
- return _.isString(val) ? val : JSON.stringify(val);
- },
- guid: function() {
- function _p8(s) {
- var p = (Math.random().toString(16) + "000000000").substr(2, 8);
- return s ? "-" + p.substr(0, 4) + "-" + p.substr(4, 4) : p;
- }
- return "tt-" + _p8() + _p8(true) + _p8(true) + _p8();
- },
- noop: function() {}
- };
- }();
- var WWW = function() {
- "use strict";
- var defaultClassNames = {
- wrapper: "twitter-typeahead",
- input: "tt-input",
- hint: "tt-hint",
- menu: "tt-menu",
- dataset: "tt-dataset",
- suggestion: "tt-suggestion",
- selectable: "tt-selectable",
- empty: "tt-empty",
- open: "tt-open",
- cursor: "tt-cursor",
- highlight: "tt-highlight"
- };
- return build;
- function build(o) {
- var www, classes;
- classes = _.mixin({}, defaultClassNames, o);
- www = {
- css: buildCss(),
- classes: classes,
- html: buildHtml(classes),
- selectors: buildSelectors(classes)
- };
- return {
- css: www.css,
- html: www.html,
- classes: www.classes,
- selectors: www.selectors,
- mixin: function(o) {
- _.mixin(o, www);
- }
- };
- }
- function buildHtml(c) {
- return {
- wrapper: ' ',
- menu: ''
- };
- }
- function buildSelectors(classes) {
- var selectors = {};
- _.each(classes, function(v, k) {
- selectors[k] = "." + v;
- });
- return selectors;
- }
- function buildCss() {
- var css = {
- wrapper: {
- position: "relative",
- display: "inline-block"
- },
- hint: {
- position: "absolute",
- top: "0",
- left: "0",
- borderColor: "transparent",
- boxShadow: "none",
- opacity: "1"
- },
- input: {
- position: "relative",
- verticalAlign: "top",
- backgroundColor: "transparent"
- },
- inputWithNoHint: {
- position: "relative",
- verticalAlign: "top"
- },
- menu: {
- position: "absolute",
- top: "100%",
- left: "0",
- zIndex: "100",
- display: "none"
- },
- ltr: {
- left: "0",
- right: "auto"
- },
- rtl: {
- left: "auto",
- right: " 0"
- }
- };
- if (_.isMsie()) {
- _.mixin(css.input, {
- backgroundImage: "url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"
- });
- }
- return css;
- }
- }();
- var EventBus = function() {
- "use strict";
- var namespace, deprecationMap;
- namespace = "typeahead:";
- deprecationMap = {
- render: "rendered",
- cursorchange: "cursorchanged",
- select: "selected",
- autocomplete: "autocompleted"
- };
- function EventBus(o) {
- if (!o || !o.el) {
- $.error("EventBus initialized without el");
- }
- this.$el = $(o.el);
- }
- _.mixin(EventBus.prototype, {
- _trigger: function(type, args) {
- var $e = $.Event(namespace + type);
- this.$el.trigger.call(this.$el, $e, args || []);
- return $e;
- },
- before: function(type) {
- var args, $e;
- args = [].slice.call(arguments, 1);
- $e = this._trigger("before" + type, args);
- return $e.isDefaultPrevented();
- },
- trigger: function(type) {
- var deprecatedType;
- this._trigger(type, [].slice.call(arguments, 1));
- if (deprecatedType = deprecationMap[type]) {
- this._trigger(deprecatedType, [].slice.call(arguments, 1));
- }
- }
- });
- return EventBus;
- }();
- var EventEmitter = function() {
- "use strict";
- var splitter = /\s+/, nextTick = getNextTick();
- return {
- onSync: onSync,
- onAsync: onAsync,
- off: off,
- trigger: trigger
- };
- function on(method, types, cb, context) {
- var type;
- if (!cb) {
- return this;
- }
- types = types.split(splitter);
- cb = context ? bindContext(cb, context) : cb;
- this._callbacks = this._callbacks || {};
- while (type = types.shift()) {
- this._callbacks[type] = this._callbacks[type] || {
- sync: [],
- async: []
- };
- this._callbacks[type][method].push(cb);
- }
- return this;
- }
- function onAsync(types, cb, context) {
- return on.call(this, "async", types, cb, context);
- }
- function onSync(types, cb, context) {
- return on.call(this, "sync", types, cb, context);
- }
- function off(types) {
- var type;
- if (!this._callbacks) {
- return this;
- }
- types = types.split(splitter);
- while (type = types.shift()) {
- delete this._callbacks[type];
- }
- return this;
- }
- function trigger(types) {
- var type, callbacks, args, syncFlush, asyncFlush;
- if (!this._callbacks) {
- return this;
- }
- types = types.split(splitter);
- args = [].slice.call(arguments, 1);
- while ((type = types.shift()) && (callbacks = this._callbacks[type])) {
- syncFlush = getFlush(callbacks.sync, this, [ type ].concat(args));
- asyncFlush = getFlush(callbacks.async, this, [ type ].concat(args));
- syncFlush() && nextTick(asyncFlush);
- }
- return this;
- }
- function getFlush(callbacks, context, args) {
- return flush;
- function flush() {
- var cancelled;
- for (var i = 0, len = callbacks.length; !cancelled && i < len; i += 1) {
- cancelled = callbacks[i].apply(context, args) === false;
- }
- return !cancelled;
- }
- }
- function getNextTick() {
- var nextTickFn;
- if (window.setImmediate) {
- nextTickFn = function nextTickSetImmediate(fn) {
- setImmediate(function() {
- fn();
- });
- };
- } else {
- nextTickFn = function nextTickSetTimeout(fn) {
- setTimeout(function() {
- fn();
- }, 0);
- };
- }
- return nextTickFn;
- }
- function bindContext(fn, context) {
- return fn.bind ? fn.bind(context) : function() {
- fn.apply(context, [].slice.call(arguments, 0));
- };
- }
- }();
- var highlight = function(doc) {
- "use strict";
- var defaults = {
- node: null,
- pattern: null,
- tagName: "strong",
- className: null,
- wordsOnly: false,
- caseSensitive: false,
- diacriticInsensitive: false
- };
- var accented = {
- A: "[AaªÀ-Åà-åĀ-ąǍǎȀ-ȃȦȧᴬᵃḀḁẚẠ-ảₐ℀℁℻⒜Ⓐⓐ㍱-㍴㎀-㎄㎈㎉㎩-㎯㏂㏊㏟㏿Aa]",
- B: "[BbᴮᵇḂ-ḇℬ⒝Ⓑⓑ㍴㎅-㎇㏃㏈㏔㏝Bb]",
- C: "[CcÇçĆ-čᶜ℀ℂ℃℅℆ℭⅭⅽ⒞Ⓒⓒ㍶㎈㎉㎝㎠㎤㏄-㏇Cc]",
- D: "[DdĎďDŽ-džDZ-dzᴰᵈḊ-ḓⅅⅆⅮⅾ⒟Ⓓⓓ㋏㍲㍷-㍹㎗㎭-㎯㏅㏈Dd]",
- E: "[EeÈ-Ëè-ëĒ-ěȄ-ȇȨȩᴱᵉḘ-ḛẸ-ẽₑ℡ℯℰⅇ⒠Ⓔⓔ㉐㋍㋎Ee]",
- F: "[FfᶠḞḟ℉ℱ℻⒡Ⓕⓕ㎊-㎌㎙ff-fflFf]",
- G: "[GgĜ-ģǦǧǴǵᴳᵍḠḡℊ⒢Ⓖⓖ㋌㋍㎇㎍-㎏㎓㎬㏆㏉㏒㏿Gg]",
- H: "[HhĤĥȞȟʰᴴḢ-ḫẖℋ-ℎ⒣Ⓗⓗ㋌㍱㎐-㎔㏊㏋㏗Hh]",
- I: "[IiÌ-Ïì-ïĨ-İIJijǏǐȈ-ȋᴵᵢḬḭỈ-ịⁱℐℑℹⅈⅠ-ⅣⅥ-ⅨⅪⅫⅰ-ⅳⅵ-ⅸⅺⅻ⒤Ⓘⓘ㍺㏌㏕fiffiIi]",
- J: "[JjIJ-ĵLJ-njǰʲᴶⅉ⒥ⒿⓙⱼJj]",
- K: "[KkĶķǨǩᴷᵏḰ-ḵK⒦Ⓚⓚ㎄㎅㎉㎏㎑㎘㎞㎢㎦㎪㎸㎾㏀㏆㏍-㏏Kk]",
- L: "[LlĹ-ŀLJ-ljˡᴸḶḷḺ-ḽℒℓ℡Ⅼⅼ⒧Ⓛⓛ㋏㎈㎉㏐-㏓㏕㏖㏿flfflLl]",
- M: "[MmᴹᵐḾ-ṃ℠™ℳⅯⅿ⒨Ⓜⓜ㍷-㍹㎃㎆㎎㎒㎖㎙-㎨㎫㎳㎷㎹㎽㎿㏁㏂㏎㏐㏔-㏖㏘㏙㏞㏟Mm]",
- N: "[NnÑñŃ-ʼnNJ-njǸǹᴺṄ-ṋⁿℕ№⒩Ⓝⓝ㎁㎋㎚㎱㎵㎻㏌㏑Nn]",
- O: "[OoºÒ-Öò-öŌ-őƠơǑǒǪǫȌ-ȏȮȯᴼᵒỌ-ỏₒ℅№ℴ⒪Ⓞⓞ㍵㏇㏒㏖Oo]",
- P: "[PpᴾᵖṔ-ṗℙ⒫Ⓟⓟ㉐㍱㍶㎀㎊㎩-㎬㎰㎴㎺㏋㏗-㏚Pp]",
- Q: "[Qqℚ⒬Ⓠⓠ㏃Qq]",
- R: "[RrŔ-řȐ-ȓʳᴿᵣṘ-ṛṞṟ₨ℛ-ℝ⒭Ⓡⓡ㋍㍴㎭-㎯㏚㏛Rr]",
- S: "[SsŚ-šſȘșˢṠ-ṣ₨℁℠⒮Ⓢⓢ㎧㎨㎮-㎳㏛㏜stSs]",
- T: "[TtŢ-ťȚțᵀᵗṪ-ṱẗ℡™⒯Ⓣⓣ㉐㋏㎔㏏ſtstTt]",
- U: "[UuÙ-Üù-üŨ-ųƯưǓǔȔ-ȗᵁᵘᵤṲ-ṷỤ-ủ℆⒰Ⓤⓤ㍳㍺Uu]",
- V: "[VvᵛᵥṼ-ṿⅣ-Ⅷⅳ-ⅷ⒱Ⓥⓥⱽ㋎㍵㎴-㎹㏜㏞Vv]",
- W: "[WwŴŵʷᵂẀ-ẉẘ⒲Ⓦⓦ㎺-㎿㏝Ww]",
- X: "[XxˣẊ-ẍₓ℻Ⅸ-Ⅻⅸ-ⅻ⒳Ⓧⓧ㏓Xx]",
- Y: "[YyÝýÿŶ-ŸȲȳʸẎẏẙỲ-ỹ⒴Ⓨⓨ㏉Yy]",
- Z: "[ZzŹ-žDZ-dzᶻẐ-ẕℤℨ⒵Ⓩⓩ㎐-㎔Zz]"
- };
- return function hightlight(o) {
- var regex;
- o = _.mixin({}, defaults, o);
- if (!o.node || !o.pattern) {
- return;
- }
- o.pattern = _.isArray(o.pattern) ? o.pattern : [ o.pattern ];
- regex = getRegex(o.pattern, o.caseSensitive, o.wordsOnly, o.diacriticInsensitive);
- traverse(o.node, hightlightTextNode);
- function hightlightTextNode(textNode) {
- var match, patternNode, wrapperNode;
- if (match = regex.exec(textNode.data)) {
- wrapperNode = doc.createElement(o.tagName);
- o.className && (wrapperNode.className = o.className);
- patternNode = textNode.splitText(match.index);
- patternNode.splitText(match[0].length);
- wrapperNode.appendChild(patternNode.cloneNode(true));
- textNode.parentNode.replaceChild(wrapperNode, patternNode);
- }
- return !!match;
- }
- function traverse(el, hightlightTextNode) {
- var childNode, TEXT_NODE_TYPE = 3;
- for (var i = 0; i < el.childNodes.length; i++) {
- childNode = el.childNodes[i];
- if (childNode.nodeType === TEXT_NODE_TYPE) {
- i += hightlightTextNode(childNode) ? 1 : 0;
- } else {
- traverse(childNode, hightlightTextNode);
- }
- }
- }
- };
- function accent_replacer(chr) {
- return accented[chr.toUpperCase()] || chr;
- }
- function getRegex(patterns, caseSensitive, wordsOnly, diacriticInsensitive) {
- var escapedPatterns = [], regexStr;
- for (var i = 0, len = patterns.length; i < len; i++) {
- var escapedWord = _.escapeRegExChars(patterns[i]);
- if (diacriticInsensitive) {
- escapedWord = escapedWord.replace(/\S/g, accent_replacer);
- }
- escapedPatterns.push(escapedWord);
- }
- regexStr = wordsOnly ? "\\b(" + escapedPatterns.join("|") + ")\\b" : "(" + escapedPatterns.join("|") + ")";
- return caseSensitive ? new RegExp(regexStr) : new RegExp(regexStr, "i");
- }
- }(window.document);
- var Input = function() {
- "use strict";
- var specialKeyCodeMap;
- specialKeyCodeMap = {
- 9: "tab",
- 27: "esc",
- 37: "left",
- 39: "right",
- 13: "enter",
- 38: "up",
- 40: "down"
- };
- function Input(o, www) {
- var id;
- o = o || {};
- if (!o.input) {
- $.error("input is missing");
- }
- www.mixin(this);
- this.$hint = $(o.hint);
- this.$input = $(o.input);
- this.$menu = $(o.menu);
- id = this.$input.attr("id") || _.guid();
- this.$menu.attr("id", id + "_listbox");
- this.$hint.attr({
- "aria-hidden": true
- });
- this.$input.attr({
- "aria-owns": id + "_listbox",
- role: "combobox",
- "aria-autocomplete": "list",
- "aria-expanded": false
- });
- this.query = this.$input.val();
- this.queryWhenFocused = this.hasFocus() ? this.query : null;
- this.$overflowHelper = buildOverflowHelper(this.$input);
- this._checkLanguageDirection();
- if (this.$hint.length === 0) {
- this.setHint = this.getHint = this.clearHint = this.clearHintIfInvalid = _.noop;
- }
- this.onSync("cursorchange", this._updateDescendent);
- }
- Input.normalizeQuery = function(str) {
- return _.toStr(str).replace(/^\s*/g, "").replace(/\s{2,}/g, " ");
- };
- _.mixin(Input.prototype, EventEmitter, {
- _onBlur: function onBlur() {
- this.resetInputValue();
- this.trigger("blurred");
- },
- _onFocus: function onFocus() {
- this.queryWhenFocused = this.query;
- this.trigger("focused");
- },
- _onKeydown: function onKeydown($e) {
- var keyName = specialKeyCodeMap[$e.which || $e.keyCode];
- this._managePreventDefault(keyName, $e);
- if (keyName && this._shouldTrigger(keyName, $e)) {
- this.trigger(keyName + "Keyed", $e);
- }
- },
- _onInput: function onInput() {
- this._setQuery(this.getInputValue());
- this.clearHintIfInvalid();
- this._checkLanguageDirection();
- },
- _managePreventDefault: function managePreventDefault(keyName, $e) {
- var preventDefault;
- switch (keyName) {
- case "up":
- case "down":
- preventDefault = !withModifier($e);
- break;
-
- default:
- preventDefault = false;
- }
- preventDefault && $e.preventDefault();
- },
- _shouldTrigger: function shouldTrigger(keyName, $e) {
- var trigger;
- switch (keyName) {
- case "tab":
- trigger = !withModifier($e);
- break;
-
- default:
- trigger = true;
- }
- return trigger;
- },
- _checkLanguageDirection: function checkLanguageDirection() {
- var dir = (this.$input.css("direction") || "ltr").toLowerCase();
- if (this.dir !== dir) {
- this.dir = dir;
- this.$hint.attr("dir", dir);
- this.trigger("langDirChanged", dir);
- }
- },
- _setQuery: function setQuery(val, silent) {
- var areEquivalent, hasDifferentWhitespace;
- areEquivalent = areQueriesEquivalent(val, this.query);
- hasDifferentWhitespace = areEquivalent ? this.query.length !== val.length : false;
- this.query = val;
- if (!silent && !areEquivalent) {
- this.trigger("queryChanged", this.query);
- } else if (!silent && hasDifferentWhitespace) {
- this.trigger("whitespaceChanged", this.query);
- }
- },
- _updateDescendent: function updateDescendent(event, id) {
- this.$input.attr("aria-activedescendant", id);
- },
- bind: function() {
- var that = this, onBlur, onFocus, onKeydown, onInput;
- onBlur = _.bind(this._onBlur, this);
- onFocus = _.bind(this._onFocus, this);
- onKeydown = _.bind(this._onKeydown, this);
- onInput = _.bind(this._onInput, this);
- this.$input.on("blur.tt", onBlur).on("focus.tt", onFocus).on("keydown.tt", onKeydown);
- if (!_.isMsie() || _.isMsie() > 9) {
- this.$input.on("input.tt", onInput);
- } else {
- this.$input.on("keydown.tt keypress.tt cut.tt paste.tt", function($e) {
- if (specialKeyCodeMap[$e.which || $e.keyCode]) {
- return;
- }
- _.defer(_.bind(that._onInput, that, $e));
- });
- }
- return this;
- },
- focus: function focus() {
- this.$input.focus();
- },
- blur: function blur() {
- this.$input.blur();
- },
- getLangDir: function getLangDir() {
- return this.dir;
- },
- getQuery: function getQuery() {
- return this.query || "";
- },
- setQuery: function setQuery(val, silent) {
- this.setInputValue(val);
- this._setQuery(val, silent);
- },
- hasQueryChangedSinceLastFocus: function hasQueryChangedSinceLastFocus() {
- return this.query !== this.queryWhenFocused;
- },
- getInputValue: function getInputValue() {
- return this.$input.val();
- },
- setInputValue: function setInputValue(value) {
- this.$input.val(value);
- this.clearHintIfInvalid();
- this._checkLanguageDirection();
- },
- resetInputValue: function resetInputValue() {
- this.setInputValue(this.query);
- },
- getHint: function getHint() {
- return this.$hint.val();
- },
- setHint: function setHint(value) {
- this.$hint.val(value);
- },
- clearHint: function clearHint() {
- this.setHint("");
- },
- clearHintIfInvalid: function clearHintIfInvalid() {
- var val, hint, valIsPrefixOfHint, isValid;
- val = this.getInputValue();
- hint = this.getHint();
- valIsPrefixOfHint = val !== hint && hint.indexOf(val) === 0;
- isValid = val !== "" && valIsPrefixOfHint && !this.hasOverflow();
- !isValid && this.clearHint();
- },
- hasFocus: function hasFocus() {
- return this.$input.is(":focus");
- },
- hasOverflow: function hasOverflow() {
- var constraint = this.$input.width() - 2;
- this.$overflowHelper.text(this.getInputValue());
- return this.$overflowHelper.width() >= constraint;
- },
- isCursorAtEnd: function() {
- var valueLength, selectionStart, range;
- valueLength = this.$input.val().length;
- selectionStart = this.$input[0].selectionStart;
- if (_.isNumber(selectionStart)) {
- return selectionStart === valueLength;
- } else if (document.selection) {
- range = document.selection.createRange();
- range.moveStart("character", -valueLength);
- return valueLength === range.text.length;
- }
- return true;
- },
- destroy: function destroy() {
- this.$hint.off(".tt");
- this.$input.off(".tt");
- this.$overflowHelper.remove();
- this.$hint = this.$input = this.$overflowHelper = $("");
- },
- setAriaExpanded: function setAriaExpanded(value) {
- this.$input.attr("aria-expanded", value);
- }
- });
- return Input;
- function buildOverflowHelper($input) {
- return $('
').css({
- position: "absolute",
- visibility: "hidden",
- whiteSpace: "pre",
- fontFamily: $input.css("font-family"),
- fontSize: $input.css("font-size"),
- fontStyle: $input.css("font-style"),
- fontVariant: $input.css("font-variant"),
- fontWeight: $input.css("font-weight"),
- wordSpacing: $input.css("word-spacing"),
- letterSpacing: $input.css("letter-spacing"),
- textIndent: $input.css("text-indent"),
- textRendering: $input.css("text-rendering"),
- textTransform: $input.css("text-transform")
- }).insertAfter($input);
- }
- function areQueriesEquivalent(a, b) {
- return Input.normalizeQuery(a) === Input.normalizeQuery(b);
- }
- function withModifier($e) {
- return $e.altKey || $e.ctrlKey || $e.metaKey || $e.shiftKey;
- }
- }();
- var Dataset = function() {
- "use strict";
- var keys, nameGenerator;
- keys = {
- dataset: "tt-selectable-dataset",
- val: "tt-selectable-display",
- obj: "tt-selectable-object"
- };
- nameGenerator = _.getIdGenerator();
- function Dataset(o, www) {
- o = o || {};
- o.templates = o.templates || {};
- o.templates.notFound = o.templates.notFound || o.templates.empty;
- if (!o.source) {
- $.error("missing source");
- }
- if (!o.node) {
- $.error("missing node");
- }
- if (o.name && !isValidName(o.name)) {
- $.error("invalid dataset name: " + o.name);
- }
- www.mixin(this);
- this.highlight = !!o.highlight;
- this.name = _.toStr(o.name || nameGenerator());
- this.limit = o.limit || 5;
- this.displayFn = getDisplayFn(o.display || o.displayKey);
- this.templates = getTemplates(o.templates, this.displayFn);
- this.source = o.source.__ttAdapter ? o.source.__ttAdapter() : o.source;
- this.async = _.isUndefined(o.async) ? this.source.length > 2 : !!o.async;
- this._resetLastSuggestion();
- this.$el = $(o.node).attr("role", "presentation").addClass(this.classes.dataset).addClass(this.classes.dataset + "-" + this.name);
- }
- Dataset.extractData = function extractData(el) {
- var $el = $(el);
- if ($el.data(keys.obj)) {
- return {
- dataset: $el.data(keys.dataset) || "",
- val: $el.data(keys.val) || "",
- obj: $el.data(keys.obj) || null
- };
- }
- return null;
- };
- _.mixin(Dataset.prototype, EventEmitter, {
- _overwrite: function overwrite(query, suggestions) {
- suggestions = suggestions || [];
- if (suggestions.length) {
- this._renderSuggestions(query, suggestions);
- } else if (this.async && this.templates.pending) {
- this._renderPending(query);
- } else if (!this.async && this.templates.notFound) {
- this._renderNotFound(query);
- } else {
- this._empty();
- }
- this.trigger("rendered", suggestions, false, this.name);
- },
- _append: function append(query, suggestions) {
- suggestions = suggestions || [];
- if (suggestions.length && this.$lastSuggestion.length) {
- this._appendSuggestions(query, suggestions);
- } else if (suggestions.length) {
- this._renderSuggestions(query, suggestions);
- } else if (!this.$lastSuggestion.length && this.templates.notFound) {
- this._renderNotFound(query);
- }
- this.trigger("rendered", suggestions, true, this.name);
- },
- _renderSuggestions: function renderSuggestions(query, suggestions) {
- var $fragment;
- $fragment = this._getSuggestionsFragment(query, suggestions);
- this.$lastSuggestion = $fragment.children().last();
- this.$el.html($fragment).prepend(this._getHeader(query, suggestions)).append(this._getFooter(query, suggestions));
- },
- _appendSuggestions: function appendSuggestions(query, suggestions) {
- var $fragment, $lastSuggestion;
- $fragment = this._getSuggestionsFragment(query, suggestions);
- $lastSuggestion = $fragment.children().last();
- this.$lastSuggestion.after($fragment);
- this.$lastSuggestion = $lastSuggestion;
- },
- _renderPending: function renderPending(query) {
- var template = this.templates.pending;
- this._resetLastSuggestion();
- template && this.$el.html(template({
- query: query,
- dataset: this.name
- }));
- },
- _renderNotFound: function renderNotFound(query) {
- var template = this.templates.notFound;
- this._resetLastSuggestion();
- template && this.$el.html(template({
- query: query,
- dataset: this.name
- }));
- },
- _empty: function empty() {
- this.$el.empty();
- this._resetLastSuggestion();
- },
- _getSuggestionsFragment: function getSuggestionsFragment(query, suggestions) {
- var that = this, fragment;
- fragment = document.createDocumentFragment();
- _.each(suggestions, function getSuggestionNode(suggestion) {
- var $el, context;
- context = that._injectQuery(query, suggestion);
- $el = $(that.templates.suggestion(context)).data(keys.dataset, that.name).data(keys.obj, suggestion).data(keys.val, that.displayFn(suggestion)).addClass(that.classes.suggestion + " " + that.classes.selectable);
- fragment.appendChild($el[0]);
- });
- this.highlight && highlight({
- className: this.classes.highlight,
- node: fragment,
- pattern: query
- });
- return $(fragment);
- },
- _getFooter: function getFooter(query, suggestions) {
- return this.templates.footer ? this.templates.footer({
- query: query,
- suggestions: suggestions,
- dataset: this.name
- }) : null;
- },
- _getHeader: function getHeader(query, suggestions) {
- return this.templates.header ? this.templates.header({
- query: query,
- suggestions: suggestions,
- dataset: this.name
- }) : null;
- },
- _resetLastSuggestion: function resetLastSuggestion() {
- this.$lastSuggestion = $();
- },
- _injectQuery: function injectQuery(query, obj) {
- return _.isObject(obj) ? _.mixin({
- _query: query
- }, obj) : obj;
- },
- update: function update(query) {
- var that = this, canceled = false, syncCalled = false, rendered = 0;
- this.cancel();
- this.cancel = function cancel() {
- canceled = true;
- that.cancel = $.noop;
- that.async && that.trigger("asyncCanceled", query, that.name);
- };
- this.source(query, sync, async);
- !syncCalled && sync([]);
- function sync(suggestions) {
- if (syncCalled) {
- return;
- }
- syncCalled = true;
- suggestions = (suggestions || []).slice(0, that.limit);
- rendered = suggestions.length;
- that._overwrite(query, suggestions);
- if (rendered < that.limit && that.async) {
- that.trigger("asyncRequested", query, that.name);
- }
- }
- function async(suggestions) {
- suggestions = suggestions || [];
- if (!canceled && rendered < that.limit) {
- that.cancel = $.noop;
- var idx = Math.abs(rendered - that.limit);
- rendered += idx;
- that._append(query, suggestions.slice(0, idx));
- that.async && that.trigger("asyncReceived", query, that.name);
- }
- }
- },
- cancel: $.noop,
- clear: function clear() {
- this._empty();
- this.cancel();
- this.trigger("cleared");
- },
- isEmpty: function isEmpty() {
- return this.$el.is(":empty");
- },
- destroy: function destroy() {
- this.$el = $("
");
- }
- });
- return Dataset;
- function getDisplayFn(display) {
- display = display || _.stringify;
- return _.isFunction(display) ? display : displayFn;
- function displayFn(obj) {
- return obj[display];
- }
- }
- function getTemplates(templates, displayFn) {
- return {
- notFound: templates.notFound && _.templatify(templates.notFound),
- pending: templates.pending && _.templatify(templates.pending),
- header: templates.header && _.templatify(templates.header),
- footer: templates.footer && _.templatify(templates.footer),
- suggestion: templates.suggestion ? userSuggestionTemplate : suggestionTemplate
- };
- function userSuggestionTemplate(context) {
- var template = templates.suggestion;
- return $(template(context)).attr("id", _.guid());
- }
- function suggestionTemplate(context) {
- return $('
').attr("id", _.guid()).text(displayFn(context));
- }
- }
- function isValidName(str) {
- return /^[_a-zA-Z0-9-]+$/.test(str);
- }
- }();
- var Menu = function() {
- "use strict";
- function Menu(o, www) {
- var that = this;
- o = o || {};
- if (!o.node) {
- $.error("node is required");
- }
- www.mixin(this);
- this.$node = $(o.node);
- this.query = null;
- this.datasets = _.map(o.datasets, initializeDataset);
- function initializeDataset(oDataset) {
- var node = that.$node.find(oDataset.node).first();
- oDataset.node = node.length ? node : $("
").appendTo(that.$node);
- return new Dataset(oDataset, www);
- }
- }
- _.mixin(Menu.prototype, EventEmitter, {
- _onSelectableClick: function onSelectableClick($e) {
- this.trigger("selectableClicked", $($e.currentTarget));
- },
- _onRendered: function onRendered(type, dataset, suggestions, async) {
- this.$node.toggleClass(this.classes.empty, this._allDatasetsEmpty());
- this.trigger("datasetRendered", dataset, suggestions, async);
- },
- _onCleared: function onCleared() {
- this.$node.toggleClass(this.classes.empty, this._allDatasetsEmpty());
- this.trigger("datasetCleared");
- },
- _propagate: function propagate() {
- this.trigger.apply(this, arguments);
- },
- _allDatasetsEmpty: function allDatasetsEmpty() {
- return _.every(this.datasets, _.bind(function isDatasetEmpty(dataset) {
- var isEmpty = dataset.isEmpty();
- this.$node.attr("aria-expanded", !isEmpty);
- return isEmpty;
- }, this));
- },
- _getSelectables: function getSelectables() {
- return this.$node.find(this.selectors.selectable);
- },
- _removeCursor: function _removeCursor() {
- var $selectable = this.getActiveSelectable();
- $selectable && $selectable.removeClass(this.classes.cursor);
- },
- _ensureVisible: function ensureVisible($el) {
- var elTop, elBottom, nodeScrollTop, nodeHeight;
- elTop = $el.position().top;
- elBottom = elTop + $el.outerHeight(true);
- nodeScrollTop = this.$node.scrollTop();
- nodeHeight = this.$node.height() + parseInt(this.$node.css("paddingTop"), 10) + parseInt(this.$node.css("paddingBottom"), 10);
- if (elTop < 0) {
- this.$node.scrollTop(nodeScrollTop + elTop);
- } else if (nodeHeight < elBottom) {
- this.$node.scrollTop(nodeScrollTop + (elBottom - nodeHeight));
- }
- },
- bind: function() {
- var that = this, onSelectableClick;
- onSelectableClick = _.bind(this._onSelectableClick, this);
- this.$node.on("click.tt", this.selectors.selectable, onSelectableClick);
- this.$node.on("mouseover", this.selectors.selectable, function() {
- that.setCursor($(this));
- });
- this.$node.on("mouseleave", function() {
- that._removeCursor();
- });
- _.each(this.datasets, function(dataset) {
- dataset.onSync("asyncRequested", that._propagate, that).onSync("asyncCanceled", that._propagate, that).onSync("asyncReceived", that._propagate, that).onSync("rendered", that._onRendered, that).onSync("cleared", that._onCleared, that);
- });
- return this;
- },
- isOpen: function isOpen() {
- return this.$node.hasClass(this.classes.open);
- },
- open: function open() {
- this.$node.scrollTop(0);
- this.$node.addClass(this.classes.open);
- },
- close: function close() {
- this.$node.attr("aria-expanded", false);
- this.$node.removeClass(this.classes.open);
- this._removeCursor();
- },
- setLanguageDirection: function setLanguageDirection(dir) {
- this.$node.attr("dir", dir);
- },
- selectableRelativeToCursor: function selectableRelativeToCursor(delta) {
- var $selectables, $oldCursor, oldIndex, newIndex;
- $oldCursor = this.getActiveSelectable();
- $selectables = this._getSelectables();
- oldIndex = $oldCursor ? $selectables.index($oldCursor) : -1;
- newIndex = oldIndex + delta;
- newIndex = (newIndex + 1) % ($selectables.length + 1) - 1;
- newIndex = newIndex < -1 ? $selectables.length - 1 : newIndex;
- return newIndex === -1 ? null : $selectables.eq(newIndex);
- },
- setCursor: function setCursor($selectable) {
- this._removeCursor();
- if ($selectable = $selectable && $selectable.first()) {
- $selectable.addClass(this.classes.cursor);
- this._ensureVisible($selectable);
- }
- },
- getSelectableData: function getSelectableData($el) {
- return $el && $el.length ? Dataset.extractData($el) : null;
- },
- getActiveSelectable: function getActiveSelectable() {
- var $selectable = this._getSelectables().filter(this.selectors.cursor).first();
- return $selectable.length ? $selectable : null;
- },
- getTopSelectable: function getTopSelectable() {
- var $selectable = this._getSelectables().first();
- return $selectable.length ? $selectable : null;
- },
- update: function update(query) {
- var isValidUpdate = query !== this.query;
- if (isValidUpdate) {
- this.query = query;
- _.each(this.datasets, updateDataset);
- }
- return isValidUpdate;
- function updateDataset(dataset) {
- dataset.update(query);
- }
- },
- empty: function empty() {
- _.each(this.datasets, clearDataset);
- this.query = null;
- this.$node.addClass(this.classes.empty);
- function clearDataset(dataset) {
- dataset.clear();
- }
- },
- destroy: function destroy() {
- this.$node.off(".tt");
- this.$node = $("
");
- _.each(this.datasets, destroyDataset);
- function destroyDataset(dataset) {
- dataset.destroy();
- }
- }
- });
- return Menu;
- }();
- var Status = function() {
- "use strict";
- function Status(options) {
- this.$el = $("
", {
- role: "status",
- "aria-live": "polite"
- }).css({
- position: "absolute",
- padding: "0",
- border: "0",
- height: "1px",
- width: "1px",
- "margin-bottom": "-1px",
- "margin-right": "-1px",
- overflow: "hidden",
- clip: "rect(0 0 0 0)",
- "white-space": "nowrap"
- });
- options.$input.after(this.$el);
- _.each(options.menu.datasets, _.bind(function(dataset) {
- if (dataset.onSync) {
- dataset.onSync("rendered", _.bind(this.update, this));
- dataset.onSync("cleared", _.bind(this.cleared, this));
- }
- }, this));
- }
- _.mixin(Status.prototype, {
- update: function update(event, suggestions) {
- var length = suggestions.length;
- var words;
- if (length === 1) {
- words = {
- result: "result",
- is: "is"
- };
- } else {
- words = {
- result: "results",
- is: "are"
- };
- }
- this.$el.text(length + " " + words.result + " " + words.is + " available, use up and down arrow keys to navigate.");
- },
- cleared: function() {
- this.$el.text("");
- }
- });
- return Status;
- }();
- var DefaultMenu = function() {
- "use strict";
- var s = Menu.prototype;
- function DefaultMenu() {
- Menu.apply(this, [].slice.call(arguments, 0));
- }
- _.mixin(DefaultMenu.prototype, Menu.prototype, {
- open: function open() {
- !this._allDatasetsEmpty() && this._show();
- return s.open.apply(this, [].slice.call(arguments, 0));
- },
- close: function close() {
- this._hide();
- return s.close.apply(this, [].slice.call(arguments, 0));
- },
- _onRendered: function onRendered() {
- if (this._allDatasetsEmpty()) {
- this._hide();
- } else {
- this.isOpen() && this._show();
- }
- return s._onRendered.apply(this, [].slice.call(arguments, 0));
- },
- _onCleared: function onCleared() {
- if (this._allDatasetsEmpty()) {
- this._hide();
- } else {
- this.isOpen() && this._show();
- }
- return s._onCleared.apply(this, [].slice.call(arguments, 0));
- },
- setLanguageDirection: function setLanguageDirection(dir) {
- this.$node.css(dir === "ltr" ? this.css.ltr : this.css.rtl);
- return s.setLanguageDirection.apply(this, [].slice.call(arguments, 0));
- },
- _hide: function hide() {
- this.$node.hide();
- },
- _show: function show() {
- this.$node.css("display", "block");
- }
- });
- return DefaultMenu;
- }();
- var Typeahead = function() {
- "use strict";
- function Typeahead(o, www) {
- var onFocused, onBlurred, onEnterKeyed, onTabKeyed, onEscKeyed, onUpKeyed, onDownKeyed, onLeftKeyed, onRightKeyed, onQueryChanged, onWhitespaceChanged;
- o = o || {};
- if (!o.input) {
- $.error("missing input");
- }
- if (!o.menu) {
- $.error("missing menu");
- }
- if (!o.eventBus) {
- $.error("missing event bus");
- }
- www.mixin(this);
- this.eventBus = o.eventBus;
- this.minLength = _.isNumber(o.minLength) ? o.minLength : 1;
- this.input = o.input;
- this.menu = o.menu;
- this.enabled = true;
- this.autoselect = !!o.autoselect;
- this.active = false;
- this.input.hasFocus() && this.activate();
- this.dir = this.input.getLangDir();
- this._hacks();
- this.menu.bind().onSync("selectableClicked", this._onSelectableClicked, this).onSync("asyncRequested", this._onAsyncRequested, this).onSync("asyncCanceled", this._onAsyncCanceled, this).onSync("asyncReceived", this._onAsyncReceived, this).onSync("datasetRendered", this._onDatasetRendered, this).onSync("datasetCleared", this._onDatasetCleared, this);
- onFocused = c(this, "activate", "open", "_onFocused");
- onBlurred = c(this, "deactivate", "_onBlurred");
- onEnterKeyed = c(this, "isActive", "isOpen", "_onEnterKeyed");
- onTabKeyed = c(this, "isActive", "isOpen", "_onTabKeyed");
- onEscKeyed = c(this, "isActive", "_onEscKeyed");
- onUpKeyed = c(this, "isActive", "open", "_onUpKeyed");
- onDownKeyed = c(this, "isActive", "open", "_onDownKeyed");
- onLeftKeyed = c(this, "isActive", "isOpen", "_onLeftKeyed");
- onRightKeyed = c(this, "isActive", "isOpen", "_onRightKeyed");
- onQueryChanged = c(this, "_openIfActive", "_onQueryChanged");
- onWhitespaceChanged = c(this, "_openIfActive", "_onWhitespaceChanged");
- this.input.bind().onSync("focused", onFocused, this).onSync("blurred", onBlurred, this).onSync("enterKeyed", onEnterKeyed, this).onSync("tabKeyed", onTabKeyed, this).onSync("escKeyed", onEscKeyed, this).onSync("upKeyed", onUpKeyed, this).onSync("downKeyed", onDownKeyed, this).onSync("leftKeyed", onLeftKeyed, this).onSync("rightKeyed", onRightKeyed, this).onSync("queryChanged", onQueryChanged, this).onSync("whitespaceChanged", onWhitespaceChanged, this).onSync("langDirChanged", this._onLangDirChanged, this);
- }
- _.mixin(Typeahead.prototype, {
- _hacks: function hacks() {
- var $input, $menu;
- $input = this.input.$input || $("
");
- $menu = this.menu.$node || $("
");
- $input.on("blur.tt", function($e) {
- var active, isActive, hasActive;
- active = document.activeElement;
- isActive = $menu.is(active);
- hasActive = $menu.has(active).length > 0;
- if (_.isMsie() && (isActive || hasActive)) {
- $e.preventDefault();
- $e.stopImmediatePropagation();
- _.defer(function() {
- $input.focus();
- });
- }
- });
- $menu.on("mousedown.tt", function($e) {
- $e.preventDefault();
- });
- },
- _onSelectableClicked: function onSelectableClicked(type, $el) {
- this.select($el);
- },
- _onDatasetCleared: function onDatasetCleared() {
- this._updateHint();
- },
- _onDatasetRendered: function onDatasetRendered(type, suggestions, async, dataset) {
- this._updateHint();
- if (this.autoselect) {
- var cursorClass = this.selectors.cursor.substr(1);
- this.menu.$node.find(this.selectors.suggestion).first().addClass(cursorClass);
- }
- this.eventBus.trigger("render", suggestions, async, dataset);
- },
- _onAsyncRequested: function onAsyncRequested(type, dataset, query) {
- this.eventBus.trigger("asyncrequest", query, dataset);
- },
- _onAsyncCanceled: function onAsyncCanceled(type, dataset, query) {
- this.eventBus.trigger("asynccancel", query, dataset);
- },
- _onAsyncReceived: function onAsyncReceived(type, dataset, query) {
- this.eventBus.trigger("asyncreceive", query, dataset);
- },
- _onFocused: function onFocused() {
- this._minLengthMet() && this.menu.update(this.input.getQuery());
- },
- _onBlurred: function onBlurred() {
- if (this.input.hasQueryChangedSinceLastFocus()) {
- this.eventBus.trigger("change", this.input.getQuery());
- }
- },
- _onEnterKeyed: function onEnterKeyed(type, $e) {
- var $selectable;
- if ($selectable = this.menu.getActiveSelectable()) {
- if (this.select($selectable)) {
- $e.preventDefault();
- $e.stopPropagation();
- }
- } else if (this.autoselect) {
- if (this.select(this.menu.getTopSelectable())) {
- $e.preventDefault();
- $e.stopPropagation();
- }
- }
- },
- _onTabKeyed: function onTabKeyed(type, $e) {
- var $selectable;
- if ($selectable = this.menu.getActiveSelectable()) {
- this.select($selectable) && $e.preventDefault();
- } else if (this.autoselect) {
- if ($selectable = this.menu.getTopSelectable()) {
- this.autocomplete($selectable) && $e.preventDefault();
- }
- }
- },
- _onEscKeyed: function onEscKeyed() {
- this.close();
- },
- _onUpKeyed: function onUpKeyed() {
- this.moveCursor(-1);
- },
- _onDownKeyed: function onDownKeyed() {
- this.moveCursor(+1);
- },
- _onLeftKeyed: function onLeftKeyed() {
- if (this.dir === "rtl" && this.input.isCursorAtEnd()) {
- this.autocomplete(this.menu.getActiveSelectable() || this.menu.getTopSelectable());
- }
- },
- _onRightKeyed: function onRightKeyed() {
- if (this.dir === "ltr" && this.input.isCursorAtEnd()) {
- this.autocomplete(this.menu.getActiveSelectable() || this.menu.getTopSelectable());
- }
- },
- _onQueryChanged: function onQueryChanged(e, query) {
- this._minLengthMet(query) ? this.menu.update(query) : this.menu.empty();
- },
- _onWhitespaceChanged: function onWhitespaceChanged() {
- this._updateHint();
- },
- _onLangDirChanged: function onLangDirChanged(e, dir) {
- if (this.dir !== dir) {
- this.dir = dir;
- this.menu.setLanguageDirection(dir);
- }
- },
- _openIfActive: function openIfActive() {
- this.isActive() && this.open();
- },
- _minLengthMet: function minLengthMet(query) {
- query = _.isString(query) ? query : this.input.getQuery() || "";
- return query.length >= this.minLength;
- },
- _updateHint: function updateHint() {
- var $selectable, data, val, query, escapedQuery, frontMatchRegEx, match;
- $selectable = this.menu.getTopSelectable();
- data = this.menu.getSelectableData($selectable);
- val = this.input.getInputValue();
- if (data && !_.isBlankString(val) && !this.input.hasOverflow()) {
- query = Input.normalizeQuery(val);
- escapedQuery = _.escapeRegExChars(query);
- frontMatchRegEx = new RegExp("^(?:" + escapedQuery + ")(.+$)", "i");
- match = frontMatchRegEx.exec(data.val);
- match && this.input.setHint(val + match[1]);
- } else {
- this.input.clearHint();
- }
- },
- isEnabled: function isEnabled() {
- return this.enabled;
- },
- enable: function enable() {
- this.enabled = true;
- },
- disable: function disable() {
- this.enabled = false;
- },
- isActive: function isActive() {
- return this.active;
- },
- activate: function activate() {
- if (this.isActive()) {
- return true;
- } else if (!this.isEnabled() || this.eventBus.before("active")) {
- return false;
- } else {
- this.active = true;
- this.eventBus.trigger("active");
- return true;
- }
- },
- deactivate: function deactivate() {
- if (!this.isActive()) {
- return true;
- } else if (this.eventBus.before("idle")) {
- return false;
- } else {
- this.active = false;
- this.close();
- this.eventBus.trigger("idle");
- return true;
- }
- },
- isOpen: function isOpen() {
- return this.menu.isOpen();
- },
- open: function open() {
- if (!this.isOpen() && !this.eventBus.before("open")) {
- this.input.setAriaExpanded(true);
- this.menu.open();
- this._updateHint();
- this.eventBus.trigger("open");
- }
- return this.isOpen();
- },
- close: function close() {
- if (this.isOpen() && !this.eventBus.before("close")) {
- this.input.setAriaExpanded(false);
- this.menu.close();
- this.input.clearHint();
- this.input.resetInputValue();
- this.eventBus.trigger("close");
- }
- return !this.isOpen();
- },
- setVal: function setVal(val) {
- this.input.setQuery(_.toStr(val));
- },
- getVal: function getVal() {
- return this.input.getQuery();
- },
- select: function select($selectable) {
- var data = this.menu.getSelectableData($selectable);
- if (data && !this.eventBus.before("select", data.obj, data.dataset)) {
- this.input.setQuery(data.val, true);
- this.eventBus.trigger("select", data.obj, data.dataset);
- this.close();
- return true;
- }
- return false;
- },
- autocomplete: function autocomplete($selectable) {
- var query, data, isValid;
- query = this.input.getQuery();
- data = this.menu.getSelectableData($selectable);
- isValid = data && query !== data.val;
- if (isValid && !this.eventBus.before("autocomplete", data.obj, data.dataset)) {
- this.input.setQuery(data.val);
- this.eventBus.trigger("autocomplete", data.obj, data.dataset);
- return true;
- }
- return false;
- },
- moveCursor: function moveCursor(delta) {
- var query, $candidate, data, suggestion, datasetName, cancelMove, id;
- query = this.input.getQuery();
- $candidate = this.menu.selectableRelativeToCursor(delta);
- data = this.menu.getSelectableData($candidate);
- suggestion = data ? data.obj : null;
- datasetName = data ? data.dataset : null;
- id = $candidate ? $candidate.attr("id") : null;
- this.input.trigger("cursorchange", id);
- cancelMove = this._minLengthMet() && this.menu.update(query);
- if (!cancelMove && !this.eventBus.before("cursorchange", suggestion, datasetName)) {
- this.menu.setCursor($candidate);
- if (data) {
- if (typeof data.val === "string") {
- this.input.setInputValue(data.val);
- }
- } else {
- this.input.resetInputValue();
- this._updateHint();
- }
- this.eventBus.trigger("cursorchange", suggestion, datasetName);
- return true;
- }
- return false;
- },
- destroy: function destroy() {
- this.input.destroy();
- this.menu.destroy();
- }
- });
- return Typeahead;
- function c(ctx) {
- var methods = [].slice.call(arguments, 1);
- return function() {
- var args = [].slice.call(arguments);
- _.each(methods, function(method) {
- return ctx[method].apply(ctx, args);
- });
- };
- }
- }();
- (function() {
- "use strict";
- var old, keys, methods;
- old = $.fn.typeahead;
- keys = {
- www: "tt-www",
- attrs: "tt-attrs",
- typeahead: "tt-typeahead"
- };
- methods = {
- initialize: function initialize(o, datasets) {
- var www;
- datasets = _.isArray(datasets) ? datasets : [].slice.call(arguments, 1);
- o = o || {};
- www = WWW(o.classNames);
- return this.each(attach);
- function attach() {
- var $input, $wrapper, $hint, $menu, defaultHint, defaultMenu, eventBus, input, menu, status, typeahead, MenuConstructor;
- _.each(datasets, function(d) {
- d.highlight = !!o.highlight;
- });
- $input = $(this);
- $wrapper = $(www.html.wrapper);
- $hint = $elOrNull(o.hint);
- $menu = $elOrNull(o.menu);
- defaultHint = o.hint !== false && !$hint;
- defaultMenu = o.menu !== false && !$menu;
- defaultHint && ($hint = buildHintFromInput($input, www));
- defaultMenu && ($menu = $(www.html.menu).css(www.css.menu));
- $hint && $hint.val("");
- $input = prepInput($input, www);
- if (defaultHint || defaultMenu) {
- $wrapper.css(www.css.wrapper);
- $input.css(defaultHint ? www.css.input : www.css.inputWithNoHint);
- $input.wrap($wrapper).parent().prepend(defaultHint ? $hint : null).append(defaultMenu ? $menu : null);
- }
- MenuConstructor = defaultMenu ? DefaultMenu : Menu;
- eventBus = new EventBus({
- el: $input
- });
- input = new Input({
- hint: $hint,
- input: $input,
- menu: $menu
- }, www);
- menu = new MenuConstructor({
- node: $menu,
- datasets: datasets
- }, www);
- status = new Status({
- $input: $input,
- menu: menu
- });
- typeahead = new Typeahead({
- input: input,
- menu: menu,
- eventBus: eventBus,
- minLength: o.minLength,
- autoselect: o.autoselect
- }, www);
- $input.data(keys.www, www);
- $input.data(keys.typeahead, typeahead);
- }
- },
- isEnabled: function isEnabled() {
- var enabled;
- ttEach(this.first(), function(t) {
- enabled = t.isEnabled();
- });
- return enabled;
- },
- enable: function enable() {
- ttEach(this, function(t) {
- t.enable();
- });
- return this;
- },
- disable: function disable() {
- ttEach(this, function(t) {
- t.disable();
- });
- return this;
- },
- isActive: function isActive() {
- var active;
- ttEach(this.first(), function(t) {
- active = t.isActive();
- });
- return active;
- },
- activate: function activate() {
- ttEach(this, function(t) {
- t.activate();
- });
- return this;
- },
- deactivate: function deactivate() {
- ttEach(this, function(t) {
- t.deactivate();
- });
- return this;
- },
- isOpen: function isOpen() {
- var open;
- ttEach(this.first(), function(t) {
- open = t.isOpen();
- });
- return open;
- },
- open: function open() {
- ttEach(this, function(t) {
- t.open();
- });
- return this;
- },
- close: function close() {
- ttEach(this, function(t) {
- t.close();
- });
- return this;
- },
- select: function select(el) {
- var success = false, $el = $(el);
- ttEach(this.first(), function(t) {
- success = t.select($el);
- });
- return success;
- },
- autocomplete: function autocomplete(el) {
- var success = false, $el = $(el);
- ttEach(this.first(), function(t) {
- success = t.autocomplete($el);
- });
- return success;
- },
- moveCursor: function moveCursoe(delta) {
- var success = false;
- ttEach(this.first(), function(t) {
- success = t.moveCursor(delta);
- });
- return success;
- },
- val: function val(newVal) {
- var query;
- if (!arguments.length) {
- ttEach(this.first(), function(t) {
- query = t.getVal();
- });
- return query;
- } else {
- ttEach(this, function(t) {
- t.setVal(_.toStr(newVal));
- });
- return this;
- }
- },
- destroy: function destroy() {
- ttEach(this, function(typeahead, $input) {
- revert($input);
- typeahead.destroy();
- });
- return this;
- }
- };
- $.fn.typeahead = function(method) {
- if (methods[method]) {
- return methods[method].apply(this, [].slice.call(arguments, 1));
- } else {
- return methods.initialize.apply(this, arguments);
- }
- };
- $.fn.typeahead.noConflict = function noConflict() {
- $.fn.typeahead = old;
- return this;
- };
- function ttEach($els, fn) {
- $els.each(function() {
- var $input = $(this), typeahead;
- (typeahead = $input.data(keys.typeahead)) && fn(typeahead, $input);
- });
- }
- function buildHintFromInput($input, www) {
- return $input.clone().addClass(www.classes.hint).removeData().css(www.css.hint).css(getBackgroundStyles($input)).prop({
- readonly: true,
- required: false
- }).removeAttr("id name placeholder").removeClass("required").attr({
- spellcheck: "false",
- tabindex: -1
- });
- }
- function prepInput($input, www) {
- $input.data(keys.attrs, {
- dir: $input.attr("dir"),
- autocomplete: $input.attr("autocomplete"),
- spellcheck: $input.attr("spellcheck"),
- style: $input.attr("style")
- });
- $input.addClass(www.classes.input).attr({
- spellcheck: false
- });
- try {
- !$input.attr("dir") && $input.attr("dir", "auto");
- } catch (e) {}
- return $input;
- }
- function getBackgroundStyles($el) {
- return {
- backgroundAttachment: $el.css("background-attachment"),
- backgroundClip: $el.css("background-clip"),
- backgroundColor: $el.css("background-color"),
- backgroundImage: $el.css("background-image"),
- backgroundOrigin: $el.css("background-origin"),
- backgroundPosition: $el.css("background-position"),
- backgroundRepeat: $el.css("background-repeat"),
- backgroundSize: $el.css("background-size")
- };
- }
- function revert($input) {
- var www, $wrapper;
- www = $input.data(keys.www);
- $wrapper = $input.parent().filter(www.selectors.wrapper);
- _.each($input.data(keys.attrs), function(val, key) {
- _.isUndefined(val) ? $input.removeAttr(key) : $input.attr(key, val);
- });
- $input.removeData(keys.typeahead).removeData(keys.www).removeData(keys.attr).removeClass(www.classes.input);
- if ($wrapper.length) {
- $input.detach().insertAfter($wrapper);
- $wrapper.remove();
- }
- }
- function $elOrNull(obj) {
- var isValid, $el;
- isValid = _.isJQuery(obj) || _.isElement(obj);
- $el = isValid ? $(obj).first() : [];
- return $el.length ? $el : null;
- }
- })();
-});
\ No newline at end of file
diff --git a/Carthage/Checkouts/BigInt/docs/search.json b/Carthage/Checkouts/BigInt/docs/search.json
deleted file mode 100644
index 6f79c6be5..000000000
--- a/Carthage/Checkouts/BigInt/docs/search.json
+++ /dev/null
@@ -1 +0,0 @@
-{"Structs/BigInt/Words.html#/s:Sl7IndicesQa":{"name":"Indices","parent_name":"Words"},"Structs/BigInt/Words.html#/s:Sl5countSivp":{"name":"count","parent_name":"Words"},"Structs/BigInt/Words.html#/s:Sk7indices7IndicesQzvp":{"name":"indices","parent_name":"Words"},"Structs/BigInt/Words.html#/s:Sl10startIndex0B0Qzvp":{"name":"startIndex","parent_name":"Words"},"Structs/BigInt/Words.html#/s:Sl8endIndex0B0Qzvp":{"name":"endIndex","parent_name":"Words"},"Structs/BigInt/Words.html#/s:Sly7ElementQz5IndexQzcip":{"name":"subscript(_:)","parent_name":"Words"},"Structs/BigInt/Sign.html#/s:6BigIntAAV4SignO4plusyA2DmF":{"name":"plus","abstract":"
Undocumented
","parent_name":"Sign"},"Structs/BigInt/Sign.html#/s:6BigIntAAV4SignO5minusyA2DmF":{"name":"minus","abstract":"
Undocumented
","parent_name":"Sign"},"Structs/BigInt/Sign.html":{"name":"Sign","abstract":"
Undocumented
","parent_name":"BigInt"},"Structs/BigInt.html#/s:Sj9MagnitudeQa":{"name":"Magnitude","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV4Worda":{"name":"Word","abstract":"
The type representing a digit in BigInt
‘s underlying number system.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:Sz8isSignedSbvpZ":{"name":"isSigned","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV9magnitudeAA0A4UIntVvp":{"name":"magnitude","abstract":"
The absolute value of this integer.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV4signAB4SignOvp":{"name":"sign","abstract":"
True iff the value of this integer is negative.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV4sign9magnitudeA2B4SignO_AA0A4UIntVtcfc":{"name":"init(sign:magnitude:)","abstract":"
Initializes a new big integer with the provided absolute number and sign flag.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV6isZeroSbvp":{"name":"isZero","abstract":"
Return true iff this integer is zero.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV6signumAByF":{"name":"signum()","abstract":"
Returns -1
if this value is negative and 1
if it’s positive; otherwise, 0
.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV1poiyA2B_ABtFZ":{"name":"+(_:_:)","abstract":"
Add a
to b
and return the result.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV2peoiyyABz_ABtFZ":{"name":"+=(_:_:)","abstract":"
Add b
to a
in place.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV1topyA2BFZ":{"name":"~(_:)","abstract":"
Undocumented
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV1aoiyA2Bz_ABtFZ":{"name":"&(_:_:)","abstract":"
Undocumented
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV1ooiyA2Bz_ABtFZ":{"name":"|(_:_:)","abstract":"
Undocumented
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV1xoiyA2Bz_ABtFZ":{"name":"^(_:_:)","abstract":"
Undocumented
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV2aeoiyyABz_ABtFZ":{"name":"&=(_:_:)","abstract":"
Undocumented
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV2oeoiyyABz_ABtFZ":{"name":"|=(_:_:)","abstract":"
Undocumented
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV2xeoiyyABz_ABtFZ":{"name":"^=(_:_:)","abstract":"
Undocumented
","parent_name":"BigInt"},"Structs/BigInt.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"BigInt"},"Structs/BigInt.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV2eeoiySbAB_ABtFZ":{"name":"==(_:_:)","abstract":"
Return true iff a
is equal to b
.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV1loiySbAB_ABtFZ":{"name":"<(_:_:)","abstract":"
Return true iff a
is less than b
.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAVyABSWcfc":{"name":"init(_:)","abstract":"
Initialize a BigInt from bytes accessed from an UnsafeRawBufferPointer,","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAVyAB10Foundation4DataVcfc":{"name":"init(_:)","abstract":"
Initializes an integer from the bits stored inside a piece of Data
.","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV9serialize10Foundation4DataVyF":{"name":"serialize()","abstract":"
Return a Data
value that contains the base-256 representation of this integer, in network (big-endian) byte order and a prepended byte to indicate the sign (0 for positive, 1 for negative)
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV20quotientAndRemainder10dividingByAB0C0_AB9remaindertAB_tF":{"name":"quotientAndRemainder(dividingBy:)","abstract":"
Divide this integer by y
and return the resulting quotient and remainder.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV1doiyA2B_ABtFZ":{"name":"/(_:_:)","abstract":"
Divide a
by b
and return the quotient. Traps if b
is zero.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV1roiyA2B_ABtFZ":{"name":"%(_:_:)","abstract":"
Divide a
by b
and return the remainder. The result has the same sign as a
.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV7modulusyA2BF":{"name":"modulus(_:)","abstract":"
Return the result of a
mod b
. The result is always a nonnegative integer that is less than the absolute value of b
.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV2deoiyyABz_ABtFZ":{"name":"/=(_:_:)","abstract":"
Divide a
by b
storing the quotient in a
.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV2reoiyyABz_ABtFZ":{"name":"%=(_:_:)","abstract":"
Divide a
by b
storing the remainder in a
.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV5poweryABSiF":{"name":"power(_:)","abstract":"
Returns this integer raised to the power exponent
.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV5power_7modulusA2B_ABtF":{"name":"power(_:modulus:)","abstract":"
Returns the remainder of this integer raised to the power exponent
in modulo arithmetic under modulus
.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:Sz7exactlyxSgqd___tcSBRd__lufc":{"name":"init(exactly:)","parent_name":"BigInt"},"Structs/BigInt.html#/s:Szyxqd__cSBRd__lufc":{"name":"init(_:)","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV21greatestCommonDivisor4withA2B_tF":{"name":"greatestCommonDivisor(with:)","abstract":"
Returns the greatest common divisor of a
and b
.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV7inverseyABSgABF":{"name":"inverse(_:)","abstract":"
Returns the multiplicative inverse of this integer in modulo modulus
arithmetic ,","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV4hash4intoys6HasherVz_tF":{"name":"hash(into:)","abstract":"
Append this BigInt
to the specified hasher.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAVABycfc":{"name":"init()","abstract":"
Undocumented
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAVyAbA0A4UIntVcfc":{"name":"init(_:)","abstract":"
Initializes a new signed big integer with the same value as the specified unsigned big integer.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:Szyxqd__cSzRd__lufc":{"name":"init(_:)","parent_name":"BigInt"},"Structs/BigInt.html#/s:Sj7exactlyxSgqd___tcSzRd__lufc":{"name":"init(exactly:)","parent_name":"BigInt"},"Structs/BigInt.html#/s:Sz8clampingxqd___tcSzRd__lufc":{"name":"init(clamping:)","parent_name":"BigInt"},"Structs/BigInt.html#/s:Sz18truncatingIfNeededxqd___tcSzRd__lufc":{"name":"init(truncatingIfNeeded:)","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV14integerLiteralABs5Int64V_tcfc":{"name":"init(integerLiteral:)","abstract":"
Initialize a new big integer from an integer literal.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV1moiyA2B_ABtFZ":{"name":"*(_:_:)","abstract":"
Multiply a
with b
and return the result.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV2meoiyyABz_ABtFZ":{"name":"*=(_:_:)","abstract":"
Multiply a
with b
in place.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV21isStrongProbablePrimeySbABF":{"name":"isStrongProbablePrime(_:)","abstract":"
Returns true iff this integer passes the strong probable prime test for the specified base.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV7isPrime6roundsSbSi_tF":{"name":"isPrime(rounds:)","abstract":"
Returns true if this integer is probably prime. Returns false if this integer is definitely not prime.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV3alloiyA2B_ABtFZ":{"name":"&<<(_:_:)","abstract":"
Undocumented
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV4alleoiyyABz_ABtFZ":{"name":"&<<=(_:_:)","abstract":"
Undocumented
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV3aggoiyA2B_ABtFZ":{"name":"&>>(_:_:)","abstract":"
Undocumented
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV4aggeoiyyABz_ABtFZ":{"name":"&>>=(_:_:)","abstract":"
Undocumented
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV2lloiyA2B_xtSzRzlFZ":{"name":"<<(_:_:)","abstract":"
Undocumented
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV3lleoiyyABz_xtSzRzlFZ":{"name":"<<=(_:_:)","abstract":"
Undocumented
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV2ggoiyA2B_xtSzRzlFZ":{"name":">>(_:_:)","abstract":"
Undocumented
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV3ggeoiyyABz_xtSzRzlFZ":{"name":">>=(_:_:)","abstract":"
Undocumented
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV10squareRootAByF":{"name":"squareRoot()","abstract":"
Returns the integer square root of a big integer; i.e., the largest integer whose square isn’t greater than value
.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:Sx6StrideQa":{"name":"Stride","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV8advanced2byA2B_tF":{"name":"advanced(by:)","abstract":"
Returns self + n
.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV8distance2toA2B_tF":{"name":"distance(to:)","abstract":"
Returns other - self
.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV_5radixABSgx_SitcSyRzlufc":{"name":"init(_:radix:)","abstract":"
Initialize a big integer from an ASCII representation in a given radix. Numerals above 9
are represented by","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV20unicodeScalarLiteralABs7UnicodeO0D0V_tcfc":{"name":"init(unicodeScalarLiteral:)","abstract":"
Initialize a new big integer from a Unicode scalar.","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV30extendedGraphemeClusterLiteralABSS_tcfc":{"name":"init(extendedGraphemeClusterLiteral:)","abstract":"
Initialize a new big integer from an extended grapheme cluster.","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV13stringLiteralABSS_tcfc":{"name":"init(stringLiteral:)","abstract":"
Initialize a new big integer from a decimal number represented by a string literal of arbitrary length.","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV11descriptionSSvp":{"name":"description","abstract":"
Return the decimal representation of this integer.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV21playgroundDescriptionypvp":{"name":"playgroundDescription","abstract":"
Return the playground quick look representation of this integer.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV6negateyyF":{"name":"negate()","abstract":"
Undocumented
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV1soiyA2B_ABtFZ":{"name":"-(_:_:)","abstract":"
Subtract b
from a
and return the result.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV2seoiyyABz_ABtFZ":{"name":"-=(_:_:)","abstract":"
Subtract b
from a
in place.
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV8bitWidthSivp":{"name":"bitWidth","abstract":"
Undocumented
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV20trailingZeroBitCountSivp":{"name":"trailingZeroBitCount","abstract":"
Undocumented
","parent_name":"BigInt"},"Structs/BigInt/Words.html":{"name":"Words","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV5wordsAB5WordsVvp":{"name":"words","abstract":"
Undocumented
","parent_name":"BigInt"},"Structs/BigInt.html#/s:6BigIntAAV5wordsABx_tcSTRzSu7ElementRtzlufc":{"name":"init(words:)","abstract":"
Undocumented
","parent_name":"BigInt"},"Structs/BigUInt/Words.html#/s:Sl10startIndex0B0Qzvp":{"name":"startIndex","parent_name":"Words"},"Structs/BigUInt/Words.html#/s:Sl8endIndex0B0Qzvp":{"name":"endIndex","parent_name":"Words"},"Structs/BigUInt/Words.html#/s:Sly7ElementQz5IndexQzcip":{"name":"subscript(_:)","parent_name":"Words"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV4Worda":{"name":"Word","abstract":"
The type representing a digit in BigUInt
‘s underlying number system.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntVACycfc":{"name":"init()","abstract":"
Initializes a new BigUInt with value 0.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV5wordsACSaySuG_tcfc":{"name":"init(words:)","abstract":"
Initializes a new BigUInt with the specified digits. The digits are ordered from least to most significant.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV1poiyA2C_ACtFZ":{"name":"+(_:_:)","abstract":"
Add a
and b
together and return the result.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV2peoiyyACz_ACtFZ":{"name":"+=(_:_:)","abstract":"
Add a
and b
together, and store the sum in a
.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:Sz8isSignedSbvpZ":{"name":"isSigned","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV6signumACyF":{"name":"signum()","abstract":"
Returns 1
if this value is, positive; otherwise, 0
.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV1topyA2CFZ":{"name":"~(_:)","abstract":"
Return the ones’ complement of a
.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV2oeoiyyACz_ACtFZ":{"name":"|=(_:_:)","abstract":"
Calculate the bitwise OR of a
and b
, and store the result in a
.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV2aeoiyyACz_ACtFZ":{"name":"&=(_:_:)","abstract":"
Calculate the bitwise AND of a
and b
and return the result.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV2xeoiyyACz_ACtFZ":{"name":"^=(_:_:)","abstract":"
Calculate the bitwise XOR of a
and b
and return the result.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV7compareySo18NSComparisonResultVAC_ACtFZ":{"name":"compare(_:_:)","abstract":"
Compare a
to b
and return an NSComparisonResult
indicating their order.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV2eeoiySbAC_ACtFZ":{"name":"==(_:_:)","abstract":"
Return true iff a
is equal to b
.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV1loiySbAC_ACtFZ":{"name":"<(_:_:)","abstract":"
Return true iff a
is less than b
.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntVyACSWcfc":{"name":"init(_:)","abstract":"
Initialize a BigInt from bytes accessed from an UnsafeRawBufferPointer
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntVyAC10Foundation4DataVcfc":{"name":"init(_:)","abstract":"
Initializes an integer from the bits stored inside a piece of Data
.","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV9serialize10Foundation4DataVyF":{"name":"serialize()","abstract":"
Return a Data
value that contains the base-256 representation of this integer, in network (big-endian) byte order.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV20quotientAndRemainder10dividingByAC0D0_AC9remaindertAC_tF":{"name":"quotientAndRemainder(dividingBy:)","abstract":"
Divide this integer by y
and return the resulting quotient and remainder.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV1doiyA2C_ACtFZ":{"name":"/(_:_:)","abstract":"
Divide x
by y
and return the quotient.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV1roiyA2C_ACtFZ":{"name":"%(_:_:)","abstract":"
Divide x
by y
and return the remainder.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV2deoiyyACz_ACtFZ":{"name":"/=(_:_:)","abstract":"
Divide x
by y
and store the quotient in x
.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV2reoiyyACz_ACtFZ":{"name":"%=(_:_:)","abstract":"
Divide x
by y
and store the remainder in x
.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV5poweryACSiF":{"name":"power(_:)","abstract":"
Returns this integer raised to the power exponent
.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV5power_7modulusA2C_ACtF":{"name":"power(_:modulus:)","abstract":"
Returns the remainder of this integer raised to the power exponent
in modulo arithmetic under modulus
.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:Sz7exactlyxSgqd___tcSBRd__lufc":{"name":"init(exactly:)","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:Szyxqd__cSBRd__lufc":{"name":"init(_:)","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV21greatestCommonDivisor4withA2C_tF":{"name":"greatestCommonDivisor(with:)","abstract":"
Returns the greatest common divisor of self
and b
.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV7inverseyACSgACF":{"name":"inverse(_:)","abstract":"
Returns the multiplicative inverse of this integer in modulo modulus
arithmetic ,","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV4hash4intoys6HasherVz_tF":{"name":"hash(into:)","abstract":"
Append this BigUInt
to the specified hasher.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:Sj7exactlyxSgqd___tcSzRd__lufc":{"name":"init(exactly:)","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:Szyxqd__cSzRd__lufc":{"name":"init(_:)","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:Sz18truncatingIfNeededxqd___tcSzRd__lufc":{"name":"init(truncatingIfNeeded:)","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:Sz8clampingxqd___tcSzRd__lufc":{"name":"init(clamping:)","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV14integerLiteralACs6UInt64V_tcfc":{"name":"init(integerLiteral:)","abstract":"
Initialize a new big integer from an integer literal.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV8multiply6byWordySu_tF":{"name":"multiply(byWord:)","abstract":"
Multiply this big integer by a single word, and store the result in place of the original big integer.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV10multiplied6byWordACSu_tF":{"name":"multiplied(byWord:)","abstract":"
Multiply this big integer by a single Word, and return the result.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV14multiplyAndAdd__9shiftedByyAC_SuSitF":{"name":"multiplyAndAdd(_:_:shiftedBy:)","abstract":"
Multiply x
by y
, and add the result to this integer, optionally shifted shift
words to the left.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV10multiplied2byA2C_tF":{"name":"multiplied(by:)","abstract":"
Multiply this integer by y
and return the result.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV25directMultiplicationLimitSivpZ":{"name":"directMultiplicationLimit","abstract":"
Multiplication switches to an asymptotically better recursive algorithm when arguments have more words than this limit.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV1moiyA2C_ACtFZ":{"name":"*(_:_:)","abstract":"
Multiply a
by b
and return the result.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV2meoiyyACz_ACtFZ":{"name":"*=(_:_:)","abstract":"
Multiply a
by b
and store the result in a
.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV21isStrongProbablePrimeySbACF":{"name":"isStrongProbablePrime(_:)","abstract":"
Returns true iff this integer passes the strong probable prime test for the specified base.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV7isPrime6roundsSbSi_tF":{"name":"isPrime(rounds:)","abstract":"
Returns true if this integer is probably prime. Returns false if this integer is definitely not prime.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV13randomInteger16withMaximumWidth5usingACSi_xztSGRzlFZ":{"name":"randomInteger(withMaximumWidth:using:)","abstract":"
Create a big unsigned integer consisting of width
uniformly distributed random bits.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV13randomInteger16withMaximumWidthACSi_tFZ":{"name":"randomInteger(withMaximumWidth:)","abstract":"
Create a big unsigned integer consisting of width
uniformly distributed random bits.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV13randomInteger14withExactWidth5usingACSi_xztSGRzlFZ":{"name":"randomInteger(withExactWidth:using:)","abstract":"
Create a big unsigned integer consisting of width-1
uniformly distributed random bits followed by a one bit.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV13randomInteger14withExactWidthACSi_tFZ":{"name":"randomInteger(withExactWidth:)","abstract":"
Create a big unsigned integer consisting of width-1
uniformly distributed random bits followed by a one bit.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV13randomInteger8lessThan5usingA2C_xztSGRzlFZ":{"name":"randomInteger(lessThan:using:)","abstract":"
Create a uniformly distributed random unsigned integer that’s less than the specified limit.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV13randomInteger8lessThanA2C_tFZ":{"name":"randomInteger(lessThan:)","abstract":"
Create a uniformly distributed random unsigned integer that’s less than the specified limit.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV3ggeoiyyACz_xtSzRzlFZ":{"name":">>=(_:_:)","abstract":"
Undocumented
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV3lleoiyyACz_xtSzRzlFZ":{"name":"<<=(_:_:)","abstract":"
Undocumented
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV2ggoiyA2C_xtSzRzlFZ":{"name":">>(_:_:)","abstract":"
Undocumented
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV2lloiyA2C_xtSzRzlFZ":{"name":"<<(_:_:)","abstract":"
Undocumented
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV10squareRootACyF":{"name":"squareRoot()","abstract":"
Returns the integer square root of a big integer; i.e., the largest integer whose square isn’t greater than value
.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV6Stridea":{"name":"Stride","abstract":"
A type that can represent the distance between two values ofa BigUInt
.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV8advanced2byAc2AV_tF":{"name":"advanced(by:)","abstract":"
Adds n
to self
and returns the result. Traps if the result would be less than zero.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV8distance2toA2AVAC_tF":{"name":"distance(to:)","abstract":"
Returns the (potentially negative) difference between self
and other
as a BigInt
. Never traps.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV_5radixACSgx_SitcSyRzlufc":{"name":"init(_:radix:)","abstract":"
Initialize a big integer from an ASCII representation in a given radix. Numerals above 9
are represented by","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV20unicodeScalarLiteralACs7UnicodeO0E0V_tcfc":{"name":"init(unicodeScalarLiteral:)","abstract":"
Initialize a new big integer from a Unicode scalar.","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV30extendedGraphemeClusterLiteralACSS_tcfc":{"name":"init(extendedGraphemeClusterLiteral:)","abstract":"
Initialize a new big integer from an extended grapheme cluster.","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV13stringLiteralACSS_tcfc":{"name":"init(stringLiteral:)","abstract":"
Initialize a new big integer from a decimal number represented by a string literal of arbitrary length.","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV11descriptionSSvp":{"name":"description","abstract":"
Return the decimal representation of this integer.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV21playgroundDescriptionypvp":{"name":"playgroundDescription","abstract":"
Return the playground quick look representation of this integer.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV25subtractReportingOverflow_9shiftedBySbAC_SitF":{"name":"subtractReportingOverflow(_:shiftedBy:)","abstract":"
Subtract other
from this integer in place, and return a flag indicating if the operation caused an","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV28subtractingReportingOverflow_9shiftedByAC12partialValue_Sb8overflowtAC_SitF":{"name":"subtractingReportingOverflow(_:shiftedBy:)","abstract":"
Subtract other
from this integer, returning the difference and a flag indicating arithmetic overflow.","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV28subtractingReportingOverflowyAC12partialValue_Sb8overflowtACF":{"name":"subtractingReportingOverflow(_:)","abstract":"
Subtracts other
from self
, returning the result and a flag indicating arithmetic overflow.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV8subtract_9shiftedByyAC_SitF":{"name":"subtract(_:shiftedBy:)","abstract":"
Subtract other
from this integer in place.","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV11subtracting_9shiftedByA2C_SitF":{"name":"subtracting(_:shiftedBy:)","abstract":"
Subtract b
from this integer, and return the difference.","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV9decrement9shiftedByySi_tF":{"name":"decrement(shiftedBy:)","abstract":"
Decrement this integer by one.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV1soiyA2C_ACtFZ":{"name":"-(_:_:)","abstract":"
Subtract b
from a
and return the result.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV2seoiyyACz_ACtFZ":{"name":"-=(_:_:)","abstract":"
Subtract b
from a
and store the result in a
.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV5bitAtSbSi_tcip":{"name":"subscript(bitAt:)","abstract":"
Undocumented
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV8bitWidthSivp":{"name":"bitWidth","abstract":"
The minimum number of bits required to represent this integer in binary.
","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV19leadingZeroBitCountSivp":{"name":"leadingZeroBitCount","abstract":"
The number of leading zero bits in the binary representation of this integer in base 2^(Word.bitWidth)
.","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV20trailingZeroBitCountSivp":{"name":"trailingZeroBitCount","abstract":"
The number of trailing zero bits in the binary representation of this integer.
","parent_name":"BigUInt"},"Structs/BigUInt/Words.html":{"name":"Words","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:Sz5words5WordsQzvp":{"name":"words","parent_name":"BigUInt"},"Structs/BigUInt.html#/s:6BigInt0A4UIntV5wordsACx_tcSTRzSu7ElementRtzlufc":{"name":"init(words:)","abstract":"
Undocumented
","parent_name":"BigUInt"},"Structs/BigUInt.html":{"name":"BigUInt","abstract":"
An arbitary precision unsigned integer type, also known as a “big integer”.
"},"Structs/BigInt.html":{"name":"BigInt","abstract":"
An arbitary precision signed integer type, also known as a “big integer”.
"},"Extensions/String.html#/s:SS6BigIntEySSAA0A4UIntVcfc":{"name":"init(_:)","abstract":"
Initialize a new string with the base-10 representation of an unsigned big integer.
","parent_name":"String"},"Extensions/String.html#/s:SS6BigIntE_5radix9uppercaseSSAA0A4UIntV_SiSbtcfc":{"name":"init(_:radix:uppercase:)","abstract":"
Initialize a new string representing an unsigned big integer in the given radix (base).
","parent_name":"String"},"Extensions/String.html#/s:SS6BigIntE_5radix9uppercaseSSA2AV_SiSbtcfc":{"name":"init(_:radix:uppercase:)","abstract":"
Initialize a new string representing a signed big integer in the given radix (base).
","parent_name":"String"},"Extensions/BinaryFloatingPoint.html#/s:SB6BigInts17FixedWidthInteger11RawExponentRpzsAB0F11SignificandRpzrlEyxA2AVcfc":{"name":"init(_:)","abstract":"
Undocumented
","parent_name":"BinaryFloatingPoint"},"Extensions/BinaryFloatingPoint.html#/s:SB6BigInts17FixedWidthInteger11RawExponentRpzsAB0F11SignificandRpzrlEyxAA0A4UIntVcfc":{"name":"init(_:)","abstract":"
Undocumented
","parent_name":"BinaryFloatingPoint"},"Extensions/BinaryFloatingPoint.html":{"name":"BinaryFloatingPoint"},"Extensions/String.html":{"name":"String"},"Extensions.html":{"name":"Extensions","abstract":"
The following extensions are available globally.
"},"Structs.html":{"name":"Structures","abstract":"
The following structures are available globally.
"}}
\ No newline at end of file
diff --git a/Carthage/Checkouts/BigInt/docs/undocumented.json b/Carthage/Checkouts/BigInt/docs/undocumented.json
deleted file mode 100644
index 424f92a4e..000000000
--- a/Carthage/Checkouts/BigInt/docs/undocumented.json
+++ /dev/null
@@ -1,229 +0,0 @@
-{
- "warnings": [
- {
- "file": "/Users/tim/Developer/BigInt/Sources/BigInt.swift",
- "line": 30,
- "symbol": "BigInt.Sign",
- "symbol_kind": "source.lang.swift.decl.enum",
- "warning": "undocumented"
- },
- {
- "file": "/Users/tim/Developer/BigInt/Sources/BigInt.swift",
- "line": 31,
- "symbol": "BigInt.Sign.plus",
- "symbol_kind": "source.lang.swift.decl.enumelement",
- "warning": "undocumented"
- },
- {
- "file": "/Users/tim/Developer/BigInt/Sources/BigInt.swift",
- "line": 32,
- "symbol": "BigInt.Sign.minus",
- "symbol_kind": "source.lang.swift.decl.enumelement",
- "warning": "undocumented"
- },
- {
- "file": "/Users/tim/Developer/BigInt/Sources/Bitwise Ops.swift",
- "line": 50,
- "symbol": "BigInt.~(_:)",
- "symbol_kind": "source.lang.swift.decl.function.method.static",
- "warning": "undocumented"
- },
- {
- "file": "/Users/tim/Developer/BigInt/Sources/Bitwise Ops.swift",
- "line": 59,
- "symbol": "BigInt.&(_:_:)",
- "symbol_kind": "source.lang.swift.decl.function.method.static",
- "warning": "undocumented"
- },
- {
- "file": "/Users/tim/Developer/BigInt/Sources/Bitwise Ops.swift",
- "line": 76,
- "symbol": "BigInt.|(_:_:)",
- "symbol_kind": "source.lang.swift.decl.function.method.static",
- "warning": "undocumented"
- },
- {
- "file": "/Users/tim/Developer/BigInt/Sources/Bitwise Ops.swift",
- "line": 93,
- "symbol": "BigInt.^(_:_:)",
- "symbol_kind": "source.lang.swift.decl.function.method.static",
- "warning": "undocumented"
- },
- {
- "file": "/Users/tim/Developer/BigInt/Sources/Bitwise Ops.swift",
- "line": 110,
- "symbol": "BigInt.&=(_:_:)",
- "symbol_kind": "source.lang.swift.decl.function.method.static",
- "warning": "undocumented"
- },
- {
- "file": "/Users/tim/Developer/BigInt/Sources/Bitwise Ops.swift",
- "line": 114,
- "symbol": "BigInt.|=(_:_:)",
- "symbol_kind": "source.lang.swift.decl.function.method.static",
- "warning": "undocumented"
- },
- {
- "file": "/Users/tim/Developer/BigInt/Sources/Bitwise Ops.swift",
- "line": 118,
- "symbol": "BigInt.^=(_:_:)",
- "symbol_kind": "source.lang.swift.decl.function.method.static",
- "warning": "undocumented"
- },
- {
- "file": "/Users/tim/Developer/BigInt/Sources/Floating Point Conversion.swift",
- "line": 45,
- "symbol": "BinaryFloatingPoint.init(_:)",
- "symbol_kind": "source.lang.swift.decl.function.method.instance",
- "warning": "undocumented"
- },
- {
- "file": "/Users/tim/Developer/BigInt/Sources/Floating Point Conversion.swift",
- "line": 70,
- "symbol": "BinaryFloatingPoint.init(_:)",
- "symbol_kind": "source.lang.swift.decl.function.method.instance",
- "warning": "undocumented"
- },
- {
- "file": "/Users/tim/Developer/BigInt/Sources/Integer Conversion.swift",
- "line": 42,
- "symbol": "BigInt.init()",
- "symbol_kind": "source.lang.swift.decl.function.method.instance",
- "warning": "undocumented"
- },
- {
- "file": "/Users/tim/Developer/BigInt/Sources/Shifts.swift",
- "line": 109,
- "symbol": "BigUInt.>>=(_:_:)",
- "symbol_kind": "source.lang.swift.decl.function.method.static",
- "warning": "undocumented"
- },
- {
- "file": "/Users/tim/Developer/BigInt/Sources/Shifts.swift",
- "line": 121,
- "symbol": "BigUInt.<<=(_:_:)",
- "symbol_kind": "source.lang.swift.decl.function.method.static",
- "warning": "undocumented"
- },
- {
- "file": "/Users/tim/Developer/BigInt/Sources/Shifts.swift",
- "line": 129,
- "symbol": "BigUInt.>>(_:_:)",
- "symbol_kind": "source.lang.swift.decl.function.method.static",
- "warning": "undocumented"
- },
- {
- "file": "/Users/tim/Developer/BigInt/Sources/Shifts.swift",
- "line": 139,
- "symbol": "BigUInt.<<(_:_:)",
- "symbol_kind": "source.lang.swift.decl.function.method.static",
- "warning": "undocumented"
- },
- {
- "file": "/Users/tim/Developer/BigInt/Sources/Shifts.swift",
- "line": 168,
- "symbol": "BigInt.&<<(_:_:)",
- "symbol_kind": "source.lang.swift.decl.function.method.static",
- "warning": "undocumented"
- },
- {
- "file": "/Users/tim/Developer/BigInt/Sources/Shifts.swift",
- "line": 172,
- "symbol": "BigInt.&<<=(_:_:)",
- "symbol_kind": "source.lang.swift.decl.function.method.static",
- "warning": "undocumented"
- },
- {
- "file": "/Users/tim/Developer/BigInt/Sources/Shifts.swift",
- "line": 176,
- "symbol": "BigInt.&>>(_:_:)",
- "symbol_kind": "source.lang.swift.decl.function.method.static",
- "warning": "undocumented"
- },
- {
- "file": "/Users/tim/Developer/BigInt/Sources/Shifts.swift",
- "line": 180,
- "symbol": "BigInt.&>>=(_:_:)",
- "symbol_kind": "source.lang.swift.decl.function.method.static",
- "warning": "undocumented"
- },
- {
- "file": "/Users/tim/Developer/BigInt/Sources/Shifts.swift",
- "line": 184,
- "symbol": "BigInt.<<(_:_:)",
- "symbol_kind": "source.lang.swift.decl.function.method.static",
- "warning": "undocumented"
- },
- {
- "file": "/Users/tim/Developer/BigInt/Sources/Shifts.swift",
- "line": 189,
- "symbol": "BigInt.<<=(_:_:)",
- "symbol_kind": "source.lang.swift.decl.function.method.static",
- "warning": "undocumented"
- },
- {
- "file": "/Users/tim/Developer/BigInt/Sources/Shifts.swift",
- "line": 198,
- "symbol": "BigInt.>>(_:_:)",
- "symbol_kind": "source.lang.swift.decl.function.method.static",
- "warning": "undocumented"
- },
- {
- "file": "/Users/tim/Developer/BigInt/Sources/Shifts.swift",
- "line": 203,
- "symbol": "BigInt.>>=(_:_:)",
- "symbol_kind": "source.lang.swift.decl.function.method.static",
- "warning": "undocumented"
- },
- {
- "file": "/Users/tim/Developer/BigInt/Sources/Subtraction.swift",
- "line": 157,
- "symbol": "BigInt.negate()",
- "symbol_kind": "source.lang.swift.decl.function.method.instance",
- "warning": "undocumented"
- },
- {
- "file": "/Users/tim/Developer/BigInt/Sources/Words and Bits.swift",
- "line": 24,
- "symbol": "BigUInt.subscript(bitAt:)",
- "symbol_kind": "source.lang.swift.decl.function.subscript",
- "warning": "undocumented"
- },
- {
- "file": "/Users/tim/Developer/BigInt/Sources/Words and Bits.swift",
- "line": 78,
- "symbol": "BigInt.bitWidth",
- "symbol_kind": "source.lang.swift.decl.var.instance",
- "warning": "undocumented"
- },
- {
- "file": "/Users/tim/Developer/BigInt/Sources/Words and Bits.swift",
- "line": 83,
- "symbol": "BigInt.trailingZeroBitCount",
- "symbol_kind": "source.lang.swift.decl.var.instance",
- "warning": "undocumented"
- },
- {
- "file": "/Users/tim/Developer/BigInt/Sources/Words and Bits.swift",
- "line": 105,
- "symbol": "BigUInt.init(words:)",
- "symbol_kind": "source.lang.swift.decl.function.method.instance",
- "warning": "undocumented"
- },
- {
- "file": "/Users/tim/Developer/BigInt/Sources/Words and Bits.swift",
- "line": 188,
- "symbol": "BigInt.words",
- "symbol_kind": "source.lang.swift.decl.var.instance",
- "warning": "undocumented"
- },
- {
- "file": "/Users/tim/Developer/BigInt/Sources/Words and Bits.swift",
- "line": 192,
- "symbol": "BigInt.init(words:)",
- "symbol_kind": "source.lang.swift.decl.function.method.instance",
- "warning": "undocumented"
- }
- ],
- "source_directory": "/Users/tim/Developer/BigInt"
-}
\ No newline at end of file
diff --git a/Carthage/Checkouts/BigInt/generate-docs.sh b/Carthage/Checkouts/BigInt/generate-docs.sh
deleted file mode 100755
index 3682a5273..000000000
--- a/Carthage/Checkouts/BigInt/generate-docs.sh
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/sh
-
-set -e
-
-module="BigInt"
-workspace="BigInt.xcworkspace"
-scheme="BigInt-macOS"
-
-version="$(grep VERSION_STRING version.xcconfig | sed 's/^VERSION_STRING = //' | sed 's/ *$//')"
-today="$(date '+%Y-%m-%d')"
-
-if git rev-parse "v$version" >/dev/null 2>&1; then
- # Use the tagged commit when we have one
- ref="v$version"
-else
- # Otherwise, use the current commit.
- ref="$(git rev-parse HEAD)"
-fi
-
-jazzy \
- --clean \
- --author "Károly Lőrentey" \
- --author_url "https://twitter.com/lorentey" \
- --github_url "https://github.com/attaswift/$module" \
- --github-file-prefix "https://github.com/attaswift/$module/tree/$ref" \
- --module-version "$version" \
- --copyright "© 2016 [Károly Lőrentey](https://twitter.com/lorentey). (Last updated: $today)" \
- --xcodebuild-arguments "-workspace,$workspace,-scheme,$scheme" \
- --module "$module" \
- --root-url "https://attaswift.github.io/$module/reference/" \
- --theme fullwidth \
- --output docs
diff --git a/Carthage/Checkouts/BigInt/images/BigInt.sketch b/Carthage/Checkouts/BigInt/images/BigInt.sketch
deleted file mode 100644
index a74eb9b7e..000000000
Binary files a/Carthage/Checkouts/BigInt/images/BigInt.sketch and /dev/null differ
diff --git a/Carthage/Checkouts/BigInt/images/banner.png b/Carthage/Checkouts/BigInt/images/banner.png
deleted file mode 100644
index d0410a45f..000000000
Binary files a/Carthage/Checkouts/BigInt/images/banner.png and /dev/null differ
diff --git a/Carthage/Checkouts/BigInt/version.xcconfig b/Carthage/Checkouts/BigInt/version.xcconfig
deleted file mode 100644
index 934ed2105..000000000
--- a/Carthage/Checkouts/BigInt/version.xcconfig
+++ /dev/null
@@ -1,13 +0,0 @@
-// Increment the build number whenever you modify the version string.
-VERSION_STRING = 5.3.0
-BUILD_NUMBER = 18
-
-PROJECT_NAME = BigInt
-BUNDLE_IDENTIFIER_BASE = org.attaswift.$(PROJECT_NAME)
-
-IPHONEOS_DEPLOYMENT_TARGET = 8.0
-MACOSX_DEPLOYMENT_TARGET = 10.9
-WATCHOS_DEPLOYMENT_TARGET = 2.0
-TVOS_DEPLOYMENT_TARGET = 9.0
-
-APPLICATION_EXTENSION_API_ONLY = YES
diff --git a/Carthage/Checkouts/CryptoSwift/.github/CODEOWNERS b/Carthage/Checkouts/CryptoSwift/.github/CODEOWNERS
deleted file mode 100644
index 2904e51a2..000000000
--- a/Carthage/Checkouts/CryptoSwift/.github/CODEOWNERS
+++ /dev/null
@@ -1 +0,0 @@
-* @krzyzanowskim
diff --git a/Carthage/Checkouts/CryptoSwift/.github/FUNDING.yml b/Carthage/Checkouts/CryptoSwift/.github/FUNDING.yml
deleted file mode 100644
index 2d35203b5..000000000
--- a/Carthage/Checkouts/CryptoSwift/.github/FUNDING.yml
+++ /dev/null
@@ -1 +0,0 @@
-github: [krzyzanowskim]
diff --git a/Carthage/Checkouts/CryptoSwift/.github/ISSUE_TEMPLATE/bug_report.md b/Carthage/Checkouts/CryptoSwift/.github/ISSUE_TEMPLATE/bug_report.md
deleted file mode 100644
index c53722084..000000000
--- a/Carthage/Checkouts/CryptoSwift/.github/ISSUE_TEMPLATE/bug_report.md
+++ /dev/null
@@ -1,12 +0,0 @@
----
-name: Bug report
-about: Create a report to help us improve
-
----
-
-**Describe the bug**
-
-
-**Reproduce**
-Steps to reproduce:
-1.
diff --git a/Carthage/Checkouts/CryptoSwift/.github/PULL_REQUEST_TEMPLATE.md b/Carthage/Checkouts/CryptoSwift/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index 8d172fd9c..000000000
--- a/Carthage/Checkouts/CryptoSwift/.github/PULL_REQUEST_TEMPLATE.md
+++ /dev/null
@@ -1,9 +0,0 @@
-Fixes #
-
-Checklist:
-- [ ] Correct file headers (see CONTRIBUTING.md).
-- [ ] Formatted with [SwiftFormat](https://github.com/nicklockwood/SwiftFormat).
-- [ ] Tests added.
-
-Changes proposed in this pull request:
--
diff --git a/Carthage/Checkouts/CryptoSwift/.github/workflows/linux.yml b/Carthage/Checkouts/CryptoSwift/.github/workflows/linux.yml
deleted file mode 100644
index 7b8386682..000000000
--- a/Carthage/Checkouts/CryptoSwift/.github/workflows/linux.yml
+++ /dev/null
@@ -1,21 +0,0 @@
-name: Linux
-
-on:
- push:
- branches: [ master ]
- pull_request:
- branches: [ master ]
-
-jobs:
- build:
-
- runs-on: ubuntu-20.04
-
- steps:
- - uses: actions/checkout@v2
-
- - name: Swift Package Build
- run: swift build -v
-
- - name: Run tests
- run: swift test -c release -Xswiftc -enable-testing -Xswiftc -DCI -Xswiftc -Xfrontend -Xswiftc -solver-memory-threshold -Xswiftc -Xfrontend -Xswiftc 999999999
diff --git a/Carthage/Checkouts/CryptoSwift/.github/workflows/macos.yml b/Carthage/Checkouts/CryptoSwift/.github/workflows/macos.yml
deleted file mode 100644
index dff79ff77..000000000
--- a/Carthage/Checkouts/CryptoSwift/.github/workflows/macos.yml
+++ /dev/null
@@ -1,24 +0,0 @@
-name: macOS
-
-on:
- push:
- branches: [ master ]
- pull_request:
- branches: [ master ]
-
-env:
- DEVELOPER_DIR: /Applications/Xcode_12.2.app/Contents/Developer
-
-jobs:
- build:
-
- runs-on: macos-latest
-
- steps:
- - uses: actions/checkout@v2
-
- - name: Swift Package Build
- run: swift build -v
-
- - name: Run tests
- run: swift test -c release -Xswiftc -enable-testing -Xswiftc -DCI -Xswiftc -Xfrontend -Xswiftc -solver-memory-threshold -Xswiftc -Xfrontend -Xswiftc 999999999
diff --git a/Carthage/Checkouts/CryptoSwift/.gitignore b/Carthage/Checkouts/CryptoSwift/.gitignore
deleted file mode 100644
index fd97c263d..000000000
--- a/Carthage/Checkouts/CryptoSwift/.gitignore
+++ /dev/null
@@ -1,25 +0,0 @@
-### Xcode ###
-.build/
-build/
-*.pbxuser
-!default.pbxuser
-*.mode1v3
-!default.mode1v3
-*.mode2v3
-!default.mode2v3
-*.perspectivev3
-!default.perspectivev3
-xcuserdata
-*.xccheckout
-*.moved-aside
-DerivedData
-*.xcuserstate
-timeline.xctimeline
-.swiftpm/xcode
-
-/Framework
-.DS_Store
-Carthage/Build
-
-.idea
-.vscode
diff --git a/Carthage/Checkouts/CryptoSwift/.mailmap b/Carthage/Checkouts/CryptoSwift/.mailmap
deleted file mode 100644
index 61779d2da..000000000
--- a/Carthage/Checkouts/CryptoSwift/.mailmap
+++ /dev/null
@@ -1,5 +0,0 @@
-Marcin Krzyzanowski
<758033+krzyzanowskim@users.noreply.github.com>
-Marcin Krzyzanowski
-Marcin Krzyzanowski
-Marcin Krzyzanowski
-Luis Reisewitz
\ No newline at end of file
diff --git a/Carthage/Checkouts/CryptoSwift/.swiftformat b/Carthage/Checkouts/CryptoSwift/.swiftformat
deleted file mode 100644
index 19f0f78bf..000000000
--- a/Carthage/Checkouts/CryptoSwift/.swiftformat
+++ /dev/null
@@ -1,36 +0,0 @@
-
---exclude .build, Carthage, DerivedData, .git, Tests/LinuxMain.swift, Tests/CryptoSwiftTests/XCTestManifests.swift, Tests/TestsPerformance/XCTestManifests.swift
-
---swiftversion 5.0
---allman false
---commas always
---comments indent
---elseposition same-line
---empty void
---exponentcase lowercase
---exponentgrouping disabled
---fractiongrouping disabled
---header ignore
---octalgrouping 4,8
---decimalgrouping 3,6
---binarygrouping 4,8
---hexgrouping ignore
---hexliteralcase lowercase
---ifdef indent
---indent 2
---indentcase true
---importgrouping testable-bottom
---linebreaks lf
---operatorfunc spaced
---patternlet inline
---ranges no-space
---self insert
---semicolons inline
---stripunusedargs closure-only
---trimwhitespace always
---wraparguments preserve
---wrapcollections before-first
-
-# rules
-
---rules indent, braces, isEmpty, redundantBreak, blankLinesAroundMark, blankLinesAtEndOfScope, blankLinesBetweenScopes, consecutiveBlankLines, consecutiveSpaces, duplicateImports, elseOnSameLine, leadingDelimiters, redundantBreak, redundantExtensionACL, redundantFileprivate, redundantGet, redundantInit, redundantLet, redundantNilInit, redundantObjc, redundantParens, redundantPattern, redundantRawValues, redundantReturn, redundantSelf, redundantVoidReturnType, semicolons, sortedImports, spaceAroundBraces, spaceAroundBrackets, spaceAroundComments, spaceAroundGenerics, spaceAroundOperators, spaceAroundParens, spaceInsideBraces, spaceInsideBrackets, specifiers, strongOutlets, strongifiedSelf, todos, void, wrapArguments, yodaConditions, trailingSpace
\ No newline at end of file
diff --git a/Carthage/Checkouts/CryptoSwift/.travis.yml b/Carthage/Checkouts/CryptoSwift/.travis.yml
deleted file mode 100644
index 3e6127b23..000000000
--- a/Carthage/Checkouts/CryptoSwift/.travis.yml
+++ /dev/null
@@ -1,13 +0,0 @@
-language: generic
-matrix:
- include:
- # Test Ubuntu Linux 14.04
- - os: linux
- dist: trusty
- sudo: required
- - os: osx
- osx_image: xcode11.4
-install:
- - eval "$(curl -sL https://swiftenv.fuller.li/install.sh)"
-script:
- - swift test -c release -Xswiftc -enable-testing -Xswiftc -DCI -Xswiftc -Xfrontend -Xswiftc -solver-memory-threshold -Xswiftc -Xfrontend -Xswiftc 999999999
diff --git a/Carthage/Checkouts/CryptoSwift/CHANGELOG b/Carthage/Checkouts/CryptoSwift/CHANGELOG
deleted file mode 100644
index 2ea9da25e..000000000
--- a/Carthage/Checkouts/CryptoSwift/CHANGELOG
+++ /dev/null
@@ -1,332 +0,0 @@
-1.4.2
-- Update Xcode project to Xcode 13
-- Add SHA3 support for HMAC
-- Update HMAC.Variant API (deprecate current cases)
-
-1.4.1
-- Introduce ISO 10126 padding
-- fix various compiler warnings
-- Revert Xcode project deployment target
-
-1.4.0
-- Customize CFB segment size (cfb8, cfb128).
-- Adapt Swift @inlineable for better code optimization
-
-1.3.8
-- Revert xcframework revolution. Back to build from sources. (I'm sorry)
-
-1.3.7
-- Re-release to workaround Swift Package Manager release
-
-1.3.6
-- Fix macOS binary
-- Windows support
-
-1.3.5
-- Re-release binary framework due to codesign issue
-
-1.3.4
-- Distribute optimized binary (xcframework) via SPM for apple platforms
-
-1.3.3
-- Adds OCB Authenticated-Encryption Algorithm (RFC7253)
-- build-framework.sh output CryptoSwift.xcframework
-- Xcode 12.2 maintenance updates
-- Removed CryptoSwift.playground (couldn't make it work since Xcode 12 update)
-
-1.3.2
-- Swift 5.3 update (Xcode 12)
-- Bump target platform (iOS 9, macOS 10.12)
-- Allow CMAC with any Cipher
-- Remove CMAC key limit
-
-1.3.1
-- Fix tests
-- Swift 5.2 update
-- Address possible timing issue
-
-1.3.0
-- Adds ISO-78164 padding
-- Performance improvements
-- Swift 5.1 update
-
-1.2.0
-- Performance improvements
-- Workaround Xcode test builds with Xcode 11
-
-1.1.3
-- Fix build crash: https://bugs.swift.org/browse/SR-11630
-- Fixes Xcode project tests build
-- SwiftFormat all the things
-- Increase/fix SHA2 data length for big input by use Int64 for calculation
-
-1.1.2
-- Fix Swift 5.0 build (for real this time)
-
-1.1.1
-- Fix Swift 5.0 build
-
-1.1.0
-- Replace RandomBytesSequence with Swift.RandomNumberGenerator
-- Fix CBC-MAC
-- Update SPM support
-- Update for Xcode 11 and Swift 5.1
-- Xcode: BUILD_LIBRARY_FOR_DISTRIBUTION = YES
-
-1.0.0
-- Swift 5
-- Let's
-- Celebrate
-- This
-- Event
-- With
-- 1.0.0 release
-- After
-- 4 years
-- Thank you
-
-0.15.0
-- Adds The scrypt Password-Based Key Derivation Function (https://tools.ietf.org/html/rfc7914)
-- Minor improvements
-
-0.14.0
-- Fixed decryption of AES-GCM ciphertexts with custom tag length
-
-0.13.1
-- Adds AES-GCM tag length configuration.
-- Fixes count check for initializing UInt64 from Data.
-
-0.13.0
-- Adds CBC-MAC authenticator.
-- Adds AES-CCM operation mode.
-
-0.12.0
-- Swift 4.2 maintenance update.
-
-0.11.0
-- API: Cryptor.seek() is throwable
-- Adds proper stream support for CTR encryption with Updaptable interface.
-- Refactor internals for the stream cipher modes.
-- Set minimum deployment target to 8.0 (again).
-
-0.10.0
-- API: BlockMode is no longer an enum. Please migrate to eg. CBC() etc...
-- Adds AES-GCM support. #97 - Feature sponsored by GesundheitsCloud (http://www.gesundheitscloud.de/)
-- Adds CRC32c support.
-- Improves AES variant validation.
-- Fixes empty password in PBKDF2.
-
-0.9.0
-- Swift 4.1 compatibility
-- Added CMAC message authenticator https://tools.ietf.org/html/rfc4493
-- Added AEADChaCha20Poly1305 (AEAD_CHACHA20_POLY1305) https://tools.ietf.org/html/rfc7539#section-2.8.1
-
-0.8.3
-- Fixes SHA3 padding.
-- Fixes Carthage builds.
-
-0.8.2
-- Fixes SHA3 partial updates calculations.
-- Makes ChaCha20 processing faster again.
-
-0.8.1
-- Adds Data(hex:) helper.
-- Adds HKDF (HMAC-based Extract-and-Expand Key Derivation Function)
-- Prevent ChaCha overflow error
-
-0.8.0
-- Adds SHA3 Keccak variants
-- Adds String.bytes helper to convert String to array of bytes
-- Improves AES performance
-- Speeds up compilation times with Swift 4
-- Fixes: Blowfish minimum key size is 5
-- Removes Ciphers "iv" parameter (value moved to BlockMode)
-- BlockMode uses associated value for IV value where apply e.g. .CBC(iv: ivbytes)
-- Refactors internal hacks no longer needed with Swift 4
-
-0.7.2
-- Adds Padding enum (.pkcs5, .pkcs7, .noPadding, .zeroPadding)
-- Removes Generics from the public API.
-- Slightly improves SHA1, SHA2, SHA3 performance.
-- Update SPM configuration for Swift 4
-
-0.7.1
-- Swift 4.0 compatibility release
-
-0.7.0
-- Swift 3.2 compatibility release
-
-0.6.9
-- Fixed padding issue where padding was not properly added in CTR mode.
-- Fixed thrown error on decrypting empty string,
-- Fixed CI build script.
-- Added String.encryptToBase64()
-
-0.6.8
-- Speed up MD5()
-- Faster Array(hex:)
-- Improve AES performance
-- Fix tvOS bitcode
-- Fix Blowfish CFB, OFB, CTR block modes.
-- Fix Blowfish for 32-bit arch.
-- Fix ChaCha20 preconditions
-
-0.6.7
-- Release for Xcode 8.2
-- Fix playground example
-
-0.6.6
-- Rework ChaCha20
-- Fix Poly1305
-
-0.6.5
-- Significant performance improvement when processing lange amount of data.
-- Degeneric functions and change Sequence -> Collection in generic constraints.
-
-0.6.4
-- More performance improvements
-- Add convenient Digest.sha2(bytes:variant)
-- New: Blowfish cipher
-
-0.6.3
-- Hotfix release
-- Fixes bitPadding() that breaks Digests calculations, introduced in 0.6.2
-
-0.6.2
-- SHA performance improvements by using less Swift in Swift
-- Fix public access to all digests classes
-
-0.6.1
-- Update tests.
-- New: RandomBytesSequence urandom values on Linux.
-- Throw appropriate error for AES with invalid input where padding is needed.
-- Improve performance, especially to SHA-1, SHA-2, PBKDF and related.
-- Set deployment targets for all platform. Fixes Carthage builds.
-- New: SHA-3 implementation (request #291)
-- SHA-1 conforms to Updatable protocol and may be calculated incrementally.
-- SHA-2 conforms to Updatable protocol and may be calculated incrementally.
-
-0.6.0
-- Remove bridge() workaround for Linux (not needed)
-- make MD5() public
-- Update README
-- Convenience HMAC initializer for String input
-
-0.6.0-beta2
-- SHA-2 fix #319
-- HashProtocol -> Digest and refactor
-- MD5 conforms to Updatable protocol and may be calculated incrementally
-- Cipher protocol accepts Collection input now
-
-0.6.0-beta1
-- Swift 3 compatibility
-- Multiplatform, Single-scheme Xcode Project
-- Swift Package Manager fully supported (build and tests)
-- Improved Linux support
-- Travis configuration added
-- Public interface tests added
-- enum Authenticator -> protocol Authenticator
-- CRC -> Checksum
-- String.encrypt() returns hex string instead of Array
-- removed String.decrypt()
-- enum Hash -> struct Hash
-- Convenience initializer of Array of bytes with Hex string. Array(hex: "0xb1b1b2b2")
-- Fix reusability of ChaCha20 instance
-- Replace optional initializers with throwable initializers
-- Allow to set initial counter explicitly (AES block modes). RandomAccessCryptor.seek()
-
-0.5.2
-- Fix AES-CTR incremental updates. #287
-- Fixed PBKDF2 tests. #295
-- Fixed assertion check in PKCS7. #288
-- Updatable protocol accept SequenceType in place of Array
-
-0.5.1
-- Fixed PBKDF2 not taking key length parameter into account
-- Switch to Array<> in code
-
-0.5
-- Added PBKDF1 https://tools.ietf.org/html/rfc2898#section-5.1
-- Added PBKDF2 https://tools.ietf.org/html/rfc2898#section-5.2
-- UpdatableCryptor protocol allows incremental encryption stream of data
-- CryptoSwift.playground
-- Docs update
-- Added reflection control to CRC-32 (Luís Silva)
-- Fix AES.init() (Pascal Pfiffner)
-
-0.4.1
-- fix NoPadding()
-
-0.4
-- Padding setup is now part of cipher constructor
-- Added PBKDF2 http://tools.ietf.org/html/rfc2898#section-5.2
-- Add BlockCipher protocol
-- Rename Cipher -> CipherProtocol
-- Remove build-frameworks.sh script
-- Keep sensitive data in memory with SecureBytes
-- Allows direct use of HMAC and Poly1305
-- README update
-- Fix missing Foundation import on Linux
-
-0.3.1
-- replace deprecated Bit with new enum.
-
-0.3
-- Swift 2.2 support
-- use generators for cipher block modes should reduce memory overload.
-- add OFB block mode
-- add PCBC block mode
-- String.decryptBase64ToString to decrypt Base64 encoded strings
-- broke up complicated expressions which were taking ages to compile
-
-0.2.3
-- enable bitcode setting for Debug on an Apple TV
-- faster compilation times
-- improve padding functions
-
-0.2.2
-- Fix ChaCha20 cipher
-- Replace for(;;) with for-in
-- Workaround for "NSString are not yet implicitly convertible to String" on Linux
-
-0.2.1
-- Fix linux build
-- re-add umbrella header
-
-0.2
-- Rabbit cipher (RFC4503)
-- Linux Swift support
-- Swift Package Manager support
-- tvOS support
-- Add optional seed to CRC
-- Add umbrella header (CryptoSwift.h)
-- Fix AES in CTR mode
-- Fix no padding support for CTR and CFB block modes
-- Fix access to AES.Error and ChaCha20.Error
-
-0.1.1
-- Fix Cococapods package (missing Foundation integration)
-
-0.1.0
-- Major performance improvements.
-- Transition from Optionals to throw error.
-- Replace enum Cipher with protocol for ciphers.
-- Added CRC16
-- Fixed AES CFB decryption
-- Drop internal "Foundation" dependency, nonetheless it is supported as usual.
-
-0.0.16
-- Critical fix for private "md5" selector issue (#135)
-
-0.0.15
-- Fix 32-bit CTR block mode
-- Carthage support update
-- Mark as App-Extension-Safe API
-
-0.0.14
-- hexString -> toHextString() #105
-- CTR (Counter mode)
-- Hex string is lowercase now
-- Carthage support
-- Tests update
-- Swift 2.0 support - overall update
diff --git a/Carthage/Checkouts/CryptoSwift/CNAME b/Carthage/Checkouts/CryptoSwift/CNAME
deleted file mode 100644
index d7c8ffd4c..000000000
--- a/Carthage/Checkouts/CryptoSwift/CNAME
+++ /dev/null
@@ -1 +0,0 @@
-cryptoswift.io
diff --git a/Carthage/Checkouts/CryptoSwift/CODE_OF_CONDUCT.md b/Carthage/Checkouts/CryptoSwift/CODE_OF_CONDUCT.md
deleted file mode 100644
index ea968f5a9..000000000
--- a/Carthage/Checkouts/CryptoSwift/CODE_OF_CONDUCT.md
+++ /dev/null
@@ -1,46 +0,0 @@
-# Contributor Covenant Code of Conduct
-
-## Our Pledge
-
-In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
-
-## Our Standards
-
-Examples of behavior that contributes to creating a positive environment include:
-
-* Using welcoming and inclusive language
-* Being respectful of differing viewpoints and experiences
-* Gracefully accepting constructive criticism
-* Focusing on what is best for the community
-* Showing empathy towards other community members
-
-Examples of unacceptable behavior by participants include:
-
-* The use of sexualized language or imagery and unwelcome sexual attention or advances
-* Trolling, insulting/derogatory comments, and personal or political attacks
-* Public or private harassment
-* Publishing others' private information, such as a physical or electronic address, without explicit permission
-* Other conduct which could reasonably be considered inappropriate in a professional setting
-
-## Our Responsibilities
-
-Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
-
-Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
-
-## Scope
-
-This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
-
-## Enforcement
-
-Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at marcin@krzyzanowskim.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
-
-Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
-
-## Attribution
-
-This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
-
-[homepage]: http://contributor-covenant.org
-[version]: http://contributor-covenant.org/version/1/4/
diff --git a/Carthage/Checkouts/CryptoSwift/CONTRIBUTING.md b/Carthage/Checkouts/CryptoSwift/CONTRIBUTING.md
deleted file mode 100644
index 5ac923451..000000000
--- a/Carthage/Checkouts/CryptoSwift/CONTRIBUTING.md
+++ /dev/null
@@ -1,27 +0,0 @@
-By submitting a pull request, you represent that you have the right to license
-your contribution to Marcin Krzyżanowski and the community, and agree by submitting the patch that your contributions are licensed under the CryptoSwift project license.
-
----
-
-Before submitting the pull request, please make sure you have tested your changes.
-
----
-
-For new files, please use the correct file header:
-
-```
-//
-// CryptoSwift
-//
-// Copyright (C) Marcin Krzyżanowski
-// This software is provided 'as-is', without any express or implied warranty.
-//
-// In no event will the authors be held liable for any damages arising from the use of this software.
-//
-// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
-//
-// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required.
-// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
-// - This notice may not be removed or altered from any source or binary distribution.
-//
-```
diff --git a/Carthage/Checkouts/CryptoSwift/CONTRIBUTORS.txt b/Carthage/Checkouts/CryptoSwift/CONTRIBUTORS.txt
deleted file mode 100644
index fe184e223..000000000
--- a/Carthage/Checkouts/CryptoSwift/CONTRIBUTORS.txt
+++ /dev/null
@@ -1,114 +0,0 @@
-For the purpose of tracking copyright, this is the list of individuals and
-organizations who have contributed source code to CryptoSwift.
-
-### Contributors
-
-- Adolfo Martinelli
-- Aidan Woods
-- Alejandro Isaza
-- Alex Binary
-- Alex Vlasov
-- AlexDenisov <1101.debian@gmail.com>
-- Alexey Komnin
-- Alsey Coleman Miller
-- Andrew Wagner <845683+drewag@users.noreply.github.com>
-- André Berenguel
-- Anton
-- Ayaka Nonaka
-- Bart Cone
-- Bing Cheung <32565605+eungch@users.noreply.github.com>
-- Bogdan Bystritskiy
-- Brice Cesarin
-- Bruce Geerdes
-- Bryan Chen
-- Bryant Luk
-- C.W. Betts
-- Caio Mathielo
-- Cheng-Yu Hsu
-- Chris Amanse
-- Christian Steffens
-- Cihat Gündüz
-- Cosmin Baies
-- Dave Wood
-- Dima Kalachov
-- Dusan Klinec
-- Eneko Alonso
-- Eugene Berdnikov
-- Evan Maloney
-- Evin Ugur
-- Frank Langel
-- Frank Langel
-- Franklin Schrans
-- FreeThinker <59345560+Free-FreeThinker@users.noreply.github.com>
-- Grzegorz Nowicki
-- Hamilton Chapman
-- Honza Dvorsky
-- Howtin
-- Ibrahim Kteish
-- Igor Camilo
-- Javier Soto
-- Jeremy Greenwood
-- John Hammerlund
-- Jonas Obrist
-- K.K. POON
-- Keith Smiley
-- Koray Koska
-- Kyle Fuller
-- Lex Tang
-- Logan Wright
-- Ludo Galabru
-- Luis Reisewitz
-- Luís Silva
-- Madhava Jay
-- Marc Prud'hommeaux
-- Marcelo Fabri
-- Marcin Krzyzanowski
-- Masayuki Ono
-- Matias Cudich
-- Matias Piipari
-- Matthew Chung
-- Michael Ledin
-- Michael Redig
-- Mo Ramezanpoor
-- Nate West
-- Nathan Fallet
-- Nicholas Maccharoli
-- Nobutaka Yuasa
-- Oscar De Moya
-- Pantelis Zirinis
-- Paolo Musolino
-- Pascal Pfiffner
-- Pedro Silva
-- Pierpaolo Frasa
-- Quinn McHenry
-- Rich Lowenberg
-- Roman Podymov
-- Ronald Mannak
-- SLboat
-- Sali0m
-- Sam Soffes
-- Samuel GRAU
-- ScottieY
-- Semen Zhydenko
-- Simon Hartmann
-- Stefan Hintz
-- Thomas Bibby
-- Thomas Haak
-- TictoDev
-- Tomas Kraina
-- Tomasz Szulc
-- Tomasz Wierzbik
-- Valeriy Van
-- Xavier Matos
-- Yannick Loriot
-- Yury Lapitsky
-- akreutz <27BBsan08!>
-- jose
-- mrahmiao
-- spatno
-- sweepty
-- venj
-
-**Updating this list**
-
-Please do not edit this file manually. It is generated using `./scripts/generate-contributors-list.sh`. If a name is misspelled or appearing multiple times: add an entry in `./.mailmap`
diff --git a/Carthage/Checkouts/CryptoSwift/CryptoSwift-TestHostApp/AppDelegate.swift b/Carthage/Checkouts/CryptoSwift/CryptoSwift-TestHostApp/AppDelegate.swift
deleted file mode 100644
index b2d794078..000000000
--- a/Carthage/Checkouts/CryptoSwift/CryptoSwift-TestHostApp/AppDelegate.swift
+++ /dev/null
@@ -1,49 +0,0 @@
-//
-// CryptoSwift
-//
-// Copyright (C) 2014-2021 Marcin Krzyżanowski
-// This software is provided 'as-is', without any express or implied warranty.
-//
-// In no event will the authors be held liable for any damages arising from the use of this software.
-//
-// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
-//
-// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required.
-// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
-// - This notice may not be removed or altered from any source or binary distribution.
-//
-
-import UIKit
-
-@UIApplicationMain
-class AppDelegate: UIResponder, UIApplicationDelegate {
-
- var window: UIWindow?
-
- func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
- // Override point for customization after application launch.
- true
- }
-
- func applicationWillResignActive(_ application: UIApplication) {
- // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
- // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
- }
-
- func applicationDidEnterBackground(_ application: UIApplication) {
- // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
- // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
- }
-
- func applicationWillEnterForeground(_ application: UIApplication) {
- // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
- }
-
- func applicationDidBecomeActive(_ application: UIApplication) {
- // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
- }
-
- func applicationWillTerminate(_ application: UIApplication) {
- // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
- }
-}
diff --git a/Carthage/Checkouts/CryptoSwift/CryptoSwift-TestHostApp/Default-568h@2x.png b/Carthage/Checkouts/CryptoSwift/CryptoSwift-TestHostApp/Default-568h@2x.png
deleted file mode 100644
index 0891b7aab..000000000
Binary files a/Carthage/Checkouts/CryptoSwift/CryptoSwift-TestHostApp/Default-568h@2x.png and /dev/null differ
diff --git a/Carthage/Checkouts/CryptoSwift/CryptoSwift-TestHostApp/Info.plist b/Carthage/Checkouts/CryptoSwift/CryptoSwift-TestHostApp/Info.plist
deleted file mode 100644
index 76398107b..000000000
--- a/Carthage/Checkouts/CryptoSwift/CryptoSwift-TestHostApp/Info.plist
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
-
-
- CFBundleDevelopmentRegion
- $(DEVELOPMENT_LANGUAGE)
- CFBundleExecutable
- $(EXECUTABLE_NAME)
- CFBundleIdentifier
- $(PRODUCT_BUNDLE_IDENTIFIER)
- CFBundleInfoDictionaryVersion
- 6.0
- CFBundleName
- $(PRODUCT_NAME)
- CFBundlePackageType
- APPL
- CFBundleShortVersionString
- 1.0
- CFBundleVersion
- 1
- LSRequiresIPhoneOS
-
- UIRequiredDeviceCapabilities
-
- armv7
-
- UIRequiresFullScreen
-
- UISupportedInterfaceOrientations
-
- UIInterfaceOrientationPortrait
- UIInterfaceOrientationLandscapeLeft
- UIInterfaceOrientationLandscapeRight
-
- UISupportedInterfaceOrientations~ipad
-
- UIInterfaceOrientationPortrait
- UIInterfaceOrientationPortraitUpsideDown
- UIInterfaceOrientationLandscapeLeft
- UIInterfaceOrientationLandscapeRight
-
-
-
diff --git a/Carthage/Checkouts/CryptoSwift/CryptoSwift.podspec b/Carthage/Checkouts/CryptoSwift/CryptoSwift.podspec
deleted file mode 100644
index af4c611b8..000000000
--- a/Carthage/Checkouts/CryptoSwift/CryptoSwift.podspec
+++ /dev/null
@@ -1,19 +0,0 @@
-Pod::Spec.new do |s|
- s.name = "CryptoSwift"
- s.version = "1.4.2"
- s.source = { :git => "https://github.com/krzyzanowskim/CryptoSwift.git", :tag => "#{s.version}" }
- s.summary = "Cryptography in Swift. SHA, MD5, CRC, PBKDF, Poly1305, HMAC, CMAC, HDKF, Scrypt, ChaCha20, Rabbit, Blowfish, AES."
- s.description = "Cryptography functions and helpers for Swift implemented in Swift. SHA-1, SHA-2, SHA-3, MD5, PBKDF1, PBKDF2, Scrypt, CRC, Poly1305, HMAC, ChaCha20, Rabbit, Blowfish, AES"
- s.homepage = "https://github.com/krzyzanowskim/CryptoSwift"
- s.license = {:type => "Attribution", :file => "LICENSE"}
- s.authors = {'Marcin Krzyżanowski' => 'marcin@krzyzanowskim.com'}
- s.social_media_url = "https://twitter.com/krzyzanowskim"
- s.cocoapods_version = '>= 1.10.0'
- s.swift_version = "5.3"
- s.ios.deployment_target = "9.0"
- s.osx.deployment_target = "10.12"
- s.watchos.deployment_target = "2.0"
- s.tvos.deployment_target = "9.0"
- s.source_files = "Sources/CryptoSwift/**/*.swift"
- s.requires_arc = true
-end
diff --git a/Carthage/Checkouts/CryptoSwift/CryptoSwift.xcodeproj/project.pbxproj b/Carthage/Checkouts/CryptoSwift/CryptoSwift.xcodeproj/project.pbxproj
deleted file mode 100644
index 604fd17cd..000000000
--- a/Carthage/Checkouts/CryptoSwift/CryptoSwift.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,1197 +0,0 @@
-// !$*UTF8*$!
-{
- archiveVersion = 1;
- classes = {
- };
- objectVersion = 52;
- objects = {
-
-/* Begin PBXBuildFile section */
- 0AF023D5230F2B0F008E4E68 /* ISO78164Padding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AF023D4230F2B0F008E4E68 /* ISO78164Padding.swift */; };
- 0EE73E71204D598100110E11 /* CMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EE73E70204D598100110E11 /* CMAC.swift */; };
- 0EE73E74204D59C200110E11 /* CMACTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EE73E72204D599C00110E11 /* CMACTests.swift */; };
- 14156CE52011422400DDCFBC /* ChaCha20Poly1305Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14156CE42011422400DDCFBC /* ChaCha20Poly1305Tests.swift */; };
- 1467460F2017BB3600DF04ED /* AEAD.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1467460E2017BB3600DF04ED /* AEAD.swift */; };
- 35F3E51C23BF9A6700A024A1 /* OCB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35F3E51B23BF9A6700A024A1 /* OCB.swift */; };
- 42012783267A6F1C00F82506 /* ISO10126Padding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42012782267A6F1C00F82506 /* ISO10126Padding.swift */; };
- 674A736F1BF5D85B00866C5B /* RabbitTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 674A736E1BF5D85B00866C5B /* RabbitTests.swift */; };
- 750509991F6BEF2A00394A1B /* PKCS7.swift in Sources */ = {isa = PBXBuildFile; fileRef = 750509981F6BEF2A00394A1B /* PKCS7.swift */; };
- 750CC3EB1DC0CACE0096BE6E /* BlowfishTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 750CC3EA1DC0CACE0096BE6E /* BlowfishTests.swift */; };
- 75100F8F19B0BC890005C5F5 /* Poly1305Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75100F8E19B0BC890005C5F5 /* Poly1305Tests.swift */; };
- 751AA0F3255F4EB600D4719E /* AESOCBTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35F3E51D23BF9AD300A024A1 /* AESOCBTests.swift */; };
- 751EE9781F93996100161FFC /* AES.Cryptors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 751EE9771F93996100161FFC /* AES.Cryptors.swift */; };
- 75211F95207249D8004E41F8 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75211F94207249D8004E41F8 /* AppDelegate.swift */; };
- 7523742D2083C61D0016D662 /* GCM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7523742C2083C61C0016D662 /* GCM.swift */; };
- 7529366A20683DFC00195874 /* AEADChaCha20Poly1305.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7529366920683DFC00195874 /* AEADChaCha20Poly1305.swift */; };
- 752BED9D208C120D00FC4743 /* Blowfish+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52541EE8B6CA0048EB3B /* Blowfish+Foundation.swift */; };
- 752BED9E208C121000FC4743 /* Blowfish.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52491EE8B6CA0048EB3B /* Blowfish.swift */; };
- 752BED9F208C135700FC4743 /* AES+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52531EE8B6CA0048EB3B /* AES+Foundation.swift */; };
- 753674072175D012003E32A6 /* StreamDecryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 753674062175D012003E32A6 /* StreamDecryptor.swift */; };
- 754310442050111A003FB1DF /* CompactMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 754310432050111A003FB1DF /* CompactMap.swift */; };
- 75482EA41CB310B7001F66A5 /* PBKDF.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75482EA31CB310B7001F66A5 /* PBKDF.swift */; };
- 754BE46819693E190098E6F3 /* DigestTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 754BE46719693E190098E6F3 /* DigestTests.swift */; };
- 755BA296235387700039CAB5 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7576F64C20725BD5006688F8 /* Default-568h@2x.png */; };
- 755FB1DA199E347D00475437 /* ExtensionsTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 755FB1D9199E347D00475437 /* ExtensionsTest.swift */; };
- 7564F0522072EAEB00CA5A96 /* PBKDFPerf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7576F6F6207290F8006688F8 /* PBKDFPerf.swift */; platformFilter = ios; };
- 7564F0532072EAEB00CA5A96 /* ChaCha20TestsPerf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7576F6F020728EAB006688F8 /* ChaCha20TestsPerf.swift */; platformFilter = ios; };
- 7564F0542072EAEB00CA5A96 /* RabbitTestsPerf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7576F6F220728F00006688F8 /* RabbitTestsPerf.swift */; platformFilter = ios; };
- 7564F0552072EAEB00CA5A96 /* ExtensionsTestPerf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7576F6F420729069006688F8 /* ExtensionsTestPerf.swift */; platformFilter = ios; };
- 7564F0562072EAEB00CA5A96 /* DigestTestsPerf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7576F6EB20726319006688F8 /* DigestTestsPerf.swift */; platformFilter = ios; };
- 7564F0572072EAEB00CA5A96 /* TestsPerformance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7595C14C2072E48C00EA1A5F /* TestsPerformance.swift */; platformFilter = ios; };
- 7564F0582072EAEB00CA5A96 /* AESTestsPerf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7576F6EE20726422006688F8 /* AESTestsPerf.swift */; platformFilter = ios; };
- 7564F05A2072EAEB00CA5A96 /* CryptoSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 754BE45519693E190098E6F3 /* CryptoSwift.framework */; };
- 7564F0642072ED7000CA5A96 /* CryptoSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 754BE45519693E190098E6F3 /* CryptoSwift.framework */; };
- 7564F0652072ED7000CA5A96 /* CryptoSwift.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 754BE45519693E190098E6F3 /* CryptoSwift.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
- 756A64C62111083B00BE8805 /* StreamEncryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 756A64C52111083B00BE8805 /* StreamEncryptor.swift */; };
- 757DA2531A4ED0A4002BA3EF /* PaddingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 757DA2521A4ED0A4002BA3EF /* PaddingTests.swift */; };
- 757DA2551A4ED408002BA3EF /* AESTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 757DA2541A4ED408002BA3EF /* AESTests.swift */; };
- 757DA2591A4ED4D7002BA3EF /* ChaCha20Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 757DA2581A4ED4D7002BA3EF /* ChaCha20Tests.swift */; };
- 758A94291A65C67400E46135 /* HMACTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 758A94271A65C59200E46135 /* HMACTests.swift */; };
- 758F95AB2072E8E20080D664 /* Bridging.h in Headers */ = {isa = PBXBuildFile; fileRef = 758F95AA2072E8E10080D664 /* Bridging.h */; };
- 7594CCBC217A76DC0055C95D /* AESCCMTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 755E0303217A756F00065FC6 /* AESCCMTests.swift */; };
- 7595C14D2072E48C00EA1A5F /* TestsPerformance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7595C14C2072E48C00EA1A5F /* TestsPerformance.swift */; };
- 7595C1582072E5B900EA1A5F /* DigestTestsPerf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7576F6EB20726319006688F8 /* DigestTestsPerf.swift */; };
- 7595C1592072E5B900EA1A5F /* AESTestsPerf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7576F6EE20726422006688F8 /* AESTestsPerf.swift */; };
- 7595C15A2072E5B900EA1A5F /* ChaCha20TestsPerf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7576F6F020728EAB006688F8 /* ChaCha20TestsPerf.swift */; };
- 7595C15B2072E5B900EA1A5F /* RabbitTestsPerf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7576F6F220728F00006688F8 /* RabbitTestsPerf.swift */; };
- 7595C15C2072E5B900EA1A5F /* ExtensionsTestPerf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7576F6F420729069006688F8 /* ExtensionsTestPerf.swift */; };
- 7595C15D2072E5B900EA1A5F /* PBKDFPerf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7576F6F6207290F8006688F8 /* PBKDFPerf.swift */; };
- 7595C1602072E64900EA1A5F /* CryptoSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 754BE45519693E190098E6F3 /* CryptoSwift.framework */; };
- 75B3ED77210F9DF7005D4ADA /* BlockDecryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75B3ED76210F9DF7005D4ADA /* BlockDecryptor.swift */; };
- 75B3ED79210FA016005D4ADA /* BlockEncryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75B3ED78210FA016005D4ADA /* BlockEncryptor.swift */; };
- 75B601EB197D6A6C0009B53D /* CryptoSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 754BE45519693E190098E6F3 /* CryptoSwift.framework */; };
- 75C2E76D1D55F097003D2BCA /* Access.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75C2E76C1D55F097003D2BCA /* Access.swift */; };
- 75D7AF38208BFB1600D22BEB /* UInt128.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75D7AF37208BFB1600D22BEB /* UInt128.swift */; };
- 75EC527B1EE8B73A0048EB3B /* CryptoSwift.h in Headers */ = {isa = PBXBuildFile; fileRef = 75EC527A1EE8B6CA0048EB3B /* CryptoSwift.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 75EC527C1EE8B8130048EB3B /* AES.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52381EE8B6CA0048EB3B /* AES.swift */; };
- 75EC527D1EE8B8130048EB3B /* Array+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52391EE8B6CA0048EB3B /* Array+Extension.swift */; };
- 75EC527E1EE8B8130048EB3B /* Authenticator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC523A1EE8B6CA0048EB3B /* Authenticator.swift */; };
- 75EC527F1EE8B8130048EB3B /* BatchedCollection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC523B1EE8B6CA0048EB3B /* BatchedCollection.swift */; };
- 75EC52801EE8B8130048EB3B /* Bit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC523C1EE8B6CA0048EB3B /* Bit.swift */; };
- 75EC52811EE8B8130048EB3B /* BlockCipher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC523D1EE8B6CA0048EB3B /* BlockCipher.swift */; };
- 75EC52821EE8B8170048EB3B /* BlockMode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC523F1EE8B6CA0048EB3B /* BlockMode.swift */; };
- 75EC52831EE8B8170048EB3B /* BlockModeOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52401EE8B6CA0048EB3B /* BlockModeOptions.swift */; };
- 75EC52841EE8B8170048EB3B /* CipherModeWorker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52411EE8B6CA0048EB3B /* CipherModeWorker.swift */; };
- 75EC52851EE8B8170048EB3B /* CBC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52421EE8B6CA0048EB3B /* CBC.swift */; };
- 75EC52861EE8B8170048EB3B /* CFB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52431EE8B6CA0048EB3B /* CFB.swift */; };
- 75EC52871EE8B8170048EB3B /* CTR.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52441EE8B6CA0048EB3B /* CTR.swift */; };
- 75EC52881EE8B8170048EB3B /* ECB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52451EE8B6CA0048EB3B /* ECB.swift */; };
- 75EC52891EE8B8170048EB3B /* OFB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52461EE8B6CA0048EB3B /* OFB.swift */; };
- 75EC528A1EE8B8170048EB3B /* PCBC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52471EE8B6CA0048EB3B /* PCBC.swift */; };
- 75EC528D1EE8B81A0048EB3B /* ChaCha20.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC524A1EE8B6CA0048EB3B /* ChaCha20.swift */; };
- 75EC528E1EE8B81A0048EB3B /* Checksum.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC524B1EE8B6CA0048EB3B /* Checksum.swift */; };
- 75EC528F1EE8B81A0048EB3B /* Cipher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC524C1EE8B6CA0048EB3B /* Cipher.swift */; };
- 75EC52901EE8B81A0048EB3B /* Collection+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC524D1EE8B6CA0048EB3B /* Collection+Extension.swift */; };
- 75EC52911EE8B81A0048EB3B /* Cryptors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC524E1EE8B6CA0048EB3B /* Cryptors.swift */; };
- 75EC52931EE8B81A0048EB3B /* Digest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52501EE8B6CA0048EB3B /* Digest.swift */; };
- 75EC52941EE8B81A0048EB3B /* DigestType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52511EE8B6CA0048EB3B /* DigestType.swift */; };
- 75EC52971EE8B8200048EB3B /* ChaCha20+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52551EE8B6CA0048EB3B /* ChaCha20+Foundation.swift */; };
- 75EC52981EE8B8200048EB3B /* Array+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52561EE8B6CA0048EB3B /* Array+Foundation.swift */; };
- 75EC52991EE8B8200048EB3B /* Data+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52571EE8B6CA0048EB3B /* Data+Extension.swift */; };
- 75EC529A1EE8B8200048EB3B /* HMAC+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52581EE8B6CA0048EB3B /* HMAC+Foundation.swift */; };
- 75EC529B1EE8B8200048EB3B /* Rabbit+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52591EE8B6CA0048EB3B /* Rabbit+Foundation.swift */; };
- 75EC529C1EE8B8200048EB3B /* String+FoundationExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC525A1EE8B6CA0048EB3B /* String+FoundationExtension.swift */; };
- 75EC529D1EE8B8200048EB3B /* Utils+Foundation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC525B1EE8B6CA0048EB3B /* Utils+Foundation.swift */; };
- 75EC529E1EE8B8230048EB3B /* Generics.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC525C1EE8B6CA0048EB3B /* Generics.swift */; };
- 75EC529F1EE8B8230048EB3B /* HMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC525D1EE8B6CA0048EB3B /* HMAC.swift */; };
- 75EC52A01EE8B8290048EB3B /* Int+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC525F1EE8B6CA0048EB3B /* Int+Extension.swift */; };
- 75EC52A21EE8B8290048EB3B /* MD5.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52611EE8B6CA0048EB3B /* MD5.swift */; };
- 75EC52A31EE8B8290048EB3B /* NoPadding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52621EE8B6CA0048EB3B /* NoPadding.swift */; };
- 75EC52A41EE8B8290048EB3B /* Operators.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52631EE8B6CA0048EB3B /* Operators.swift */; };
- 75EC52A51EE8B8290048EB3B /* Padding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52641EE8B6CA0048EB3B /* Padding.swift */; };
- 75EC52A61EE8B8390048EB3B /* PBKDF1.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52661EE8B6CA0048EB3B /* PBKDF1.swift */; };
- 75EC52A71EE8B8390048EB3B /* PBKDF2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52671EE8B6CA0048EB3B /* PBKDF2.swift */; };
- 75EC52A81EE8B8390048EB3B /* PKCS5.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52681EE8B6CA0048EB3B /* PKCS5.swift */; };
- 75EC52A91EE8B83D0048EB3B /* PKCS7Padding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52691EE8B6CA0048EB3B /* PKCS7Padding.swift */; };
- 75EC52AA1EE8B83D0048EB3B /* Poly1305.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC526A1EE8B6CA0048EB3B /* Poly1305.swift */; };
- 75EC52AB1EE8B83D0048EB3B /* Rabbit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC526B1EE8B6CA0048EB3B /* Rabbit.swift */; };
- 75EC52AC1EE8B83D0048EB3B /* Cryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC526C1EE8B6CA0048EB3B /* Cryptor.swift */; };
- 75EC52AE1EE8B83D0048EB3B /* SecureBytes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC526E1EE8B6CA0048EB3B /* SecureBytes.swift */; };
- 75EC52AF1EE8B83D0048EB3B /* SHA1.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC526F1EE8B6CA0048EB3B /* SHA1.swift */; };
- 75EC52B01EE8B83D0048EB3B /* SHA2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52701EE8B6CA0048EB3B /* SHA2.swift */; };
- 75EC52B11EE8B83D0048EB3B /* SHA3.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52711EE8B6CA0048EB3B /* SHA3.swift */; };
- 75EC52B21EE8B83D0048EB3B /* String+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52721EE8B6CA0048EB3B /* String+Extension.swift */; };
- 75EC52B31EE8B83D0048EB3B /* UInt16+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52731EE8B6CA0048EB3B /* UInt16+Extension.swift */; };
- 75EC52B41EE8B83D0048EB3B /* UInt32+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52741EE8B6CA0048EB3B /* UInt32+Extension.swift */; };
- 75EC52B51EE8B83D0048EB3B /* UInt64+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52751EE8B6CA0048EB3B /* UInt64+Extension.swift */; };
- 75EC52B61EE8B83D0048EB3B /* UInt8+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52761EE8B6CA0048EB3B /* UInt8+Extension.swift */; };
- 75EC52B71EE8B83D0048EB3B /* Updatable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52771EE8B6CA0048EB3B /* Updatable.swift */; };
- 75EC52B81EE8B83D0048EB3B /* Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52781EE8B6CA0048EB3B /* Utils.swift */; };
- 75EC52B91EE8B83D0048EB3B /* ZeroPadding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC52791EE8B6CA0048EB3B /* ZeroPadding.swift */; };
- 75F4E434216C93EF00F09710 /* CCM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75F4E433216C93EF00F09710 /* CCM.swift */; };
- 75F4E436216C98DE00F09710 /* CBCMAC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75F4E435216C98DE00F09710 /* CBCMAC.swift */; };
- 81F279DD2181F58300449EDA /* Scrypt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81F279DC2181F58300449EDA /* Scrypt.swift */; };
- 81F279DF2181F5A000449EDA /* ScryptTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81F279DE2181F5A000449EDA /* ScryptTests.swift */; };
- 81F279E12181F5C500449EDA /* ScryptTestsPerf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81F279E02181F5C500449EDA /* ScryptTestsPerf.swift */; };
- 81F279E22181F5C500449EDA /* ScryptTestsPerf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81F279E02181F5C500449EDA /* ScryptTestsPerf.swift */; platformFilter = ios; };
- E3FD2D531D6B81CE00A9F35F /* Error+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = E3FD2D511D6B813C00A9F35F /* Error+Extension.swift */; };
- E6200E141FB9A7AE00258382 /* HKDF.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6200E131FB9A7AE00258382 /* HKDF.swift */; };
- E6200E171FB9B68C00258382 /* HKDFTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6200E151FB9B67C00258382 /* HKDFTests.swift */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXContainerItemProxy section */
- 7564F0502072EAEB00CA5A96 /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 754BE44C19693E190098E6F3 /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = 754BE45419693E190098E6F3;
- remoteInfo = CryptoSwift;
- };
- 7564F0612072EB5D00CA5A96 /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 754BE44C19693E190098E6F3 /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = 75211F91207249D8004E41F8;
- remoteInfo = "CryptoSwift-TestHostApp";
- };
- 7564F0662072ED7000CA5A96 /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 754BE44C19693E190098E6F3 /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = 754BE45419693E190098E6F3;
- remoteInfo = CryptoSwift;
- };
- 7595C15E2072E64000EA1A5F /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 754BE44C19693E190098E6F3 /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = 754BE45419693E190098E6F3;
- remoteInfo = CryptoSwift;
- };
- 75B601E3197D69EB0009B53D /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 754BE44C19693E190098E6F3 /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = 754BE45419693E190098E6F3;
- remoteInfo = CryptoSwift;
- };
- 75F9482120BDDF9900956311 /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 754BE44C19693E190098E6F3 /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = 75211F91207249D8004E41F8;
- remoteInfo = "CryptoSwift-TestHostApp";
- };
-/* End PBXContainerItemProxy section */
-
-/* Begin PBXCopyFilesBuildPhase section */
- 7564F0682072ED7000CA5A96 /* Embed Frameworks */ = {
- isa = PBXCopyFilesBuildPhase;
- buildActionMask = 2147483647;
- dstPath = "";
- dstSubfolderSpec = 10;
- files = (
- 7564F0652072ED7000CA5A96 /* CryptoSwift.framework in Embed Frameworks */,
- );
- name = "Embed Frameworks";
- runOnlyForDeploymentPostprocessing = 0;
- };
- 75B601E0197D69770009B53D /* CopyFiles */ = {
- isa = PBXCopyFilesBuildPhase;
- buildActionMask = 2147483647;
- dstPath = "";
- dstSubfolderSpec = 10;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXCopyFilesBuildPhase section */
-
-/* Begin PBXFileReference section */
- 0AF023D4230F2B0F008E4E68 /* ISO78164Padding.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ISO78164Padding.swift; sourceTree = ""; };
- 0EE73E70204D598100110E11 /* CMAC.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CMAC.swift; sourceTree = ""; };
- 0EE73E72204D599C00110E11 /* CMACTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CMACTests.swift; sourceTree = ""; };
- 14156CE42011422400DDCFBC /* ChaCha20Poly1305Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChaCha20Poly1305Tests.swift; sourceTree = ""; };
- 1467460E2017BB3600DF04ED /* AEAD.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AEAD.swift; sourceTree = ""; };
- 35F3E51B23BF9A6700A024A1 /* OCB.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OCB.swift; sourceTree = ""; };
- 35F3E51D23BF9AD300A024A1 /* AESOCBTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AESOCBTests.swift; sourceTree = ""; };
- 42012782267A6F1C00F82506 /* ISO10126Padding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ISO10126Padding.swift; sourceTree = ""; };
- 674A736E1BF5D85B00866C5B /* RabbitTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RabbitTests.swift; sourceTree = ""; };
- 750509981F6BEF2A00394A1B /* PKCS7.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PKCS7.swift; sourceTree = ""; };
- 750CC3EA1DC0CACE0096BE6E /* BlowfishTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BlowfishTests.swift; sourceTree = ""; };
- 75100F8E19B0BC890005C5F5 /* Poly1305Tests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Poly1305Tests.swift; sourceTree = ""; };
- 751EE9771F93996100161FFC /* AES.Cryptors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AES.Cryptors.swift; sourceTree = ""; };
- 75211F92207249D8004E41F8 /* CryptoSwift-TestHostApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "CryptoSwift-TestHostApp.app"; sourceTree = BUILT_PRODUCTS_DIR; };
- 75211F94207249D8004E41F8 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
- 75211FA0207249D8004E41F8 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
- 75211FA520724A0F004E41F8 /* CryptoSwift-TestHostApp-Test.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "CryptoSwift-TestHostApp-Test.xcconfig"; sourceTree = ""; };
- 75211FA820724A0F004E41F8 /* CryptoSwift-Shared.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "CryptoSwift-Shared.xcconfig"; sourceTree = ""; };
- 75211FA920724A0F004E41F8 /* CryptoSwift-TestHostApp-Shared.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "CryptoSwift-TestHostApp-Shared.xcconfig"; sourceTree = ""; };
- 75211FAA20724A0F004E41F8 /* Project-Release.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "Project-Release.xcconfig"; sourceTree = ""; };
- 75211FAC20724A0F004E41F8 /* CryptoSwift-Release.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "CryptoSwift-Release.xcconfig"; sourceTree = ""; };
- 75211FAE20724A10004E41F8 /* Tests-Shared.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "Tests-Shared.xcconfig"; sourceTree = ""; };
- 75211FAF20724A10004E41F8 /* CryptoSwift-Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "CryptoSwift-Debug.xcconfig"; sourceTree = ""; };
- 75211FB020724A10004E41F8 /* Project-Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "Project-Debug.xcconfig"; sourceTree = ""; };
- 75211FB120724A10004E41F8 /* Tests-Test.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "Tests-Test.xcconfig"; sourceTree = ""; };
- 75211FB220724A10004E41F8 /* Project-Shared.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "Project-Shared.xcconfig"; sourceTree = ""; };
- 75211FB420724A10004E41F8 /* CryptoSwift-Test.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "CryptoSwift-Test.xcconfig"; sourceTree = ""; };
- 7523742C2083C61C0016D662 /* GCM.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GCM.swift; sourceTree = ""; };
- 7529366920683DFC00195874 /* AEADChaCha20Poly1305.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AEADChaCha20Poly1305.swift; sourceTree = ""; };
- 753674062175D012003E32A6 /* StreamDecryptor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StreamDecryptor.swift; sourceTree = ""; };
- 7536A93E207254A000F39140 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.3.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; };
- 754310432050111A003FB1DF /* CompactMap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CompactMap.swift; sourceTree = ""; };
- 75482EA31CB310B7001F66A5 /* PBKDF.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PBKDF.swift; sourceTree = ""; };
- 754BE45519693E190098E6F3 /* CryptoSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = CryptoSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; };
- 754BE46019693E190098E6F3 /* CryptoSwiftTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CryptoSwiftTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
- 754BE46719693E190098E6F3 /* DigestTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DigestTests.swift; sourceTree = ""; };
- 755E0303217A756F00065FC6 /* AESCCMTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AESCCMTests.swift; sourceTree = ""; };
- 755FB1D9199E347D00475437 /* ExtensionsTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExtensionsTest.swift; sourceTree = ""; };
- 7564F0602072EAEB00CA5A96 /* TestsPerformance-iOS.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "TestsPerformance-iOS.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
- 756A64C52111083B00BE8805 /* StreamEncryptor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StreamEncryptor.swift; sourceTree = ""; };
- 756BFDCA1A82B87300B9D9A4 /* Bridging.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Bridging.h; sourceTree = ""; };
- 7576F64C20725BD5006688F8 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; };
- 7576F6EB20726319006688F8 /* DigestTestsPerf.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DigestTestsPerf.swift; sourceTree = ""; };
- 7576F6EE20726422006688F8 /* AESTestsPerf.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AESTestsPerf.swift; sourceTree = ""; };
- 7576F6F020728EAB006688F8 /* ChaCha20TestsPerf.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChaCha20TestsPerf.swift; sourceTree = ""; };
- 7576F6F220728F00006688F8 /* RabbitTestsPerf.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RabbitTestsPerf.swift; sourceTree = ""; };
- 7576F6F420729069006688F8 /* ExtensionsTestPerf.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExtensionsTestPerf.swift; sourceTree = ""; };
- 7576F6F6207290F8006688F8 /* PBKDFPerf.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PBKDFPerf.swift; sourceTree = ""; };
- 757DA2521A4ED0A4002BA3EF /* PaddingTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PaddingTests.swift; sourceTree = ""; };
- 757DA2541A4ED408002BA3EF /* AESTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AESTests.swift; sourceTree = ""; };
- 757DA2581A4ED4D7002BA3EF /* ChaCha20Tests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChaCha20Tests.swift; sourceTree = ""; };
- 758A94271A65C59200E46135 /* HMACTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMACTests.swift; sourceTree = ""; };
- 758F95AA2072E8E10080D664 /* Bridging.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Bridging.h; sourceTree = ""; };
- 7595C14A2072E48C00EA1A5F /* TestsPerformance-Mac.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "TestsPerformance-Mac.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
- 7595C14C2072E48C00EA1A5F /* TestsPerformance.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestsPerformance.swift; sourceTree = ""; };
- 75B3ED76210F9DF7005D4ADA /* BlockDecryptor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BlockDecryptor.swift; sourceTree = ""; };
- 75B3ED78210FA016005D4ADA /* BlockEncryptor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BlockEncryptor.swift; sourceTree = ""; };
- 75C2E76C1D55F097003D2BCA /* Access.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Access.swift; sourceTree = ""; };
- 75D7AF37208BFB1600D22BEB /* UInt128.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UInt128.swift; sourceTree = ""; };
- 75EC52381EE8B6CA0048EB3B /* AES.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AES.swift; sourceTree = ""; };
- 75EC52391EE8B6CA0048EB3B /* Array+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Array+Extension.swift"; sourceTree = ""; };
- 75EC523A1EE8B6CA0048EB3B /* Authenticator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Authenticator.swift; sourceTree = ""; };
- 75EC523B1EE8B6CA0048EB3B /* BatchedCollection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BatchedCollection.swift; sourceTree = ""; };
- 75EC523C1EE8B6CA0048EB3B /* Bit.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Bit.swift; sourceTree = ""; };
- 75EC523D1EE8B6CA0048EB3B /* BlockCipher.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BlockCipher.swift; sourceTree = ""; };
- 75EC523F1EE8B6CA0048EB3B /* BlockMode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BlockMode.swift; sourceTree = ""; };
- 75EC52401EE8B6CA0048EB3B /* BlockModeOptions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BlockModeOptions.swift; sourceTree = ""; };
- 75EC52411EE8B6CA0048EB3B /* CipherModeWorker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CipherModeWorker.swift; sourceTree = ""; };
- 75EC52421EE8B6CA0048EB3B /* CBC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CBC.swift; sourceTree = ""; };
- 75EC52431EE8B6CA0048EB3B /* CFB.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CFB.swift; sourceTree = ""; };
- 75EC52441EE8B6CA0048EB3B /* CTR.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CTR.swift; sourceTree = ""; };
- 75EC52451EE8B6CA0048EB3B /* ECB.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ECB.swift; sourceTree = ""; };
- 75EC52461EE8B6CA0048EB3B /* OFB.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OFB.swift; sourceTree = ""; };
- 75EC52471EE8B6CA0048EB3B /* PCBC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PCBC.swift; sourceTree = ""; };
- 75EC52491EE8B6CA0048EB3B /* Blowfish.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Blowfish.swift; sourceTree = ""; };
- 75EC524A1EE8B6CA0048EB3B /* ChaCha20.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChaCha20.swift; sourceTree = ""; };
- 75EC524B1EE8B6CA0048EB3B /* Checksum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Checksum.swift; sourceTree = ""; };
- 75EC524C1EE8B6CA0048EB3B /* Cipher.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Cipher.swift; sourceTree = ""; };
- 75EC524D1EE8B6CA0048EB3B /* Collection+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Collection+Extension.swift"; sourceTree = ""; };
- 75EC524E1EE8B6CA0048EB3B /* Cryptors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Cryptors.swift; sourceTree = ""; };
- 75EC52501EE8B6CA0048EB3B /* Digest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Digest.swift; sourceTree = ""; };
- 75EC52511EE8B6CA0048EB3B /* DigestType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DigestType.swift; sourceTree = ""; };
- 75EC52531EE8B6CA0048EB3B /* AES+Foundation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "AES+Foundation.swift"; sourceTree = ""; };
- 75EC52541EE8B6CA0048EB3B /* Blowfish+Foundation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Blowfish+Foundation.swift"; sourceTree = ""; };
- 75EC52551EE8B6CA0048EB3B /* ChaCha20+Foundation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ChaCha20+Foundation.swift"; sourceTree = ""; };
- 75EC52561EE8B6CA0048EB3B /* Array+Foundation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Array+Foundation.swift"; sourceTree = ""; };
- 75EC52571EE8B6CA0048EB3B /* Data+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Data+Extension.swift"; sourceTree = ""; };
- 75EC52581EE8B6CA0048EB3B /* HMAC+Foundation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "HMAC+Foundation.swift"; sourceTree = ""; };
- 75EC52591EE8B6CA0048EB3B /* Rabbit+Foundation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Rabbit+Foundation.swift"; sourceTree = ""; };
- 75EC525A1EE8B6CA0048EB3B /* String+FoundationExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+FoundationExtension.swift"; sourceTree = ""; };
- 75EC525B1EE8B6CA0048EB3B /* Utils+Foundation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Utils+Foundation.swift"; sourceTree = ""; };
- 75EC525C1EE8B6CA0048EB3B /* Generics.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Generics.swift; sourceTree = ""; };
- 75EC525D1EE8B6CA0048EB3B /* HMAC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HMAC.swift; sourceTree = ""; };
- 75EC525F1EE8B6CA0048EB3B /* Int+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Int+Extension.swift"; sourceTree = ""; };
- 75EC52611EE8B6CA0048EB3B /* MD5.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MD5.swift; sourceTree = ""; };
- 75EC52621EE8B6CA0048EB3B /* NoPadding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NoPadding.swift; sourceTree = ""; };
- 75EC52631EE8B6CA0048EB3B /* Operators.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Operators.swift; sourceTree = ""; };
- 75EC52641EE8B6CA0048EB3B /* Padding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Padding.swift; sourceTree = "