computes geometric length of array