Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

168
Visualizações
NSNumberFormatter Handling of Very High Precision Decimals Reduced from Xcode 13

Xcode 12 and below used to be able to handle decimals with many more digits than Xcode 13. The below code on Xcode 12 & 13 produces very different result:

let formatter = NumberFormatter()
formatter.minimumFractionDigits = 1
formatter.maximumFractionDigits = 16
formatter.usesGroupingSeparator = false

formatter.string(from: NSDecimalNumber(string: "1234567890123456.1234567890123456"))
// Xcode 12: "1234567890123456.1234567890123456"
// Xcode 13: "1234567890123460.0"

Interestingly, switching to usesSignificantDigits alleviated the issue, but I'm looking for the behaviour of maximumFractionDigits in my feature instead.

Did Apple reimplemented something that changes this behaviour? What can we do to get back the higher precision of the Xcode 12 formatter?

over 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda