Explorar o código

* fixed ldexp() on 16/8-bit CPUs. Among other things, this fixes sin() and cos()
on the i8086.

git-svn-id: trunk@26237 -

nickysn %!s(int64=11) %!d(string=hai) anos
pai
achega
779b92459e
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      rtl/inc/genmath.inc

+ 2 - 2
rtl/inc/genmath.inc

@@ -361,13 +361,13 @@ type
           begin
             {Denormal: result = d*2^(e+54)/2^54}
             inc(N,54);
-            float64(x).high := (float64(x).high and $800FFFFF) or (N shl 20);
+            float64(x).high := (float64(x).high and $800FFFFF) or (longint(N) shl 20);
             ldexp := x/H2_54;
           end;
         end
         else
         begin
-          float64(x).high := (float64(x).high and $800FFFFF) or (N shl 20);
+          float64(x).high := (float64(x).high and $800FFFFF) or (longint(N) shl 20);
           ldexp := x;
         end;
       end;