瀏覽代碼

math: fix tgamma to raise underflow for large negative values

Szabolcs Nagy 11 年之前
父節點
當前提交
cd18dc8525
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      src/math/tgamma.c

+ 1 - 0
src/math/tgamma.c

@@ -137,6 +137,7 @@ double tgamma(double x)
 	/* x =< -184: tgamma(x)=+-0 with underflow */
 	if (absx >= 184) {
 		if (x < 0) {
+			FORCE_EVAL((float)(0x1p-126/x));
 			if (floor(x) * 0.5 == floor(x * 0.5))
 				return 0;
 			return -0.0;