AdditiveArithmetic
a + b, a - b, .zero
Numeric
a * b
SignedNumeric
-a (additive inverse)
-a
FloatingPoint
a / b, a < b
BinaryFloatingPoint
Int(a)
seq.sum of all elments.
Jesse ⟩
Floating-point Swift, ulp, and epsilonarrow-up-right
Exploring Swift’s numeric types and protocolsarrow-up-right ⭐️ (slides)
When should you use Decimal instead of Double?arrow-up-right
diploid ⟩ Numeric protocolsarrow-up-right
Sarun ⟩ How to check if String is Number in Swiftarrow-up-right
Andy Bargh ⟩ Swiftarrow-up-right ⟩ The Swift Numeric Data Typesarrow-up-right
Swift ⟩ Numbers and Basic Valuesarrow-up-right ⟩
Global Numeric Functionsarrow-up-right - min(), max(), abs().
Numeric Protocolsarrow-up-right ⟩ Numericarrow-up-right
BinaryInteger: protocol for integers.
BinaryFloatingPoint: protocol for floating-point numbers.
Last updated 3 years ago