John Maddock wrote:
Johan Råde wrote:
Could you check the value of ss.str() after line 105 in legacy_test.cpp?
1.#QNAN -1.#IND 1.#QNAN -1.#QNAN
With MSVC's debug checks enabled the attempt to read from the stream at line 108 results in a debug assertion being triggered and the code aborting: it tries to increment the istream_iterator past the end :-(
Can you check if it is reading b11 that causes problems in line 108: ss >> b1 >> b2 >> b3 >> b4 >> b5 >> b6 >> b7 >> b8 >> b9 >> b10 >> b11; What happens if you change line 105 from ss << " qnan snan nanq nans 1.#IND 1.#QNAN 1.#SNAN"; to (note the space at the end of the string) ss << " qnan snan nanq nans 1.#IND 1.#QNAN 1.#SNAN ";
BTW both VC8 and VC9 express editions are free downloads from MS's web pages.
Changing from -std::numeric_limits<>::whatever() to changesign(whatever) fixes the SSE2 problem with VC8 and VC9 BTW, however this is probably best considered either a compiler bug, or a loophole in the std if this is permitted behaviour.
If I drop the support for signed NaN, then whis will become a non-issue anyway. --Johan