6 October 2025 6:06:14.545 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 3 3 3 2 0 2 2 3 7 3 7 4 2 0 2 5 5 8 8 6 2 3 3 7 2 9 9 8 9 0 9 9 9 7 9 10 4 9 9 2) Try Z(1:N) = max ( X(1:N), Y(1:N) ) I X(I) Y(I) Z(I) 1 10 4 10 2 10 5 10 3 2 9 9 4 10 6 10 5 6 5 6 6 3 1 3 7 9 2 9 8 7 3 7 9 8 4 8 10 6 0 6 3) Try Z(1:N) = max ( 5, Y(1:N) ) I X(I) Y(I) Z(I) 1 5 6 6 2 5 2 5 3 5 10 10 4 5 3 5 5 5 10 10 6 5 3 5 7 5 6 6 8 5 2 5 9 5 9 9 10 5 5 5 vector_max_test Normal end of execution. 6 October 2025 6:06:14.545 PM