NumericAnnex alternatives and similar libraries
Based on the "Math" category.
Alternatively, view NumericAnnex alternatives based on common mentions on social networks and blogs.
iosMath7.8 0.0 L1 NumericAnnex VS iosMathBeautiful math equation rendering on iOS and MacOS
Euler7.3 3.7 L5 NumericAnnex VS EulerSwift Custom Operators for Mathematical Notation
Metron6.8 0.0 NumericAnnex VS MetronGeometry, simplified.
BigInt6.5 2.7 L4 NumericAnnex VS BigIntArbitrary-precision arithmetic in pure Swift
Expression6.3 0.0 L2 NumericAnnex VS ExpressionA cross-platform Swift library for evaluating mathematical expressions at runtime
SigmaSwiftStatistics6.1 0.0 L5 NumericAnnex VS SigmaSwiftStatisticsA collection of functions for statistical calculation written in Swift.
VectorMath4.8 0.0 L3 NumericAnnex VS VectorMathA Swift library for Mac and iOS that implements common 2D and 3D vector and matrix functions, useful for games or vector-based graphics
SwiftSimplify4.2 0.0 NumericAnnex VS SwiftSimplify🥷 High-performance polyline simplification library - port of simplify.js
Upsurge3.8 0.0 L5 NumericAnnex VS UpsurgeMulti-dimensional Swift math
swift-pons3.7 0.0 L3 NumericAnnex VS swift-ponsProtocol-Oriented Number System in Pure Swift
SwiftMath3.4 0.0 L5 NumericAnnex VS SwiftMath📐 A math framework for Swift. Includes: vectors, matrices, complex numbers, quaternions and polynomials.
Matft2.4 0.0 NumericAnnex VS MatftNumpy-like library in swift. (Multi-dimensional Array, ndarray, matrix and vector library)
Arithmosophi2.1 0.0 L5 NumericAnnex VS ArithmosophiA set of protocols for Arithmetic, Statistics and Logical operations
Swift-MathEagle1.4 0.0 L4 NumericAnnex VS Swift-MathEagleA 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.
Surge0.7 0.0 L5 NumericAnnex VS SurgeSurge has been moved to its own organization on GitHub (@Jounce)
EasyRoot0.3 0.0 NumericAnnex VS EasyRootSwift framework to simplify radicals.
Appwrite - The Open Source Firebase alternative introduces iOS support
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of NumericAnnex or a related project?
NumericAnnex supplements the numeric facilities provided in the Swift standard library.
- The exponentiation operator
**and the compound assignment operator
- Extension methods for
BinaryIntegerexponentiation, square root, cube root, greatest common divisor, and least common multiple.
Math, a protocol for signed numeric types that support elementary functions.
Real, a protocol for floating-point types that support elementary functions and a selection of special functions.
PRNG, a protocol for pseudo-random number generators.
Rational, a value type to represent rational values which supports division by zero.
Complex, a value type to represent complex values in Cartesian form.
Random.Xoroshiro, two reference types implementing efficient pseudo-random number generators.
Note: This project is in the early stages of development and is not production-ready at this time.
NumericAnnex requires Swift 4.1 (
swift-4.1-branch) or Swift 4.2 (
Apple platforms, it also requires the Security framework for cryptographically
secure random bytes.
After NumericAnnex has been cloned or downloaded locally, build the library
using the command
swift build (macOS) or
swift build -Xcc -D_GNU_SOURCE
(Linux). Run tests with the command
swift test (macOS) or
swift test -Xcc -D_GNU_SOURCE (Linux). An Xcode project can be generated with
swift package generate-xcodeproj.
To add the package as a dependency using CocoaPods,
insert the following line in your
pod 'NumericAnnex', '~> 0.1.19'
Swift Package Manager can also be used to add the package as a dependency. See Swift documentation for details.
import NumericAnnex print(2 ** 3) // Prints "8". print(4.0 ** 5.0) // Prints "1024.0". print(Int.cbrt(8)) // Prints "2". print(Double.cbrt(27.0)) // Prints "3.0". var x: Ratio = 1 / 4 // Ratio is a type alias for Rational<Int>. print(x.reciprocal()) // Prints "4". x *= 8 print(x + x) // Prints "4". x = Ratio(Float.phi) // Golden ratio. print(x) // Prints "13573053/8388608". var z: Complex64 = 42 * .i // Complex64 is a type alias for Complex<Float>. print(Complex.sqrt(z)) // Prints "4.58258 + 4.58258i". z = .pi + .i * .log(2 - .sqrt(3)) print(Complex.cos(z).real) // Prints "-2.0".
All public protocols, types, and functions have been carefully documented in the code. See the formatted reference for details.
The project adheres to many design patterns found in the Swift standard library.
Math types provide methods such as
FloatingPoint types provide methods such as
No free functions are declared in this library unless they overload existing
ones in the Swift standard library. Instead, functions such as
tan(_:) are provided as static members. This avoids collisions with C standard
library functions that you may wish to use. It also promotes clarity at the call
site when the result of a complex operation differs from that of its real
Complex128.cbrt(-8) != -2).
- Add more tests, including performance tests
- Design and implement additional methods on
All original work is released under the MIT license. See LICENSE for details.
Portions of the complex square root and elementary transcendental functions use checks for special values adapted from libc++. Code in libc++ is dual-licensed under the MIT and UIUC/NCSA licenses.
*Note that all licence references and agreements mentioned in the NumericAnnex README section above are relevant to that project's source code only.