// 解决浮点类型相加精度丢失
function addNum(n1, n2) {
var s1, s2, m;
try {
s1 = n1.toString().split(".")[1].length;
}
catch (e) {
s1 = 0;
}
try {
s2 = n2.toString().split(".")[1].length;
}
catch (e) {
s2 = 0;
}
m = Math.pow(10, Math.max(s1, s2));
return (n1 * m + n2 * m) / m;
}