factored calculations in initialization of C arrays