exact diagonal mostly vectorized