更快的精度比swift更快 [英] More precision than double in swift

查看:136
本文介绍了更快的精度比swift更快的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Swift中提供的浮点是否比 Double 更准确?我知道在C中有 long double ,但我似乎找不到与苹果新的编程语言相当的价值。

Are there are any floating points more accurate than Double available in Swift? I know that in C there is the long double, but I can't seem to find its equivalent in Apple's new programming language.

任何帮助将不胜感激!

推荐答案

是的!有$ code> Float80 ,它存储80位(duh),10字节。您可以像任何其他浮点类型一样使用它。请注意,Swift中有 Float32 Float64 Float80 ,其中 Float32 只是一个类型为 Float Float64 是一个 Double

Yes there is! There is Float80 exactly for that, it stores 80 bits (duh), 10 bytes. You can use it like any other floating point type. Note that there are Float32, Float64 and Float80 in Swift, where Float32 is just a typealias for Float and Float64 is one for Double

这篇关于更快的精度比swift更快的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆