[Paraview] Paraview handles data different on MacOS
Brad King
brad.king at kitware.com
Thu May 10 10:59:28 EDT 2012
On 5/3/2012 10:37 AM, Michael Jackson wrote:
> Doesn't make sense to me but, hey if it works. Great.
The array contains the value "6.44569e-302" that is outside the
range "float" can hold so the Mac streams library gives up when
parsing. Test with this code:
#include <sstream>
#include <iostream>
int main()
{
std::istringstream is("6.44569e-302");
float f; // double works
if(is >> f)
{
std::cout << f << std::endl;
}
else
{
std::cout << "failed" << std::endl;
}
return 0;
}
-Brad
More information about the ParaView
mailing list