We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
go语言的数学操作定义 Arithmetic operators apply to numeric values and yield a result of the same type as the first operand.
所以在go语言里 3/10=0 (3和10是int型) 3.0/10.0=0.3 (3.0和10.0是浮点型) float64(3)/float64(10)=0.3
参考: http://stackoverflow.com/questions/32815400/how-to-perform-division-in-golang
The text was updated successfully, but these errors were encountered:
No branches or pull requests
go语言的数学操作定义
Arithmetic operators apply to numeric values and yield a result of the same type as the first operand.
所以在go语言里
3/10=0 (3和10是int型)
3.0/10.0=0.3 (3.0和10.0是浮点型)
float64(3)/float64(10)=0.3
参考: http://stackoverflow.com/questions/32815400/how-to-perform-division-in-golang
The text was updated successfully, but these errors were encountered: