Revert "#6514 Try to support hexadecimal floating numbers in MathLib::toDoubleNumber"

This reverts commit a73decf7e4.
This commit is contained in:
Daniel Marjamäki 2018-12-01 19:01:51 +01:00
parent 501f99ac5a
commit 2c803a1ead
2 changed files with 0 additions and 4 deletions

View File

@ -567,8 +567,6 @@ double MathLib::toDoubleNumber(const std::string &str)
std::istringstream istr(str);
istr.imbue(std::locale::classic());
double ret;
if (isFloatHex(str))
istr >> std::hexfloat;
istr >> ret;
return ret;
}

View File

@ -370,8 +370,6 @@ private:
ASSERT_EQUALS_DOUBLE(0.0, MathLib::toDoubleNumber("-0.0"), 0.000001);
ASSERT_EQUALS_DOUBLE(0.0, MathLib::toDoubleNumber("+0.0"), 0.000001);
ASSERT_EQUALS_DOUBLE('0', MathLib::toDoubleNumber("'0'"), 0.000001);
ASSERT_EQUALS_DOUBLE(192, MathLib::toDoubleNumber("0x0.3p10"), 0.000001);
ASSERT_EQUALS_DOUBLE(5.42101e-20, MathLib::toDoubleNumber("0x1p-64"), 1e-20);
// verify: string --> double --> string conversion
ASSERT_EQUALS("1.0", MathLib::toString(MathLib::toDoubleNumber("1.0f")));