如果我们回想一下我们一开始讲过的数据对象的种类,浮点数,整数,字符串,它们实际上有相同的行为方式。
If we go back up to the kinds of data objects we started with, floats, ints, strings, they actually behave the same way.
它只是返回一个表示温度的浮点数。
All it does is return a floating point number representing the temperature.
注意浮点乘法没有这样的问题。
Note that floating-point multiplication doesn't have these issues.
最好完全避免使用浮点数比较。
It would be best to try to avoid floating point comparison entirely.
ieee浮点值的格式如图1所示。
The layout of IEEE floating point values is shown in Figure 1.
它缺少浮点和并行处理功能。
注意纵横比和剪贴板的值应为浮点值。
Notice that the aspect ratio and the values for the clipping planes are float values.
ebnf样式的浮点数描述。
为什么需要用单独的宏进行浮点数比较?
Why do you need separate macros for floating point comparisons?
刷新时间的单位为秒,但可能是浮点值。
例如,c编程语言具有整型和浮点类型。
For example, the C programming language has integer and floating-point types.
那将会给我们一个浮点数。
不要用浮点值表示精确值。
还可以使用指数表示浮点数,参见清单8。
Floats can also be expressed using exponents, as shown Listing 8.
浮点运算很少是精确的。
回归测试中最棘手的检查之一是浮点比较。
One of the trickiest checks in regression setups is doing floating point comparisons.
它还首次在芯片中集成了十进制浮点单元。
It also has the first decimal floating-point unit integrated in silicon.
它就给我一个浮点数。
浮点数:一个浮点数。
浮点型数字和长变量类型的定义是有差异的。
There are differences in the definition of floating-point Numbers and long variable types.
但浮点数则不是这样。
简单类型包括字符串、浮点数、整数、枚举等。
Simple types include string, float, integer, enumeration, etc.
根据IEEE浮点标准,它只是值的文本表示。
It is simply a textual representation of the value according to the IEEE floating point standard.
浮点数并不是实数。
如果您读取的浮点数,还有另外需要关注的问题。
If you're reading a floating point number, there are other concerns.
这些工作负荷会占用大量的浮点单元或内存带宽。
These workloads heavily use either the floating-point units or the memory bandwidth.
浮点指令和十进制浮点指令。
Floating-point instructions and decimal floating-point instructions.
坐标值是数字(小数、浮点数等),不是字符串。
The coordinate values are numeric (decimal, float, etc.), not character strings.
浮点数不是精确值,所以使用它们会导致舍入误差。
Floating point Numbers are not exact, and manipulating them will result in rounding errors.
当内核在执行浮点指令时,FPU状态不被保存。
When the kernel is executing floating point instructions, the FPU state is not saved.
应用推荐