MAXFLOAT在Objective-C [英] MAXFLOAT in Objective-C
本文介绍了MAXFLOAT在Objective-C的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
最高持股量为不畏:
的文件math.h 的
#define MAXFLOAT 0x1.fffffep+127f
我有点难过我从来没有注意到这一点。这是什么竟然说什么?我本来期望是这样的:
I'm a little sad I never noticed this before. What's this actually say? I would have expected something like this:
#define MAXFLOAT 0xFFFFFFFF-1
请问这甚至工作?
Would that even work?
推荐答案
0x1.fffffep + 127
为(大约)
1.99999999999999999999998次2 ^ 127。这是一个浮点数,使用指数,以十六进制。
0x1.fffffep+127
is (roughly)
1.99999999999999999999998 times 2^127. It's a floating point number, with an exponent, in hexadecimal.
-
0X
= 16进制 -
1
=数量的整数部分 -
.fffffe
=数小数部分 -
P + 127
=为两三次到第127权力科学记数法
0x
= hex notation1
= integer part of the number.fffffe
= fractional part of the numberp+127
= scientific notation for "times two to the 127th power"
这篇关于MAXFLOAT在Objective-C的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文