This website works better with JavaScript.
Почетна
Помоћ
Пријавите Се
lolengine
/
lol
огледало од
https://github.com/lolengine/lol
Прати
1
Волим
0
Креирај огранак
0
Код
Дискусије
0
Издања
0
Вики
Activity
Преглед изворни кода
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…
Откажи
Сачувај