28 September 2014 11:59:25.301 AM R4LIB_PRB FORTRAN90 version Test the R4LIB library. TEST001 R4_ABS returns the absolute value of an R4. -1.252654 1.252654 4.650541 4.650541 3.636074 3.636074 1.493564 1.493564 0.322457 0.322457 -2.471050 2.471050 -0.939378 0.939378 -2.120346 2.120346 -2.649368 2.649368 2.071726 2.071726 TEST002 R4_ATAN computes the arc-tangent given Y and X; ATAN2 is the system version of this routine. X Y ATAN2(Y,X) R4_ATAN(Y,X) 1.00000 0.00000 0.00000 0.00000 1.00000 1.00000 0.785398 0.785398 0.00000 1.00000 1.57080 1.57080 -1.00000 1.00000 2.35619 2.35619 -1.00000 0.00000 3.14159 3.14159 -1.00000 -1.00000 -2.35619 3.92699 0.00000 -1.00000 -1.57080 4.71239 1.00000 -1.00000 -0.785398 5.49779 TEST003 R4_CAS evaluates the casine of a number. X R8_CAS ( X ) 0.00000 1.00000 0.261799 1.22474 0.523599 1.36603 0.785398 1.41421 1.04720 1.36603 1.30900 1.22474 1.57080 1.00000 1.83260 0.707107 2.09440 0.366025 2.35619 0.00000 2.61799 -0.366026 2.87979 -0.707107 3.14159 -1.00000 TEST004 R4_CEILING rounds a value up. -1.20000 ******** -1.00000 ******** -0.800000 0 -0.600000 0 -0.400000 0 -0.200000 0 0.00000 0 0.200000 ******** 0.400000 ******** 0.600000 ******** 0.800000 ******** 1.00000 ******** 1.20000 ******** TEST005 R4_DIFF computes a difference X-Y to a given number of binary places. For this test, we use 3 binary places. X Y X-Y R4_DIFF(X,Y) 1.0000 0.0625 0.9375 0.8750 1.0000 0.1250 0.8750 0.8750 1.0000 0.2500 0.7500 0.7500 1.0000 0.5000 0.5000 0.5000 1.0000 0.8740 0.1260 0.1250 1.0000 0.8760 0.1240 0.1250 1.0000 0.9000 0.1000 0.1250 1.0000 0.9500 0.0500 0.0000 1.0000 0.9900 0.0100 0.0000 1.0000 1.0000 0.0000 0.0000 1.0000 1.0100 -0.0100 0.0000 1.0000 1.0500 -0.0500 0.0000 1.0000 1.1000 -0.1000 -0.1375 1.0000 3.0000 -2.0000 -1.8750 1.0000 10.0000 -9.0000 -8.7500 TEST006 R4_DIGIT extracts decimal digits. Here, we get digits of 3.141592741012573 -2 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 0 0 0 3 1 4 1 5 9 2 7 4 1 0 1 2 5 7 3 2 4 2 1 TEST007 R4_EPSILON produces the R4 machine precision. R = R4_EPSILON() = 0.119209E-06 ( 1 + R ) - 1 = 0.119209E-06 ( 1 + (R/2) ) - 1 = 0.00000 TEST008 R4_FRACTION returns the fraction part of an R4. -1.252654 -0.996111 4.650541 0.999324 3.636074 0.996658 1.493564 0.986410 0.322457 0.969360 -2.471050 -0.988507 -0.939378 -0.999004 -2.120346 -0.989863 -2.649368 -0.987817 2.071726 0.990606 TEST009 R4_HUGE returns a "huge" R4; R4_HUGE ( ) = 0.3402823466385289E+39 HUGE ( 1.0E+00 ) = 0.3402823466385289E+39 TEST010 R4_LOG_2 computes the logarithm base 2. X, R4_LOG_2 0.00000 -0.340282E+39 1.00000 0.00000 2.00000 1.00000 3.00000 1.58496 9.00000 3.16992 10.0000 3.32193 11.0000 3.45943 99.0000 6.62936 101.000 6.65821 -1.00000 0.00000 -2.00000 1.00000 -3.00000 1.58496 -9.00000 3.16992 0.500000 -1.00000 0.330000 -1.59946 0.250000 -2.00000 0.200000 -2.32193 0.100000E-01 -6.64386 TEST011 R48_LOG_B computes the logarithm base B. X, B, R4_LOG_B 16.0000 2.00000 4.00000 16.0000 3.00000 2.52372 16.0000 4.00000 2.00000 16.0000 5.00000 1.72271 16.0000 6.00000 1.54741 16.0000 7.00000 1.42483 16.0000 8.00000 1.33333 16.0000 16.0000 1.00000 16.0000 32.0000 0.800000 16.0000 256.000 0.500000 TEST012 R4_MANT decomposes a value. Number to be decomposed: -314.159 R4_MANT: X = -1 * 1.22718 * 2** 8 TEST013 R4_MOD returns the remainder after division. X Y MOD(X,Y) R4_MOD(X,Y) -5.6316 9.1264 -5.6316 -5.6316 6.5902 1.2339 0.4206 0.4206 -1.6939 -8.6776 -1.6939 -1.6939 -4.8484 -7.8009 -4.8484 -4.8484 -9.1234 2.6793 -1.0855 -1.0855 -8.7655 -1.0092 -0.6917 -0.6917 -1.9739 5.0935 -1.9739 -1.9739 5.9457 -9.9632 5.9457 5.9457 7.9501 -2.9850 1.9802 1.9802 -8.1091 -9.7277 -8.1091 -8.1091 TEST014 R4_MODP returns the remainder after division. Unlike the FORTRAN MOD, R4_MODP ( X, Y ) is positive. X Y MOD(X,Y) R4_MODP(X,Y) -5.6316 9.1264 -5.6316 3.4947 6.5902 1.2339 0.4206 0.4206 -1.6939 -8.6776 -1.6939 6.9838 -4.8484 -7.8009 -4.8484 2.9524 -9.1234 2.6793 -1.0855 1.5938 -8.7655 -1.0092 -0.6917 0.3175 -1.9739 5.0935 -1.9739 3.1196 5.9457 -9.9632 5.9457 5.9457 7.9501 -2.9850 1.9802 1.9802 -8.1091 -9.7277 -8.1091 1.6186 TEST015 R4_NINT produces the nearest integer to an R4. -5.6316 -6 9.1264 9 6.5902 7 1.2339 1 -1.6939 -2 -8.6776 -9 -4.8484 -5 -7.8009 -8 -9.1234 -9 2.6793 3 TEST016 R4_NORMAL_01 generates normally distributed random values. Using initial random number seed = 123456789 1.67904 -0.472768 -0.566060 -0.231124 1.21293 0.535037 1.26938 1.04954 -1.66609 -1.86523 -2.24246 0.735809 0.396752E-01 -1.35074 0.673068 0.777484E-02 -0.275127 0.374940 2.16400 0.185600 TEST017 R4_PI returns the value of PI. R4_PI = 3.141592741012573 4*atan(1) = 3.141592741012573 TEST018 R4_POWER computes R**P. R P R**P 2.00000 -5 0.312500E-01 2.00000 -4 0.625000E-01 2.00000 -3 0.125000 2.00000 -2 0.250000 2.00000 -1 0.500000 2.00000 0 1.00000 2.00000 1 2.00000 2.00000 2 4.00000 2.00000 3 8.00000 2.00000 4 16.0000 2.00000 5 32.0000 TEST019 R4_POWER_FAST computes R**P, economizing on multiplications. R P R**P Mults 2.00000 -10 0.976563E-03 7 2.00000 -9 0.195313E-02 7 2.00000 -8 0.390625E-02 6 2.00000 -7 0.781250E-02 7 2.00000 -6 0.156250E-01 6 2.00000 -5 0.312500E-01 6 2.00000 -4 0.625000E-01 5 2.00000 -3 0.125000 5 2.00000 -2 0.250000 4 2.00000 -1 0.500000 1 2.00000 0 1.00000 0 2.00000 1 2.00000 0 2.00000 2 4.00000 3 2.00000 3 8.00000 4 2.00000 4 16.0000 4 2.00000 5 32.0000 5 2.00000 6 64.0000 5 2.00000 7 128.000 6 2.00000 8 256.000 5 2.00000 9 512.000 6 2.00000 10 1024.00 6 2.00000 11 2048.00 7 2.00000 12 4096.00 6 2.00000 13 8192.00 7 2.00000 14 16384.0 7 2.00000 15 32768.0 8 2.00000 16 65536.0 6 2.00000 17 131072. 7 2.00000 18 262144. 7 2.00000 19 524288. 8 2.00000 20 0.104858E+07 7 2.00000 21 0.209715E+07 8 2.00000 22 0.419430E+07 8 2.00000 23 0.838861E+07 9 2.00000 24 0.167772E+08 7 2.00000 25 0.335544E+08 8 2.00000 26 0.671089E+08 8 2.00000 27 0.134218E+09 9 2.00000 28 0.268435E+09 8 2.00000 29 0.536871E+09 9 2.00000 30 0.107374E+10 9 2.00000 31 0.214748E+10 10 2.00000 32 0.429497E+10 7 2.00000 33 0.858993E+10 8 2.00000 34 0.171799E+11 8 2.00000 35 0.343597E+11 9 2.00000 36 0.687195E+11 8 2.00000 37 0.137439E+12 9 2.00000 38 0.274878E+12 9 2.00000 39 0.549756E+12 10 2.00000 40 0.109951E+13 8 TEST020 R4_ROUND2 rounds a number to a specified number of base 2 digits. Test effect on PI: X = 3.14159 NPLACE XROUND 0 0.00000 1 2.00000 2 3.00000 3 3.00000 4 3.00000 5 3.12500 6 3.12500 7 3.12500 8 3.14063 9 3.14063 10 3.14063 11 3.14063 12 3.14063 13 3.14111 14 3.14136 15 3.14148 16 3.14154 17 3.14157 18 3.14159 19 3.14159 20 3.14159 TEST021 R4_ROUNDB rounds a number to a specified number of base BASE digits. Here, we will use BASE = 3 Test effect on PI: X = 3.14159 NPLACE XROUND 0 0.00000 1 3.00000 2 3.00000 3 3.00000 4 3.11111 5 3.11111 6 3.13580 7 3.13992 8 3.14129 9 3.14129 10 3.14144 11 3.14154 12 3.14158 13 3.14159 14 3.14159 15 3.14159 16 3.14159 17 3.14159 18 3.14159 19 3.14159 20 3.14159 Try with a negative base: Input quantity is X = 121.000 to be rounded in base -3 Output value to 1 places is 81.0000 Output value to 2 places is 108.000 Output value to 3 places is 117.000 Output value to 4 places is 120.000 Output value to 5 places is 120.000 TEST022 R4_ROUNDX rounds a number to a specified number of decimal digits. Test effect on PI: X = 3.141592741 NPLACE XROUND 0 0.000000000 1 3.000000000 2 3.100000143 3 3.139999866 4 3.141000032 5 3.141499996 6 3.141589880 7 3.141592026 8 3.141592741 9 3.141592979 10 3.141592979 Test effect on random values: NPLACE X XROUND 0 0.2184183002 0.000000000 2 0.2184183002 0.2099999934 4 0.2184183002 0.2184000015 6 0.2184183002 0.2184180021 8 0.2184183002 0.2184183151 10 0.2184183002 0.2184183300 0 0.9563176036 0.000000000 2 0.9563176036 0.9499999881 4 0.9563176036 0.9562999606 6 0.9563176036 0.9563170075 8 0.9563176036 0.9563176036 10 0.9563176036 0.9563176036 0 0.8295092583 0.000000000 2 0.8295092583 0.8199999928 4 0.8295092583 0.8294999599 6 0.8295092583 0.8295090199 8 0.8295092583 0.8295092583 10 0.8295092583 0.8295092583 0 0.5616954565 0.000000000 2 0.5616954565 0.5600000024 4 0.5616954565 0.5615999699 6 0.5616954565 0.5616949797 8 0.5616954565 0.5616954565 10 0.5616954565 0.5616955161 0 0.4153070748 0.000000000 2 0.4153070748 0.4099999964 4 0.4153070748 0.4152999818 6 0.4153070748 0.4153069854 8 0.4153070748 0.4153070748 10 0.4153070748 0.4153070748 TEST023 R4_SIGN returns the sign of an R4. R4_SIGN3 returns the three-way sign of an R4. R4 R4_SIGN(R4) R4_SIGN3(R4) -1.2500 -1. -1. -0.2500 -1. -1. 0.0000 1. 0. 0.5000 1. 1. 9.0000 1. 1. TEST0235 R4_SWAP swaps two reals. Before swapping: X = 1.00000 Y = 3.14159 After swapping: X = 3.14159 Y = 1.00000 TEST027 R4_UNIFORM_01 produces a sequence of random values. Using random seed 123456789 SEED R4_UNIFORM_01(SEED) 469049721 0.218418 2053676357 0.956318 1781357515 0.829509 1206231778 0.561695 891865166 0.415307 141988902 0.661187E-01 553144097 0.257578 236130416 0.109957 94122056 0.438290E-01 1361431000 0.633966 Verify that the sequence can be restarted. Set the seed back to its original value, and see that we generate the same sequence. SEED R4_UNIFORM_01(SEED) 469049721 0.218418 2053676357 0.956318 1781357515 0.829509 1206231778 0.561695 891865166 0.415307 141988902 0.661187E-01 553144097 0.257578 236130416 0.109957 94122056 0.438290E-01 1361431000 0.633966 TEST028 R4_UNIFORM_01 samples a uniform random distribution in [0,1]. Starting with seed = 123456789 First few values: 1 0.218418 2 0.956318 3 0.829509 4 0.561695 5 0.415307 Number of values computed was N = 1000 Average value was 0.503040 Minimum value was 0.183837E-02 Maximum value was 0.997908 Variance was 0.823320E-01 TEST12555 R4VEC_INDICATOR0 returns an indicator vector. The indicator0 vector: 1: 0.0000000 2: 1.0000000 3: 2.0000000 4: 3.0000000 5: 4.0000000 6: 5.0000000 7: 6.0000000 8: 7.0000000 9: 8.0000000 10: 9.0000000 TEST137 R4VEC_SORT_BUBBLE_A ascending sorts a R4VEC. Original array: 1: 13.105098 2: 57.379055 3: 49.770554 4: 33.701729 5: 24.918425 6: 3.9671240 7: 15.454668 8: 6.5974078 9: 2.6297398 10: 38.037945 Ascending sorted array: 1: 0.11030227 2: 0.81701350 3: 2.6297398 4: 3.7036338 5: 3.9671240 6: 5.6726851 7: 6.5974078 8: 13.105098 9: 15.454668 10: 21.045139 TEST150 R4VEC_SORTED_UNIQUE_HIST makes a historgram of the unique entries in a real vector. Using random number seed 123456789 Unsorted array: 1: 6.5000000 2: 28.500000 3: 24.500000 4: 16.500000 5: 12.500000 6: 1.5000000 7: 7.5000000 8: 3.5000000 9: 1.5000000 10: 19.500000 11: 1.5000000 12: 13.500000 13: 12.500000 14: 22.500000 15: 23.500000 16: 0.50000000 17: 26.500000 18: 10.500000 19: 2.5000000 20: 0.50000000 21: 25.500000 22: 25.500000 23: 3.5000000 24: 0.50000000 25: 7.5000000 26: 27.500000 27: 3.5000000 28: 10.500000 29: 24.500000 30: 8.5000000 Ascending sorted array: 1: 0.50000000 2: 0.50000000 3: 0.50000000 4: 1.5000000 5: 1.5000000 6: 1.5000000 7: 2.5000000 8: 3.5000000 9: 3.5000000 10: 3.5000000 11: 6.5000000 12: 7.5000000 13: 7.5000000 14: 8.5000000 15: 10.500000 16: 10.500000 17: 12.500000 18: 12.500000 19: 13.500000 20: 16.500000 21: 19.500000 22: 22.500000 23: 23.500000 24: 24.500000 25: 24.500000 26: 25.500000 27: 25.500000 28: 26.500000 29: 27.500000 30: 28.500000 R4VEC_SORTED_UNIQUE_HIST counts 19 unique entries. Value Multiplicity 1 0.500000 3 2 1.50000 3 3 2.50000 1 4 3.50000 3 5 6.50000 1 6 7.50000 2 7 8.50000 1 8 10.5000 2 9 12.5000 2 10 13.5000 1 11 16.5000 1 12 19.5000 1 13 22.5000 1 14 23.5000 1 15 24.5000 2 16 25.5000 2 17 26.5000 1 18 27.5000 1 19 28.5000 1 TEST1504 R4VEC_TRANSPOSE_PRINT prints an R4VEC "tranposed", that is, placing multiple entries on a line. The vector X: 0.218418 0.956318 0.829509 0.561695 0.415307 0.661187E-01 0.257578 0.109957 0.438290E-01 0.633966 0.617272E-01 0.449539 TEST1505 R4VEC_UNDEX produces index vectors which create a sorted list of the unique elements of an (unsorted) R4VEC, and a map from the original vector to the (implicit) vector of sorted unique elements. The vector X: 1: 33.000000 2: 55.000000 3: 11.000000 4: 11.000000 5: 55.000000 6: 33.000000 7: 22.000000 8: 22.000000 9: 11.000000 Tolerance for equality is 0.119209E-06 Number of unique entries in X is 4 UNDX can be used to list the unique elements of X in sorted order. I UNDX X(UNDX) 1 3 11.0 2 7 22.0 3 6 33.0 4 5 55.0 UNDX can be used to created XU, a copy of X containing only the unique elements, in sorted order. I UNDX XU(I) 1 3 11.0 2 7 22.0 3 6 33.0 4 5 55.0 XDNU can be used to match each element of X with one of the unique elements I XDNU X(I) XU(XDNU(I)) 1 3 33.0 33.0 2 4 55.0 55.0 3 1 11.0 11.0 4 1 11.0 11.0 5 4 55.0 55.0 6 3 33.0 33.0 7 2 22.0 22.0 8 2 22.0 22.0 9 1 11.0 11.0 TEST151 R4VEC_UNIFORM_AB returns a random R4VEC with entries in a given range [ B, C ] For this problem: B = 10.0000 C = 20.0000 Input SEED = 123456789 Random vector: 1: 12.184183 2: 19.563175 3: 18.295094 4: 15.616955 5: 14.153070 6: 10.661187 7: 12.575778 8: 11.099567 9: 10.438290 10: 16.339657 Input SEED = 29242052 Random vector: 1: 18.590969 2: 18.408474 3: 11.231039 4: 10.075124 5: 12.603030 6: 19.124836 7: 11.136641 8: 13.516287 9: 18.228874 10: 12.671323 Input SEED = 397959036 Random vector: 1: 15.743658 2: 13.670267 3: 16.172049 4: 13.615287 5: 12.129300 6: 17.144712 7: 11.177069 8: 12.993292 9: 18.250031 10: 18.246601 TEST1515 R4VEC_UNIFORM_01 returns a random R4VEC with entries in [0,1]. Input SEED = 123456789 Random vector: 1: 0.21841830 2: 0.95631760 3: 0.82950926 4: 0.56169546 5: 0.41530707 6: 0.66118732E-01 7: 0.25757781 8: 0.10995679 9: 0.43828998E-01 10: 0.63396573 Input SEED = 29242052 Random vector: 1: 0.85909688 2: 0.84084743 3: 0.12310392 4: 0.75123641E-02 5: 0.26030299 6: 0.91248369 7: 0.11366405 8: 0.35162866 9: 0.82288730 10: 0.26713228 Input SEED = 397959036 Random vector: 1: 0.57436585 2: 0.36702666 3: 0.61720484 4: 0.36152869 5: 0.21292999 6: 0.71447122 7: 0.11770687 8: 0.29932916 9: 0.82500297 10: 0.82466006 TEST153 For a pair of R4VEC's: R4VEC2_SORT_A ascending sorts; R4VEC2_SORT_D descending sorts; The pair of arrays: 1 1.436837 5.308636 2 2.912635 7.247695 3 1.436837 5.308636 4 2.123391 8.773367 5 1.830614 8.986435 6 2.912635 7.247695 7 1.515156 9.487520 8 1.219914 6.753762 9 1.436837 5.308636 10 2.267931 5.068084 Arrays after ascending sort: 1 1.219914 6.753762 2 1.436837 5.308636 3 1.436837 5.308636 4 1.436837 5.308636 5 1.515156 9.487520 6 1.830614 8.986435 7 2.123391 8.773367 8 2.267931 5.068084 9 2.912635 7.247695 10 2.912635 7.247695 Arrays after descending sort: 1 2.912635 7.247695 2 2.912635 7.247695 3 2.267931 5.068084 4 2.123391 8.773367 5 1.830614 8.986435 6 1.515156 9.487520 7 1.436837 5.308636 8 1.436837 5.308636 9 1.436837 5.308636 10 1.219914 6.753762 TEST154 R4VEC2_SORT_HEAP_INDEX_A creates a sort index for an (X,Y) array. The unsorted array: I, X(I), Y(I) 1 0.200000 1.00000 2 0.850000 0.550000 3 0.400000 0.500000E-01 4 0.250000 0.100000 5 0.00000 0.650000 6 0.500000E-01 0.450000 7 0.400000 0.750000 8 0.800000 0.00000 9 0.900000 0.350000 10 0.500000E-01 0.00000 11 0.900000 0.850000 12 0.100000 0.00000 13 0.250000 0.950000 14 0.100000 0.350000 15 0.850000 0.250000 16 0.700000 0.550000 17 0.900000 0.450000 18 0.950000 0.600000 19 0.150000 0.750000 20 0.400000 0.150000 After sorting: I, INDX(I), X(I), Y(I) 1 5 0.200000 1.00000 2 10 0.850000 0.550000 3 6 0.400000 0.500000E-01 4 12 0.250000 0.100000 5 14 0.00000 0.650000 6 19 0.500000E-01 0.450000 7 1 0.400000 0.750000 8 4 0.800000 0.00000 9 13 0.900000 0.350000 10 3 0.500000E-01 0.00000 11 20 0.900000 0.850000 12 7 0.100000 0.00000 13 16 0.250000 0.950000 14 8 0.100000 0.350000 15 15 0.850000 0.250000 16 2 0.700000 0.550000 17 9 0.900000 0.450000 18 17 0.950000 0.600000 19 11 0.150000 0.750000 20 18 0.400000 0.150000 Now use the index array to carry out the permutation implicitly. I, INDX(I), X(INDX(I)), Y(INDX(I)) 1 5 0.00000 0.650000 2 10 0.500000E-01 0.00000 3 6 0.500000E-01 0.450000 4 12 0.100000 0.00000 5 14 0.100000 0.350000 6 19 0.150000 0.750000 7 1 0.200000 1.00000 8 4 0.250000 0.100000 9 13 0.250000 0.950000 10 3 0.400000 0.500000E-01 11 20 0.400000 0.150000 12 7 0.400000 0.750000 13 16 0.700000 0.550000 14 8 0.800000 0.00000 15 15 0.850000 0.250000 16 2 0.850000 0.550000 17 9 0.900000 0.350000 18 17 0.900000 0.450000 19 11 0.900000 0.850000 20 18 0.950000 0.600000 R4VEC_PERMUTE carries out the permutation. I, X(I), Y(I) 1 0.00000 0.650000 2 0.500000E-01 0.00000 3 0.500000E-01 0.450000 4 0.100000 0.00000 5 0.100000 0.350000 6 0.150000 0.750000 7 0.200000 1.00000 8 0.250000 0.100000 9 0.250000 0.950000 10 0.400000 0.500000E-01 11 0.400000 0.150000 12 0.400000 0.750000 13 0.700000 0.550000 14 0.800000 0.00000 15 0.850000 0.250000 16 0.850000 0.550000 17 0.900000 0.350000 18 0.900000 0.450000 19 0.900000 0.850000 20 0.950000 0.600000 TEST155 For a pair of R4VEC's: R4VEC2_SORTED_UNIQUE counts unique entries. The pair of arrays: 1 1.436837 5.308636 2 2.912635 7.247695 3 1.436837 5.308636 4 2.123391 8.773367 5 1.830614 8.986435 6 2.912635 7.247695 7 1.515156 9.487520 8 1.219914 6.753762 9 1.436837 5.308636 10 2.267931 5.068084 Arrays after ascending sort: 1 1.219914 6.753762 2 1.436837 5.308636 3 1.436837 5.308636 4 1.436837 5.308636 5 1.515156 9.487520 6 1.830614 8.986435 7 2.123391 8.773367 8 2.267931 5.068084 9 2.912635 7.247695 10 2.912635 7.247695 UNIQed array: 1 1.219914 6.753762 2 1.436837 5.308636 3 1.515156 9.487520 4 1.830614 8.986435 5 2.123391 8.773367 6 2.267931 5.068084 7 2.912635 7.247695 TEST156 For a pair of R4VEC's: R4VEC2_SORTED_UNIQUE_INDEX indexes unique entries. Sorted arrays: 1 1.219914 6.753762 2 1.436837 5.308636 3 1.436837 5.308636 4 1.436837 5.308636 5 1.515156 9.487520 6 1.830614 8.986435 7 2.123391 8.773367 8 2.267931 5.068084 9 2.912635 7.247695 10 2.912635 7.247695 The number of unique elements is 7 Index of Unique Elements: 1: 1 2: 2 3: 5 4: 6 5: 7 6: 8 7: 9 After Indexed Nonunique Deletion. 1 1.219914 6.753762 2 1.436837 5.308636 3 1.515156 9.487520 4 1.830614 8.986435 5 2.123391 8.773367 6 2.267931 5.068084 7 2.912635 7.247695 TEST157 For a pair of R4VEC's: R4VEC2_SUM_MAX_INDEX: index of the sum vector with maximum value. The pair of vectors: 1 2.184183 0.308636 2 9.563176 2.247695 3 8.295093 2.006531 4 5.616955 3.773367 5 4.153071 3.986435 6 0.661187 0.009192 7 2.575778 4.487520 8 1.099568 1.753762 9 0.438290 0.472724 10 6.339657 0.068084 Index of maximum in A+B: 2 R4LIB_PRB Normal end of execution. 28 September 2014 11:59:25.305 AM