이 웹사이트는 자바스크립트 활성화가 필요합니다.
홈
도움말
로그인
lolengine
/
lol
의 미러
https://github.com/lolengine/lol
보기
1
좋아요
0
포크
0
코드
이슈
0
릴리즈
0
위키
활동
소스 검색
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));
쓰기
미리보기
불러오는 중...
취소
저장