1package cgo 2 3import ( 4 //#cgo LDFLAGS: -lm 5 //#include <math.h> 6 "C" 7 "math" 8) 9 10// Ncbrt returns the cube root of n. 11func Ncbrt(n int) int { 12 return int(math.Floor(float64(C.cbrt(C.double(n))))) 13} 14