...
首页> 外文期刊>C - C++ Users Journal >Fixed-Point Arithmetic Types for C++
【24h】

Fixed-Point Arithmetic Types for C++

机译:C ++的定点算术类型

获取原文
获取原文并翻译 | 示例

摘要

Computers cannot exactly represent the value of fractions such as 8/9, where the divisor is not a multiple of 2. In fact, the value of the integer expression 8/9 is zero, even though the mathematical quantity is much closer to 1. For computations involving fractions, most developers use floatingpoint arithmetic, which approximates the value of 8/9 as the decimal fraction 0.88889, a more sensible and accurate choice than the unintuitive result of the integer expression.
机译:计算机无法精确表示分数的值,例如8/9,其中除数不是2的倍数。事实上,即使数学量非常接近1,整数表达式8/9的值也为零。对于涉及分数的计算,大多数开发人员使用浮点算法,该算法将8/9的值近似为十进制分数0.88889,这是比整数表达式的非直观结果更为明智和准确的选择。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号