不过,随后则需要考虑正常数字中多出的1位,然后再转换回范围在1到2之间的浮点数。
However, you then need to account for the extra 1-bit in a normalized number, and then convert back to a floating-point number between 1 and 2.
由于无穷大、NaN和0的特殊行为,当应用浮点数时,可能看似无害的转换和优化实际上是不正确的。
Because of the special behavior of infinity, NaN, and 0, certain transformations and optimizations that may appear harmless are actually incorrect when applied to floating point Numbers.
Spring会正确地为“floatList”属性填上浮点数,而不是字符串,因为它能非常聪明地意识到它需要执行类型转换。
Spring will correctly populate the "floatList" property with floats, rather than Strings, as it is smart enough to realize that it needs to perform the type conversion.
现在,价格被从一个字符串转换成了一个浮点类型。
At this point, the price is converted from a string into a float.
现在,价格从一个字符串转换为一个浮点类型。
At this point, the price is converted from a string to a float.
这项技术特别有助于发现使用浮点值、转换率,以及与数据类型相关长度的问题。
This technique can especially help in finding problems with floating-point values, conversion ratios, and lengths associated with data types.
在 64位系统上,整型被转换成 64 位的整型值,单精度的浮点类型被转换成双精度的浮点类型。
On a 64-bit system, integral types are converted to 64-bit integral types, and single precision floating point types are promoted to double precision.
解决方案是将浮点变量的地址强制转换成一个指向整型类型的指针,如下所示。
The solution is to cast the address of the floating point variable to a pointer to an int, which is then de-referenced as shown below.
否则,如果其中一个参数是浮点数,另一个也要转换成浮点数。
Otherwise, if either argument is a floating point number, the other is converted to floating point.
否则,如果其中一个参数是浮点数,另一个也要转换成浮点数。
Otherwise, if either argument is a floating point number, the other is.
从浮点类型到整型类型的转换。
预处理数字符号未曾种类或值;种类或值将在向整数文字量或浮点文字量获胜转换(作为第7阶段的一局部,2.1)尔后获得。
Preprocessing number does not have a type or a value; it acquires both after a successful conversion (as part of translation phase 7, 2.1) to an integral literal token or a floating literal token.
编辑浮点值时,由于要将小数部分从十进制转换为二进制,因此所得的结果可能存在微小误差。
Editing floating-point values can result in minor inaccuracies because of decimal-to-binary conversion of fractional components.
将指定的单精度浮点数的值转换为等效的16位无符号整数。
Converts the value of the specified Unicode character to the equivalent 16-bit unsigned integer.
将指定的单精度浮点数的值转换为等效的64位无符号整数。
Converts the value of the specified Unicode character to the equivalent 64-bit unsigned integer.
将指定的单精度浮点数的值转换为等效的8位带符号整数。
Converts the value of the specified Unicode character to the equivalent 8-bit signed integer.
使用指定之文化特性专属格式资讯,将指定之物件的值转换为双精确度浮点数。
Converts the value of the specified object to an double-precision floating-point number, using the specified culture-specific formatting information.
将指定的布林值转换为相等的单精确度浮点数。
Converts the value of the specified object to a single-precision floating-point number.
将指定的单精度浮点数的值转换为等效的十进制数。
Converts the specified string representation of a number to an equivalent decimal number.
将指定的双精度浮点数的值转换为等效的64位带符号整数。
Converts the value of the specified 64-bit unsigned integer to an equivalent 64-bit signed integer.
将数字的字符串表示形式转换为它的等效单精度浮点数字。
Converts the string representation of a number to its single-precision floating-point number equivalent.
将指定的单精度浮点数的值转换为等效的8位无符号整数。
Converts the value of the specified Unicode character to the equivalent 8-bit unsigned integer.
将指定的单精度浮点数的值转换为等效的16位带符号整数。
Converts the value of the specified Unicode character to the equivalent 16-bit signed integer.
将指定的区域性特定格式的数字的字符串表示形式转换为它的等效双精度浮点数。
Converts the string representation of a number in a specified culture-specific format to its double-precision floating-point number equivalent.
使用指定的区域性特定格式设置信息,将数字的指定字符串表示形式转换为等效的双精度浮点数。
Converts the specified string representation of a number to an equivalent double-precision floating-point number, using the specified culture-specific formatting information.
一个平等比较浮点数和双首先将浮动转换为双,然后比较这两个。
An equality comparison between float and double first converts the float to a double and then compares the two.
当浮点数从一种表示形式转换为另一种表示形式时,该数字的最低有效位数可能稍有变化。
When a floating point number is converted from one representation to another representation, the least significant digits of that number may vary slightly.
将指定之数字的字串表示,转换为相等的双精确度浮点数。
Converts the specified string representation of a number to an equivalent double-precision floating-point number.
将指定的布尔值转换为等效的双精度浮点数。
Converts the specified Boolean value to the equivalent double-precision floating-point number.
您也可以使用固定精度的十进制类型,或者在使用浮点数之前将它们强制转换为固定精度的十进制类型。
You can also use a fixed-precision decimal type, or cast floating-point Numbers to a fixed-precision decimal type before you work with them.
应用推荐