// QtFloatingPointBug.cpp : Defines the entry point for the console application. // #include #include #include int main(int argc, char* argv[]) { QApplication app(argc, argv); __asm { FNINIT sub esp,2 mov word ptr [esp],037Fh ; ensure precision control is extended, and exception masks set. fldcw [esp] add esp,2 } double first = 2000.0; double second = 2121.0; double third = 3.14159; QString first_s = QLocale::system().toString(first); QString second_s = QLocale::system().toString(second); QString third_s = QLocale::system().toString(third); QPushButton first_pb(QString("2000.0 => ") + first_s); first_pb.resize(100, 30); first_pb.show(); QPushButton second_pb(QString("2121.0 => ") + second_s); second_pb.resize(100, 30); second_pb.show(); QPushButton third_pb(QString("3.14159 => ") + third_s); third_pb.resize(100, 30); third_pb.show(); app.exec(); return 0; }