...
首页> 外文期刊>Electronic Notes in Theoretical Computer Science >Stupid is as Stupid Does: Taking the Square Root of the Square of a Floating-Point Number
【24h】

Stupid is as Stupid Does: Taking the Square Root of the Square of a Floating-Point Number

机译:愚蠢就像愚蠢一样:取浮点数平方的平方根

获取原文
   

获取外文期刊封面封底 >>

       

摘要

Floating-point experts know that mathematical formulas may fail or give imprecise results when implemented in floating-point arithmetic. This article describes an example where, surprisingly, it is absolutely not the case. Indeed, using radix 2 and an unbounded exponent range, the computation of the square root of the square of a floating-point number a is exactly | a | . A consequence is the fact that the floating-point computation of a / ( a 2 + b 2 ) is always in the interval [ ? 1 , 1 ]. This removes the need for a test when calling an arccos or an arcsin on this value. For more guarantees, this property was formally checked using the Coq proof assistant and the Flocq library. The conclusion will give hints on what happens without assumptions and in other radices, where the behavior is very different.
机译:浮点专家知道,以浮点算术实现时,数学公式可能会失败或给出不精确的结果。本文介绍了一个例子,令人惊讶的是,事实并非如此。实际上,使用基数2和无界的指数范围,浮点数a的平方的平方根的计算正好是| |。一个| 。结果是a /(a 2 + b 2)的浮点计算始终在区间[?]中。 1,1]。这样就无需在此值上调用arccos或arcsin时进行测试。为了获得更多保证,已使用Coq证明助手和Flocq库对该属性进行了正式检查。结论将提示在没有假设和其他半径的情况下会发生什么,其中行为是非常不同的。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号