Bug in NSNumberFormatterStyle.SpellOutStyle?

后端 未结 1 1529
灰色年华
灰色年华 2021-01-15 04:54

When I use NSNumberFormatterStyle.SpellOutStyle for larger numbers (not numbers that overflow the type) it seems to break down somewhere in the mid-quadrillions.

<         


        
相关标签:
1条回答
  • 2021-01-15 05:39

    I don't have a solution but I have a guess:

    NSNumberFormatter uses a Double to store the value (53 bits), so your value is too big.

    I suppose it makes the formatter generate an erroneous spelling instead of failing with a real error message: so I'd say yes, it's a bug with NSNumberFormatterStyle.SpellOutStyle, it should not spit out a dummy value when failing.

    0 讨论(0)
提交回复
热议问题