首页> 外国专利> Methods and arrangements to correct for double rounding errors when rounding floating point numbers to nearest even

Methods and arrangements to correct for double rounding errors when rounding floating point numbers to nearest even

机译:将浮点数四舍五入到最接近偶数时纠正双舍入错误的方法和装置

摘要

Methods and arrangements to correct for double rounding errors when rounding floating point numbers to nearest even are described. Embodiments include transformations, code, state machines or other logic to perform a floating point operation on one or more floating point numbers of precision P1 in base b, producing positive result res0 of precision greater than precision P1; rounding positive result res0 to precision P1 to the nearest even, producing positive result res1; and rounding the result res1 to precision P2 to the nearest even, where P2 is narrower than P1, producing result res2. The embodiments may also include correcting res2 for double rounding errors. The correcting may include determining that res1 is midway between two consecutive floating point numbers of precision P1, the larger (smaller) being res2, determining that rounding res0 to produce res1 involved rounding up (down), and decrementing (incrementing) the significand of res2 to obtain the corrected result res2′.
机译:描述了在将浮点数四舍五入到最接近偶数时纠正双舍入误差的方法和装置。实施例包括变换,代码,状态机或其他逻辑,以对基数b中的一个或多个精度为P 1 的浮点数执行浮点运算,从而产生正结果res 0 精度大于精度P 1 的>;将正结果res 0 舍入到精度P 1 至最接近的偶数,产生正结果res 1 ;并将结果res 1 舍入到精度P 2 到最接近的偶数,其中P 2 小于P 1 ,生成结果res 2 。实施例还可包括针对双舍入误差校正res 2 。该校正可以包括确定res 1 在两个连续的精度为P 1 的浮点数之间的中间,较大(较小)的是res 2 ,确定要舍入res 0 以产生res 1 涉及到舍入(向下),并递减(递增)res 2 的有效位数以获得校正结果res 2'。

著录项

  • 公开/公告号US8069199B2

    专利类型

  • 公开/公告日2011-11-29

    原文格式PDF

  • 申请/专利权人 MARIUS CORNEA-HASEGAN;

    申请/专利号US20070006145

  • 发明设计人 MARIUS CORNEA-HASEGAN;

    申请日2007-12-31

  • 分类号G06F7/38;G06F7/00;G06F15/00;

  • 国家 US

  • 入库时间 2022-08-21 17:25:48

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号