start to translator chinese to English

This commit is contained in:
astaxie
2016-09-13 21:42:49 +08:00
parent 70144f92b6
commit 1819ce9cd0
201 changed files with 12982 additions and 0 deletions

13
en/src/1.2/main.go Normal file
View File

@@ -0,0 +1,13 @@
// 章节 1.2
// $GOPATH/src/mathapp/main.go
package main
import (
"fmt"
"mymath"
)
func main() {
fmt.Printf("Hello, world. Sqrt(2) = %v\n", mymath.Sqrt(2))
}

11
en/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
}