BigDouble

public struct BigDouble:
    ExpressibleByIntegerLiteral,
    ExpressibleByFloatLiteral,
    CustomStringConvertible,
    SignedNumeric,
    Comparable,
    Hashable,
    Strideable

Undocumented

Internal data

Initializers

Descriptions

  • returns the current value in a fraction format

    Declaration

    Swift

    public var description: String { get }
  • returns the current value in a fraction format

    Declaration

    Swift

    public var fractionDescription: String { get }
  • Undocumented

    Declaration

    Swift

    public var locale: Locale
  • returns the current value in scientific notation

    Declaration

    Swift

    public var scientificDescription: String { get }
  • the global percision for all newly created values

    Declaration

    Swift

    public static var precision: Int { get set }
  • the precision for the current value

    Declaration

    Swift

    public var precision: Int { get set }
  • Determines wether to use radians or degrees when using trigonometric functions

    This method acts as a proxy for the global radians setting

    Declaration

    Swift

    public var radians: Bool { get set }
  • The global setting for wether to use radians or degrees when using trigonometric functions

    Declaration

    Swift

    public static var radians: Bool
  • returns the current value in decimal format with the current precision

    Declaration

    Swift

    public var decimalDescription: String { get }
  • Returns the current value in decimal format (always with a decimal point).

    Declaration

    Swift

    public func decimalExpansion(precisionAfterDecimalPoint precision: Int, rounded: Bool = true) -> String

    Parameters

    precision

    the precision after the decimal point

    rounded

    whether or not the return value’s last digit will be rounded up

  • Hashable

    Declaration

    Swift

    public func hash(into hasher: inout Hasher)
  • Stride

    Declaration

    Swift

    public typealias Stride = BigDouble
  • Similar to + operator

    Declaration

    Swift

    public func advanced(by n: BigDouble) -> BigDouble
  • Returns the value that is offset the specified distance from self.

    Declaration

    Swift

    public func distance(to other: BigDouble) -> BigDouble
  • Returns the size of the BigDouble in bits.

    Declaration

    Swift

    public var size: Int { get }
  • Returns a formated human readable string that says how much space (in bytes, kilobytes, megabytes, or gigabytes) the BigDouble occupies

    Declaration

    Swift

    public var sizeDescription: String { get }
  • Undocumented

    Declaration

    Swift

    public func rawData() -> (sign: Bool, numerator: [UInt64], denominator: [UInt64])
  • Declaration

    Swift

    public func isPositive() -> Bool

    Return Value

    True if positive, False otherwise

  • Declaration

    Swift

    public func isNegative() -> Bool

    Return Value

    True if negative, False otherwise

  • Declaration

    Swift

    public func isZero() -> Bool

    Return Value

    True if 0, False otherwise

  • Undocumented

    Declaration

    Swift

    public mutating func minimize()
  • If the right side of the decimal is greater than 0.5 then it will round up (ceil), otherwise round down (floor) to the nearest BigNumber

    Declaration

    Swift

    public func rounded() -> BigInt
  • The power of 1/root

    Warning

    This may take a while. This is only precise up until precision. When comparing results after this function use nearlyEqual`

    Declaration

    Swift

    public func nthroot(_ root: Int) -> BigDouble?
  • The square root

    Warning

    This may take a while. This is only precise up until precision. When comparing results after this function use nearlyEqual`

    Declaration

    Swift

    public func squareRoot() -> BigDouble?
  • Returns BigNumber’s value as an integer. Conversion only works when self has only one limb that’s within the range of the type “Int”.

    Declaration

    Swift

    public func asDouble(precision: Int = 10) -> Double?

BigDouble Addition

  • Undocumented

    Declaration

    Swift

    public static func + (lhs: BigDouble, rhs: BigDouble) -> BigDouble
  • Undocumented

    Declaration

    Swift

    public static func + (lhs: BigDouble, rhs: Double) -> BigDouble
  • Undocumented

    Declaration

    Swift

    public static func + (lhs: Double, rhs: BigDouble) -> BigDouble
  • Undocumented

    Declaration

    Swift

    public static func + (lhs: BigDouble, rhs: BigInt) -> BigDouble
  • Undocumented

    Declaration

    Swift

    public static func + (lhs: BigInt, rhs: BigDouble) -> BigDouble
  • Undocumented

    Declaration

    Swift

    public static func += (lhs: inout BigDouble, rhs: BigDouble)
  • Undocumented

    Declaration

    Swift

    public static func += (lhs: inout BigDouble, rhs: Double)

BigDouble Negation

  • makes the current value negative

    Declaration

    Swift

    public mutating func negate()
  • Undocumented

    Declaration

    Swift

    public prefix static func - (n: BigDouble) -> BigDouble

BigDouble Subtraction

  • Undocumented

    Declaration

    Swift

    public static func - (lhs: BigDouble, rhs: BigDouble) -> BigDouble
  • Undocumented

    Declaration

    Swift

    public static func - (lhs: BigDouble, rhs: Double) -> BigDouble
  • Undocumented

    Declaration

    Swift

    public static func - (lhs: Double, rhs: BigDouble) -> BigDouble
  • Undocumented

    Declaration

    Swift

    public static func - (lhs: BigDouble, rhs: BigInt) -> BigDouble
  • Undocumented

    Declaration

    Swift

    public static func -= (lhs: inout BigDouble, rhs: BigDouble)
  • Undocumented

    Declaration

    Swift

    public static func -= (lhs: inout BigDouble, rhs: Double)

BigDouble Multiplication

  • Undocumented

    Declaration

    Swift

    public static func * (lhs: BigDouble, rhs: BigDouble) -> BigDouble
  • Undocumented

    Declaration

    Swift

    public static func * (lhs: BigDouble, rhs: Double) -> BigDouble
  • Undocumented

    Declaration

    Swift

    public static func * (lhs: Double, rhs: BigDouble) -> BigDouble
  • Undocumented

    Declaration

    Swift

    public static func * (lhs: BigDouble, rhs: BigInt) -> BigDouble
  • Undocumented

    Declaration

    Swift

    public static func * (lhs: BigInt, rhs: BigDouble) -> BigDouble
  • Undocumented

    Declaration

    Swift

    public static func *= (lhs: inout BigDouble, rhs: BigDouble)
  • Undocumented

    Declaration

    Swift

    public static func *= (lhs: inout BigDouble, rhs: Double)

BigDouble Exponentiation

BigDouble Division

  • Quick division (using defined precision by default for better performances)

    Declaration

    Swift

    public static func / (lhs: BigDouble, rhs: BigDouble) -> BigDouble
  • Undocumented

    Declaration

    Swift

    public static func / (lhs: BigDouble, rhs: Double) -> BigDouble
  • Undocumented

    Declaration

    Swift

    public static func / (lhs: BigDouble, rhs: BigInt) -> BigDouble
  • Undocumented

    Declaration

    Swift

    public static func / (lhs: Double, rhs: BigDouble) -> BigDouble

BigDouble Comparing