Skip to content

Instantly share code, notes, and snippets.

@piyonishi
Created July 23, 2013 08:37
Show Gist options
  • Save piyonishi/6060838 to your computer and use it in GitHub Desktop.
Save piyonishi/6060838 to your computer and use it in GitHub Desktop.
# 整数を割り算すると、デフォルトで小数点以下が切り捨てになる
12 / 26
#0
float(12) / 26
#0.46153846153846156
12 * 1.0 / 26
#0.46153846153846156
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment