同じライブラリを使用する 2 つのサンプル アプリケーションがありますが、主な違いは、一方が qt を使用し、もう一方がコンソール アプリケーションであることです。
共通ライブラリには、次のテスト コードがあります。
double test = 0.1;
double test2 = atof("2.13134");
double test3 = atof("1,12345");
非 qt アプリケーションを使用する場合の値は次のとおりです。
test = 0.10000000000001
test2 = 2.1323399999999999998
test3 = 1 // This is the expected result using a ',' as delimitation character
しかし、qt アプリケーションでは:
test = 0.10000000000001
test2 = 2 // This is not expected!!!
test3 = 1.1234500000000000001
qt によって、「atof」の動作が変わる場合はありますか?