I was playing around with Go, and found this particular interesting code for the abs function in the math package:
http://golang.org/src/pkg/math/abs.go
14 func abs(x float64) float64 { 15 switch { 16 case x < 0: 17 return -x 18 case x == 0: 19 return 0 // return correctly abs(-0) 20 } 21 return x 22 } Why do we need to have the special case of x == 0? What will happen if I delete line 18 and 19?