修改目录结构

This commit is contained in:
astaxie
2013-03-21 13:53:40 +08:00
parent 223617939f
commit 385877a5de
5 changed files with 24 additions and 0 deletions

11
ebook/src/1.2/sqrt.go Normal file
View File

@@ -0,0 +1,11 @@
// 章节 1.2
// $GOPATH/src/mymath/sqrt.go
package mymath
func Sqrt(x float64) float64 {
z := 0.0
for i := 0; i < 1000; i++ {
z -= (z*z - x) / (2 * x)
}
return z
}