2
3

More than 3 years have passed since last update.

Pythonで浮動小数点数を2進数に変換する方法

Posted at

最近,表題の件で相談を受けることがしばしばありましたので,Pythonのテキストからの抜粋を上げておきます.
 
原理自体はどこの学校でも教わるのですが,実際にプログラムを書くとなると面倒に感じる方もおられると思います.
 
Pythonのmpmathライブラリを使用すると,とても簡単に,しかも高精度で浮動小数点数を2進数表現にすることができます.
 
→抜粋部分(PDF)

2
3
1

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
2
3