浏览代码

Vlib: reduce dynamic fp representation error threshold

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@73165 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 6 年之前
父节点
当前提交
c38390f6a2
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      lib/vector/Vlib/intersect2.c

+ 2 - 2
lib/vector/Vlib/intersect2.c

@@ -123,9 +123,9 @@ static double d_ulp(double a, double b)
     /* unit in the last place (ULP):
      * smallest representable difference
      * shift of the exponent
-     * float: 23, double: 52, middle: 37 */
+     * float: 23, double: 52, middle: 37.5 */
     result = frexp(dmax, &exp);
-    exp -= 23;
+    exp -= 38;
     result = ldexp(result, exp);
 
     return result;