소스 검색

* Convert int64 to double in more straightforward way.

git-svn-id: trunk@26557 -
sergei 11 년 전
부모
커밋
aadb407e31
1개의 변경된 파일1개의 추가작업 그리고 4개의 파일을 삭제
  1. 1 4
      rtl/inc/genmath.inc

+ 1 - 4
rtl/inc/genmath.inc

@@ -1726,10 +1726,7 @@ function fpc_qword_to_double(q : qword): double; compilerproc;
 {$ifndef FPC_SYSTEM_HAS_INT64_TO_DOUBLE}
 function fpc_int64_to_double(i : int64): double; compilerproc;
   begin
-    if i<0 then
-      result:=-double(qword(-i))
-    else
-      result:=qword(i);
+    result:=dword(i and $ffffffff)+longint(i shr 32)*double(4294967296.0);
   end;
 {$endif FPC_SYSTEM_HAS_INT64_TO_DOUBLE}