All Projects → objecthub → swift-numberkit

objecthub / swift-numberkit

Licence: Apache-2.0 license
Advanced numeric data types for Swift 5, including BigInt, Rational, and Complex numbers.

Programming Languages

swift
15916 projects
objective c
16641 projects - #2 most used programming language

Projects that are alternatives of or similar to swift-numberkit

BigNumber
A really long long long long long long number in C++
Stars: ✭ 37 (-21.28%)
Mutual labels:  biginteger, bigint
BigInteger
Be limited not by the size of your register but by the bulk of your RAM.
Stars: ✭ 13 (-72.34%)
Mutual labels:  biginteger, bigint
bigint
bigint is a C++ library which can handle Very very Big Integers. It can calculate factorial of 1000000... it can go any big. It may be useful in Competitive Coding and Scientific Calculations which deals with very very large Integers. It can also be used in Decryption process. It has many inbuilt functions which can be very useful.
Stars: ✭ 34 (-27.66%)
Mutual labels:  biginteger, bigint
Swift-MathEagle
A general math framework to make using math easy. Currently supports function solving and optimisation, matrix and vector algebra, complex numbers, big int, big frac, big rational, graphs and general handy extensions and functions.
Stars: ✭ 41 (-12.77%)
Mutual labels:  complex-numbers, biginteger
break infinity.js
A replacement for decimal.js for incremental games who want to deal with very large numbers (bigger in magnitude than 1e308, up to as much as 1e(9e15) ) and want to prioritize speed over accuracy.
Stars: ✭ 145 (+208.51%)
Mutual labels:  numbers, biginteger
Base62
PHP Base62 encoder and decoder for integers and big integers with Laravel 5 support.
Stars: ✭ 16 (-65.96%)
Mutual labels:  biginteger, bigint
as-bignum
Fixed length big numbers for AssemblyScript 🚀
Stars: ✭ 49 (+4.26%)
Mutual labels:  biginteger, bigint
klibcpp
kedixa's Cplusplus Library(timer, multiarray, unsigned_bigint, bigint, rational)
Stars: ✭ 17 (-63.83%)
Mutual labels:  biginteger, bigint
vallang
Generic immutable recursive data representation API targeted at source code models and more.
Stars: ✭ 28 (-40.43%)
Mutual labels:  rational-numbers, biginteger
UInt256
An UInt256 library written in Swift 4
Stars: ✭ 20 (-57.45%)
Mutual labels:  biginteger, bigint
Guide-to-Swift-Numbers-Sample-Code
Xcode Playground Sample Code for the Flight School Guide to Swift Numbers
Stars: ✭ 92 (+95.74%)
Mutual labels:  numbers
range-slider
Customizable slider (range) component for JavaScript with no dependencies
Stars: ✭ 26 (-44.68%)
Mutual labels:  numbers
bra-ket-vue
⟨𝜑|𝜓⟩.vue - a Vue-based visualization of quantum states and operations
Stars: ✭ 28 (-40.43%)
Mutual labels:  complex-numbers
nein-math
NeinMath is playing around with arbitrary precision integers, written in pure managed code, not using any unsafe stuff, and a bit faster than the build-in .NET type for integers with a few thousand bits.
Stars: ✭ 14 (-70.21%)
Mutual labels:  biginteger
elm-format-number
✨Format numbers as pretty strings
Stars: ✭ 56 (+19.15%)
Mutual labels:  numbers
ChangeNumbersJs
Tiny Library for change number from a language in other language.
Stars: ✭ 14 (-70.21%)
Mutual labels:  numbers
ExcelCollectionViewLayout
An Excel-like UICollectionView's layout.
Stars: ✭ 32 (-31.91%)
Mutual labels:  numbers
motivational-numerology
Simple web page to calculate and interpret the numerology numbers derived from your name and birth date (in English, French, and Turkish).
Stars: ✭ 23 (-51.06%)
Mutual labels:  numbers
scientific
Arbitrary-precision floating-point numbers represented using scientific notation
Stars: ✭ 67 (+42.55%)
Mutual labels:  numbers
MathExpressions.NET
➗ Library for parsing math expressions with rational numbers, finding their derivatives and compiling an optimal IL code
Stars: ✭ 63 (+34.04%)
Mutual labels:  rational-numbers

Swift NumberKit

Platforms: macOS, iOS, Linux Language: Swift 5.7 IDE: Xcode 14 Package managers: SwiftPM, Carthage License: Apache

Overview

This is a framework implementing advanced numeric data types for the Swift programming language on macOS, iOS and Linux. Currently, the framework provides three new numeric types, each represented as a struct:

  1. BigInt: arbitrary-precision signed integers
  2. Rational: signed rational numbers
  3. Complex: complex floating-point numbers

Note: So far, with every major version of Swift, Apple decided to change the foundational APIs of the numeric types in Swift significantly and consistently in a backward incompatible way. In order to be more isolated from such changes in future, with Swift 3, I decided to introduce a distinct integer type used in NumberKit based on a new protocol IntegerNumber. All standard numeric integer types implement this protocol. This is now consistent with the usage of protocol FloatingPointNumber for floating point numbers, where there was, so far, never a real, generic enough foundation (and still isn't).

BigInt

BigInt objects are immutable, signed, arbitrary-precision integers that can be used as a drop-in replacement for the existing binary integer types of Swift 5. Struct BigInt defines all the standard arithmetic integer operations and implements the corresponding protocols defined in the standard library.

Rational

Struct Rational<T> defines immutable, rational numbers based on an existing signed integer type T, like Int32, Int64, or BigInt. A rational number is a signed number that can be expressed as the quotient of two integers a and b: a / b.

Complex

Struct Complex<T> defines complex numbers based on an existing floating point type T, like Float or Double. A complex number consists of two components, a real part re and an imaginary part im and is typically written as: re + im * i where i is the imaginary unit.

Requirements

The following technologies are needed to build the components of the Swift NumberKit framework:

Copyright

Author: Matthias Zenger ([email protected])
Copyright © 2016-2023 Matthias Zenger. All rights reserved.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].