22 #ifndef COMMON_XPFLOAT_H 23 #define COMMON_XPFLOAT_H 28 #include "common/scummsys.h" 33 uint16 signAndExponent;
38 kSemanticsSANE = kSemanticsMC68881,
45 XPFloat(uint16 signAndExponent, uint64 mantissa);
47 static XPFloat fromDouble(
double value, Semantics semantics = kSemanticsMC68881);
48 static XPFloat fromDoubleBits(uint64 value, Semantics semantics = kSemanticsMC68881);
50 void toDoubleSafe(
double &result,
bool &outOverflowed, Semantics semantics = kSemanticsMC68881)
const;
51 void toDoubleBitsSafe(uint64 &result,
bool &outOverflowed, Semantics semantics = kSemanticsMC68881)
const;
54 double toDouble(Semantics semantics = kSemanticsMC68881)
const;
57 inline XPFloat::XPFloat() : signAndExponent(0), mantissa(0) {}
58 inline XPFloat::XPFloat(uint16 fSignAndExponent, uint64 fMantissa) : signAndExponent(fSignAndExponent), mantissa(fMantissa) {}
Definition: algorithm.h:29