I want to return the least integer value greater than or equal to integer division. So I used math.ceil, but can not get the value I want.
package main
import (
    "fmt"
    "math"
)
func main() {
    var pagesize int = 10
    var length  int = 43
    d := float64(length / pagesize)
    page := int(math.Ceil(d))
    fmt.Println(page)
    // output 4 not 5
}
http://golang.org/pkg/math/#Ceil
http://play.golang.org/p/asHta1HkO_
What is wrong? Thanks.
 
     
     
     
    