Browse Source

* by default, TExtended80Rec.Mantissa should not return the hidden bit (the binary representation of the data type contains it always

git-svn-id: trunk@39348 -
florian 7 years ago
parent
commit
2406bd052e
1 changed files with 4 additions and 4 deletions
  1. 4 4
      rtl/inc/genmath.inc

+ 4 - 4
rtl/inc/genmath.inc

@@ -1923,13 +1923,13 @@ function FPower10(val: Extended; Power: Longint): Extended;
 {$endif SUPPORT_EXTENDED}
 {$endif SUPPORT_EXTENDED}
 
 
 {$if defined(SUPPORT_EXTENDED) or defined(FPC_SOFT_FPUX80)}
 {$if defined(SUPPORT_EXTENDED) or defined(FPC_SOFT_FPUX80)}
-{$PUSH}
-{$WARN 5024 off : Parameter "$1" not used}
 function TExtended80Rec.Mantissa(IncludeHiddenBit: Boolean = False) : QWord;
 function TExtended80Rec.Mantissa(IncludeHiddenBit: Boolean = False) : QWord;
   begin
   begin
-    Result:=Frac //no hidden bit, the mantissa _is_ the full 64-bit;
+    if IncludeHiddenbit then
+      Result:=Frac
+    else
+      Result:=Frac and $7fffffffffffffff;
   end;
   end;
-{$POP}
 
 
 function TExtended80Rec.Fraction : Extended;
 function TExtended80Rec.Fraction : Extended;
   begin
   begin