add 数学

This commit is contained in:
nonstriater
2015-12-08 00:20:18 +08:00
parent 98f0e75717
commit f3c1972dc3
5 changed files with 125 additions and 11 deletions
+1
View File
@@ -162,6 +162,7 @@ double Power(double base, int exponent)
}
```
上面的代码没有考虑: exponent<=0
判断一个浮点数是不是等于0时,不是直接写 base == 0 ,而应该判断它们的差的绝对值是不是小于一个很小的范围