Dealing with Floating-Point Precision in Swift

Why Swift’s Double gives you 20.509999999999998 instead of 20.51, and when to reach for Foundation’s Decimal instead.