Protocolswift-numerics 1.0.3RealModule
RealFunctions
RealFunctions.swift:12protocol RealFunctions : ElementaryFunctions
Browse conforming typesprotocol RealFunctions : ElementaryFunctions
import RealModule
protocol ElementaryFunctions : AdditiveArithmetic
A type that has elementary functions available.
protocol AdditiveArithmetic : Equatable
A type with values that support addition and subtraction.
protocol Equatable
A type that can be compared for value equality.
static func _mulAdd(_ a: Self, _ b: Self, _ c: Self) -> Self
a*b + c, computed either with an FMA or with separate multiply and add.
static func atan2(y: Self, x: Self) -> Self
atan(y/x)
, with sign selected according to the quadrant of (x, y)
.
static func erf(_ x: Self) -> Self
The error function evaluated at x
.
static func erfc(_ x: Self) -> Self
The complimentary error function evaluated at x
.
static func exp10(_ x: Self) -> Self
10^x
static func exp2(_ x: Self) -> Self
2^x
static func gamma(_ x: Self) -> Self
The gamma function Γ(x).
static func hypot(_ x: Self, _ y: Self) -> Self
sqrt(x*x + y*y)
, computed in a manner that avoids spurious overflow or underflow.
static func log10(_ x: Self) -> Self
The base-10 logarithm of x
.
static func log2(_ x: Self) -> Self
The base-2 logarithm of x
.
static func logGamma(_ x: Self) -> Self
The logarithm of the absolute value of the gamma function, log(|Γ(x)|).
static func signGamma(_ x: Self) -> FloatingPointSign
The sign of the gamma function, Γ(x).
protocol Real : AlgebraicField, RealFunctions, FloatingPoint
A type that models the real numbers.