本網站在啟用 JavaScript 的情況下可以運作的更好。
首頁
說明
登入
lolengine
/
lol
镜像来自
https://github.com/lolengine/lol
關注
1
收藏
0
複製
0
程式碼
問題
0
版本發佈
0
Wiki
活動
瀏覽代碼
math: fix an infinite loop in the real number print function.
legacy
Sam Hocevar
sam
13 年之前
父節點
dfdff977c1
當前提交
a949a2cd08
共有
1 個檔案被更改
,包括
6 行新增
和
0 行删除
分割檢視
Diff Options
Show Stats
Download Patch File
Download Diff File
+6
-0
src/real.cpp
+ 6
- 0
src/real.cpp
查看文件
@@ -1274,6 +1274,12 @@ void real::print(int ndigits) const
x = -x;
}
if (!x)
{
printf("0.0\n");
return;
}
/* Normalise x so that mantissa is in [1..9.999] */
/* FIXME: better use int64_t when the cast is implemented */
int exponent = ceil(log10(x));
Write
Preview
Loading…
取消
儲存