fix floating point emulation in Java and C++, add tests

This commit is contained in:
Jason P. Leasure 2020-10-30 19:12:30 -04:00
parent 1a388cd832
commit 731cc63ae7
34 changed files with 3473 additions and 1115 deletions

View file

@ -50,6 +50,7 @@ private:
bool jbitimplied; ///< Set to \b true if integer bit of 1 is assumed
static double createFloat(bool sign,uintb signif,int4 exp); ///< Create a double given sign, fractional, and exponent
static floatclass extractExpSig(double x,bool *sgn,uintb *signif,int4 *exp);
static bool roundToNearestEven(uintb &signif, int4 lowbitpos);
uintb setFractionalCode(uintb x,uintb code) const; ///< Set the fractional part of an encoded value
uintb setSign(uintb x,bool sign) const; ///< Set the sign bit of an encoded value
uintb setExponentCode(uintb x,uintb code) const; ///< Set the exponent of an encoded value