Use Double as the expected type:
private let floatFormatter = FloatingPointFormatStyle<Double>().precision(.significantDigits(1...3))
Topic:
Programming Languages
SubTopic:
Swift
Tags: