タグ

関連タグで絞り込む (3)

タグの絞り込みを解除

Cに関するlabochoのブックマーク (2)

  • How do I display the binary representation of a float or double?

    I'd like to display the binary (or hexadecimal) representation of a floating point number. I know how to convert by hand (using the method here), but I'm interested in seeing code samples that do the same. Although I'm particularly interested in the C++ and Java solutions, I wonder if any languages make it particularly easy so I'm making this language agnostic. I'd love to see some solutions in ot

    How do I display the binary representation of a float or double?
    labocho
    labocho 2013/02/08
    float 浮動小数点数のバイナリ表現を得る方法 / union 使えば一発。な、なるほど。
  • 機械学習序曲(仮) > 数値計算の実行速度 - Python, C, Rの比較

    上記の結果より明らかなように,最適化したCに比べても Python の 実行速度のほうがまだ速いという結構驚きな結果が得られました. しかしながら,その Python よりもRのほうがまだ速いという ことも分かりました.特に逆行列の演算に関してはRの圧勝です. 以上の結果のまとめです: 実行速度の速さは R > Python > C の順 CよりPythonの方が15%程度速い しかしながら,特に逆行列の演算に関してはPythonよりRの方が40%程度速い おわりに 以上のベンチマークにより,少なくとも行列演算に関しては CよりもPythonの方が速いということが分かりました. 今回の実験は個人的なプログラム環境の乗り換えのための 判断材料として行なったのですが, 乗り換えに関しては Python の速度性が最大の懸念材料だったので, これで心おきなくCからPythonに乗り換えられます(

    labocho
    labocho 2011/10/31
    下手にCで書くより最適化されたライブラリを使うpython / r のが速いとい話
  • 1