注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
Perl で、浮動小数点数の整数化 (小数点以下の切り捨て) をやる場合、 int() を常用していたけど、どう... Perl で、浮動小数点数の整数化 (小数点以下の切り捨て) をやる場合、 int() を常用していたけど、どうやら、これは基本的に推奨されてないということを、今更ながら知る。 これって常識? % perldoc -f int int EXPR int Returns the integer portion of EXPR. If EXPR is omitted, uses $_. You should not use this function for rounding: one because it truncates towards 0, and two because machine representations of floating point numbers can sometimes produce counterintu- itive results. For exam
2016/02/10 リンク