Note that [1][0] is column 1, row 0. From the code for Euler_product(), this would give you r21=(su* sv * cw-cu * sw). If you had used [0][1], then you'd end up with r21=cv * sw, r11=cv * cw,...