Auxiliary math routines in Go