BDouble
public struct BDouble:
ExpressibleByIntegerLiteral,
ExpressibleByFloatLiteral,
CustomStringConvertible,
SignedNumeric,
Comparable,
Hashable,
Sendable
Undocumented
-
Absolute value type for BDouble operations.
Declaration
Swift
public typealias Magnitude = Double -
The absolute magnitude of the rational number as a Double.
Declaration
Swift
public var magnitude: Double
-
Declaration
Swift
public init?<T>(exactly source: T) where T : BinaryInteger -
Inits a BDouble with two Limbs as numerator and denominator
- numerator: The upper part of the fraction as Limbs
- denominator: The lower part of the fraction as Limbs
Returns: A new BDouble
-
Undocumented
-
Undocumented
Declaration
Swift
public init(_ numerator: Int, over denominator: Int) -
Undocumented
Declaration
Swift
public init?(_ numerator: String, over denominator: String) -
Undocumented
Declaration
Swift
public init?(_ nStr: String) -
Undocumented
Declaration
Swift
public init(_ z: Int) -
Undocumented
Declaration
Swift
public init(_ d: Double) -
Declaration
Swift
public init(integerLiteral value: Int) -
Declaration
Swift
public init(floatLiteral value: Double)
-
String representation of the rational number in fraction format.
Declaration
Swift
public var description: String { get } -
returns the current value in a fraction format
Declaration
Swift
public var fractionDescription: 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 } -
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
Declaration
Swift
public func decimalExpansion(precisionAfterComma digits: Int) -> String -
Hash value for BDouble based on sign, numerator, and denominator.
Declaration
Swift
public func hash(into hasher: inout Hasher) -
Returns the size of the BDouble in bits.
Declaration
Swift
public var size: Int { get } -
Returns a formatted human readable string that says how much space (in bytes, kilobytes, megabytes, or gigabytes) the BDouble occupies
Declaration
Swift
public var sizeDescription: String { get } -
Undocumented
Declaration
Swift
public func rawData() -> (sign: Bool, numerator: [UInt64], denominator: [UInt64]) -
Returns true if value is positive.
Declaration
Swift
public func isPositive() -> Bool -
Returns true if value is negative.
Declaration
Swift
public func isNegative() -> Bool -
Returns true if value is zero.
Declaration
Swift
public func isZero() -> Bool -
Reduces the fraction to its simplest form.
Declaration
Swift
public mutating func minimize() -
Rounds to the nearest integer value.
Declaration
Swift
public func rounded() -> BInt
-
Declaration
Swift
public static func + (lhs: BDouble, rhs: BDouble) -> BDouble -
Undocumented
Declaration
Swift
public static func + (lhs: BDouble, rhs: Double) -> BDouble -
Undocumented
Declaration
Swift
public static func + (lhs: Double, rhs: BDouble) -> BDouble -
Declaration
Swift
public static func += (lhs: inout BDouble, rhs: BDouble) -
Undocumented
Declaration
Swift
public static func += (lhs: inout BDouble, rhs: Double)
-
Negates the value by flipping its sign.
Declaration
Swift
public mutating func negate() -
Declaration
Swift
public prefix static func - (n: BDouble) -> BDouble
-
Declaration
Swift
public static func - (lhs: BDouble, rhs: BDouble) -> BDouble -
Undocumented
Declaration
Swift
public static func - (lhs: BDouble, rhs: Double) -> BDouble -
Undocumented
Declaration
Swift
public static func - (lhs: Double, rhs: BDouble) -> BDouble -
Declaration
Swift
public static func -= (lhs: inout BDouble, rhs: BDouble) -
Undocumented
Declaration
Swift
public static func -= (lhs: inout BDouble, rhs: Double)
-
Declaration
Swift
public static func * (lhs: BDouble, rhs: BDouble) -> BDouble -
Undocumented
Declaration
Swift
public static func * (lhs: BDouble, rhs: Double) -> BDouble -
Undocumented
Declaration
Swift
public static func * (lhs: Double, rhs: BDouble) -> BDouble -
Declaration
Swift
public static func *= (lhs: inout BDouble, rhs: BDouble) -
Undocumented
Declaration
Swift
public static func *= (lhs: inout BDouble, rhs: Double)
-
Undocumented
Declaration
Swift
public static func ** (base: BDouble, exponent: Int) -> BDouble
-
Undocumented
Declaration
Swift
public static func / (lhs: BDouble, rhs: BDouble) -> BDouble -
Undocumented
Declaration
Swift
public static func / (lhs: BDouble, rhs: Double) -> BDouble -
Undocumented
Declaration
Swift
public static func / (lhs: Double, rhs: BDouble) -> BDouble
-
Declaration
Swift
public static func == (lhs: BDouble, rhs: BDouble) -> Bool -
Undocumented
Declaration
Swift
public static func == (lhs: BDouble, rhs: Double) -> Bool -
Undocumented
Declaration
Swift
public static func == (lhs: Double, rhs: BDouble) -> Bool -
Undocumented
Declaration
Swift
public static func != (lhs: BDouble, rhs: BDouble) -> Bool -
Undocumented
Declaration
Swift
public static func != (lhs: BDouble, rhs: Double) -> Bool -
Undocumented
Declaration
Swift
public static func != (lhs: Double, rhs: BDouble) -> Bool -
Declaration
Swift
public static func < (lhs: BDouble, rhs: BDouble) -> Bool -
Undocumented
Declaration
Swift
public static func < (lhs: BDouble, rhs: Double) -> Bool -
Undocumented
Declaration
Swift
public static func < (lhs: Double, rhs: BDouble) -> Bool -
Declaration
Swift
public static func > (lhs: BDouble, rhs: BDouble) -> Bool -
Undocumented
Declaration
Swift
public static func > (lhs: BDouble, rhs: Double) -> Bool -
Undocumented
Declaration
Swift
public static func > (lhs: Double, rhs: BDouble) -> Bool -
Declaration
Swift
public static func <= (lhs: BDouble, rhs: BDouble) -> Bool -
Undocumented
Declaration
Swift
public static func <= (lhs: BDouble, rhs: Double) -> Bool -
Undocumented
Declaration
Swift
public static func <= (lhs: Double, rhs: BDouble) -> Bool -
Declaration
Swift
public static func >= (lhs: BDouble, rhs: BDouble) -> Bool -
Undocumented
Declaration
Swift
public static func >= (lhs: BDouble, rhs: Double) -> Bool -
Undocumented
Declaration
Swift
public static func >= (lhs: Double, rhs: BDouble) -> Bool
View on GitHub
Install in Dash