9 May 2025 9:00:58.978 PM vector_max_test FORTRAN90 version Investigate vectorized MAX operations. TEST01: Does FORTRAN90's MAX function support vector operations? If we want to compute a vector Z whose entries are the maximums of the corresponding entries of X and Y, can we invoke a vector form of the computation instead of using a loop? And can we replace one vector by a scalar constant? 1) We execute the old style code with a loop: I X(I) Y(I) Z(I) 1 1 0 1 2 4 5 5 3 5 7 7 4 10 8 10 5 1 3 3 6 2 1 2 7 8 0 8 8 5 9 9 9 7 9 9 10 8 8 8 2) Try Z(1:N) = max ( X(1:N), Y(1:N) ) I X(I) Y(I) Z(I) 1 1 3 3 2 7 4 7 3 0 3 3 4 9 10 10 5 10 9 10 6 2 6 6 7 1 9 9 8 10 6 10 9 6 2 6 10 10 0 10 3) Try Z(1:N) = max ( 5, Y(1:N) ) I X(I) Y(I) Z(I) 1 5 10 10 2 5 7 7 3 5 5 5 4 5 6 6 5 5 2 5 6 5 9 9 7 5 4 5 8 5 4 5 9 5 7 7 10 5 5 5 vector_max_test Normal end of execution. 9 May 2025 9:00:58.978 PM