LoginSignup
1
1

More than 5 years have passed since last update.

浮動小数点っていったい何なのか具体的に説明

Posted at

コンピュータからみた桁数が大きい数字

  • 0.0000000000000000000000000000000000000001111
  • 111100000000000000000000000000000000000000000

とかはコンピュータにとって非常にだるい。
桁数が大きいからコンピュータとはいえ計算が大変です。

浮動小数点とは

ここで活躍するのが浮動小数点です。
上の2つの数字を下記のように変換させます。

  • $1.111×10^{-46}$
  • $1.111×10^{46}$

46剰という数字は桁数よみまちがえてるかも。。

こうすることで桁数が少なくなってコンピュータにとっても計算がスマートになります。
これを浮動小数点とよぶ。

32ビット浮動小数点とか64ビット浮動小数点があるが、64ビットの方が浮動小数点化したうえでもより大きな桁数を扱えます。

1
1
3

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1