Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在其他语言中,通常有一个固定的十进制对象可以用来代替 IEEE 浮点/双精度,以帮助保证精度。Objective-C 有类似的东西吗?当我查看时,我发现的只是 NSNumber,它似乎只处理标准的原始类型。我还缺少另一个对象吗?
NSDecimalNumber也许?
NSDecimalNumber
根据这篇文章,有一种Decimal类型不使用 IEEE 浮点表示。
Decimal