NumericAnnex Reference (100% documented)

View on GitHub

Install in Dash

Functions

The following functions are available globally.

Topics
  • abs(_:)

    Returns the absolute value (magnitude, modulus) of z.

    Declaration

    Swift

    public func abs<T>(_ z: Complex<T>) -> Complex<T>
  • sqrt(_:)

    Returns the square root of z.

    Declaration

    Swift

    public func sqrt<T>(_ z: Complex<T>) -> Complex<T>
  • abs(_:)

    Returns the absolute value (magnitude) of x.

    Declaration

    Swift

    public func abs<T>(_ x: Rational<T>) -> Rational<T>
  • ceil(_:)

    Returns the closest integral value greater than or equal to x.

    Declaration

    Swift

    public func ceil<T>(_ x: Rational<T>) -> Rational<T>
  • floor(_:)

    Returns the closest integral value less than or equal to x.

    Declaration

    Swift

    public func floor<T>(_ x: Rational<T>) -> Rational<T>
  • round(_:)

    Returns the closest integral value; if two values are equally close, returns the one with greater magnitude.

    Declaration

    Swift

    public func round<T>(_ x: Rational<T>) -> Rational<T>
  • trunc(_:)

    Returns the closest integral value with magnitude less than or equal to that of x.

    Declaration

    Swift

    public func trunc<T>(_ x: Rational<T>) -> Rational<T>