Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
小さなプログラムを書き、wintel で実行しました。x が double の場合は 3 を取得し、x が long double として定義されている場合は 4 を取得します。これらの型は小数点以下 3 桁または 4 桁までしか正確ではないということですか?
ありがとう
double x = 1; long double f = 0.1; while (x+f-f == x) f /= 10; int precision = 1-log10(f);