double的数据类型使用sqrt开方比int数据类型使用sqrt开方快,讨教这其中的原因。
解决方案
30
http://en.cppreference.com/w/cpp/numeric/math/sqrt
A set of overloads or a function template accepting an argument of any integral type. Equivalent to 2) (the argument is cast to double).
A set of overloads or a function template accepting an argument of any integral type. Equivalent to 2) (the argument is cast to double).
20
你得对比两种重载形式的汇编代码