Thu Sep 13 17:18:30 2018 SUBSET_TEST Python version: 3.6.5 Test the SUBSET library. AGM_VALUES_TEST: Python version: 3.6.5 AGM_VALUES stores values of the arithmetic geometric mean function. A B AGM(A,B) 22.000000 96.000000 52.2746411987042379 83.000000 56.000000 68.8365300598585179 42.000000 7.000000 20.6593011967340097 26.000000 11.000000 17.6968548737436500 4.000000 63.000000 23.8670497217533004 6.000000 45.000000 20.7170159828059930 40.000000 75.000000 56.1278422556166845 80.000000 0.000000 0.0000000000000000 90.000000 35.000000 59.2695650812296364 9.000000 1.000000 3.9362355036495553 53.000000 53.000000 53.0000000000000000 1.000000 2.000000 1.4567910310469068 1.000000 4.000000 2.2430285802876027 1.000000 8.000000 3.6157561775973628 AGM_VALUES_TEST: Normal end of execution. ASM_ENUM_TEST: Python version: 3.6.5 ASM_ENUM returns the number of alternating sign matrices of a given order. 0 1 1 1 2 2 3 7 4 42 5 429 6 7436 7 218348 ASM_ENUM_TEST: Normal end of execution. ASM_TRIANGLE_TEST Python version: 3.6.5 ASM_TRIANGLE returns a row of the alternating sign matrix triangle. 0 1 1 1 1 2 2 3 2 3 7 14 14 7 4 42 105 135 105 42 5 429 1287 2002 2002 1287 429 6 7436 26026 47320 56784 47320 26026 7436 7 218348 873392 1813968 2519400 2519400 1813968 873392 218348 ASM_TRIANGLE_TEST: Normal end of execution. BELL_TEST Python version: 3.6.5 BELL computes Bell numbers. N exact C(I) computed C(I) 0 1 1 1 1 1 2 2 2 3 5 5 4 15 15 5 52 52 6 203 203 7 877 877 8 4140 4140 9 21147 21147 10 115975 115975 BELL_TEST: Normal end of execution. BELL_VALUES_TEST: Python version: 3.6.5 BELL_VALUES returns values of the Bell numbers. N BELL(N) 0 1 1 1 2 2 3 5 4 15 5 52 6 203 7 877 8 4140 9 21147 10 115975 BELL_VALUES_TEST: Normal end of execution. CATALAN_TEST Python version: 3.6.5 CATALAN computes Catalan numbers. N exact C(I) computed C(I) 0 1 1 1 1 1 2 2 2 3 5 5 4 14 14 5 42 42 6 132 132 7 429 429 8 1430 1430 9 4862 4862 10 16796 16796 CATALAN_TEST Normal end of execution. CATALAN_ROW_NEXT_TEST Python version: 3.6.5 CATALAN_ROW_NEXT computes a row of Catalan's triangle. First, compute row 7 from scratch. Row 7: 1 7 27 75 165 297 429 429 Now compute rows one at a time: 1 1 1 1 2 2 1 3 5 5 1 4 9 14 14 1 5 14 28 42 42 1 6 20 48 90 132 132 1 7 27 75 165 297 429 429 1 8 35 110 275 572 1001 1430 1430 1 9 44 154 429 1001 2002 3432 4862 4862 1 10 54 208 637 1638 3640 7072 11934 16796 16796 CATALAN_ROW_NEXT_TEST Normal end of execution. CATALAN_VALUES_TEST: Python version: 3.6.5 CATALAN_VALUES returns values of the Catalan numbers. N C(N) 0 1 1 1 2 2 3 5 4 14 5 42 6 132 7 429 8 1430 9 4862 10 16796 CATALAN_VALUES_TEST: Normal end of execution. CFRAC_TO_RAT_TEST Python version: 3.6.5 CFRAC_TO_RAT continued fraction => fraction. Regular fraction is 4096 / 15625 Continued fraction coefficients: 0 0 1 3 2 1 3 4 4 2 5 1 6 1 7 11 8 13 The continued fraction convergents. The last row contains the value of the continued fraction, written as a common fraction. I, P(I), Q(I), P(I)/Q(I) 0 0 1 0.000000 1 1 3 0.333333 2 1 4 0.250000 3 5 19 0.263158 4 11 42 0.261905 5 16 61 0.262295 6 27 103 0.262136 7 313 1194 0.262144 8 4096 15625 0.262144 CFRAC_TO_RAT_TEST Normal end of execution. CFRAC_TO_RFRAC_TEST Python version: 3.6.5 CFRAC_TO_RFRAC: continued fraction to rational polynomial fraction. Rational polynomial numerator coefficients: 0: 1 1: 1 2: 2 Rational polynomial numerator coefficients: 0: 1 1: 3 2: 1 3: 1 Continued fraction coefficients: 0: 1 1: 0.5 2: 1.33333 3: -0.5 4: -1.5 5: 2 Recovered rational polynomial numerator coefficients: 0: 1 1: 1 2: 2 Recovered rational polynomial numerator coefficients: 0: 1 1: 3 2: 1 3: 1 CFRAC_TO_RFRAC_TEST Normal end of execution. CH_TO_DIGIT_TEST Python version: 3.6.5 CH_TO_DIGIT: character -> decimal digit -2 "*" -1 -1 "*" -1 0 "0" 0 1 "1" 1 2 "2" 2 3 "3" 3 4 "4" 4 5 "5" 5 6 "6" 6 7 "7" 7 8 "8" 8 9 "9" 9 10 "*" -1 11 "*" -1 CH_TO_DIGIT_TEST: Normal end of execution. CHANGE_GREEDY_TEST Python version: 3.6.5 CHANGE_GREEDY makes change using the biggest coins first. The total for which change is to be made: 73 The available coins are: 0 1 1 5 2 10 3 25 4 50 5 100 6: 4 2 2 0 0 0 73: 50 10 10 1 1 1 CHANGE_GREEDY_TEST Normal end of execution. CHANGE_NEXT_TEST Python version: 3.6.5 CHANGE_NEXT displays the next possible way to make change for a given total The total for which change is to be made: 50 The available coins are: 1 5 10 25 50 100 1: 50 2: 25 25 3: 25 10 10 5 4: 25 10 10 1 1 1 1 1 5: 25 10 5 5 5 6: 25 10 5 5 1 1 1 1 1 7: 25 10 5 1 1 1 1 1 1 1 1 1 1 8: 25 10 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 9: 25 5 5 5 5 5 10: 25 5 5 5 5 1 1 1 1 1 CHANGE_NEXT_TEST Normal end of execution. CHINESE_CHECK_TEST Python version: 3.6.5 CHINESE_CHECK checks a set of moduluses for use with the Chinese Remainder representation. Modulus set #1: 0 1 1 3 2 8 3 25 IERROR = 0 Modulus set #2: 0 1 1 3 2 -8 3 25 IERROR = 1 Modulus set #3: 0 1 1 3 2 1 3 25 IERROR = 2 Modulus set #4: 0 1 1 3 2 8 3 24 IERROR = 3 CHINESE_CHECK_TEST Normal end of execution. CHINESE_TO_I4_TEST Python version: 3.6.5 CHINESE_TO_I4 computes an integer with the given Chinese Remainder representation. The moduli: 0 3 1 4 2 5 3 7 The number being analyzed is 37 The remainders: 0 1 1 1 2 2 3 2 The reconstructed number is 37 The remainders of the reconstructed number: 0 1 1 1 2 2 3 2 CHINESE_TO_I4_TEST Normal end of execution. COMB_NEXT_TEST Python version: 3.6.5 COMB_NEXT produces combinations. We are selecting from a set of size 5 Combinations of size 1: 1 2 3 4 5 Combinations of size 2: 1 2 1 3 1 4 1 5 2 3 2 4 2 5 3 4 3 5 4 5 Combinations of size 3: 1 2 3 1 2 4 1 2 5 1 3 4 1 3 5 1 4 5 2 3 4 2 3 5 2 4 5 3 4 5 Combinations of size 4: 1 2 3 4 1 2 3 5 1 2 4 5 1 3 4 5 2 3 4 5 Combinations of size 5: 1 2 3 4 5 COMB_NEXT_TEST Normal end of execution. COMB_ROW_NEXT_TEST Python version: 3.6.5 COMB_ROW_NEXT computes a row of Pascal's triangle. 0 1 1 1 1 2 1 2 1 3 1 3 3 1 4 1 4 6 4 1 5 1 5 10 10 5 1 6 1 6 15 20 15 6 1 7 1 7 21 35 35 21 7 1 8 1 8 28 56 70 56 28 8 1 9 1 9 36 84 126 126 84 36 9 1 10 1 10 45 120 210 252 210 120 45 10 1 COMB_ROW_NEXT_TEST Normal end of execution. COMB_UNRANK_TEST Python version: 3.6.5 COMB_UNRANK returns a combination of N things out of M, given the lexicographic rank. The total set size is M = 10 The subset size is N = 5 The number of combinations of N out of M is 252 Rank Combination 1 1 2 3 4 5 2 1 2 3 4 6 3 1 2 3 4 7 6 1 2 3 4 10 7 1 2 3 5 6 8 1 2 3 5 7 250 5 6 8 9 10 251 5 7 8 9 10 252 6 7 8 9 10 COMB_UNRANK_TEST: Normal end of execution. COMP_ENUM_TEST Python version: 3.6.5 COMP_ENUM counts compositions. 1 1 1 1 1 1 1 1 1 1 1 2 3 4 5 6 7 8 9 10 1 3 6 10 15 21 28 36 45 55 1 4 10 20 35 56 84 120 165 220 1 5 15 35 70 126 210 330 495 715 1 6 21 56 126 252 462 792 1287 2002 1 7 28 84 210 462 924 1716 3003 5005 1 8 36 120 330 792 1716 3432 6435 11440 1 9 45 165 495 1287 3003 6435 12870 24310 1 10 55 220 715 2002 5005 11440 24310 48620 1 11 66 286 1001 3003 8008 19448 43758 92378 COMP_ENUM_TEST: Normal end of execution. COMP_NEXT_TEST Python version: 3.6.5 COMP_NEXT generates compositions. Seeking all compositions of N = 6 using 3 parts. 6 0 0 5 1 0 4 2 0 3 3 0 2 4 0 1 5 0 0 6 0 5 0 1 4 1 1 3 2 1 2 3 1 1 4 1 0 5 1 4 0 2 3 1 2 2 2 2 1 3 2 0 4 2 3 0 3 2 1 3 1 2 3 0 3 3 2 0 4 1 1 4 0 2 4 1 0 5 0 1 5 0 0 6 COMP_NEXT_TEST Normal end of execution. COMP_NEXT_GRLEX_TEST Python version: 3.6.5 A COMP is a composition of an integer N into K parts. Each part is nonnegative. The order matters. COMP_NEXT_GRLEX determines the next COMP in graded lexicographic (grlex) order. Rank: NC COMP ----: -- ------------ 1: 0 = 0 + 0 + 0 ----: -- ------------ 2: 1 = 0 + 0 + 1 3: 1 = 0 + 1 + 0 4: 1 = 1 + 0 + 0 ----: -- ------------ 5: 2 = 0 + 0 + 2 6: 2 = 0 + 1 + 1 7: 2 = 0 + 2 + 0 8: 2 = 1 + 0 + 1 9: 2 = 1 + 1 + 0 10: 2 = 2 + 0 + 0 ----: -- ------------ 11: 3 = 0 + 0 + 3 12: 3 = 0 + 1 + 2 13: 3 = 0 + 2 + 1 14: 3 = 0 + 3 + 0 15: 3 = 1 + 0 + 2 16: 3 = 1 + 1 + 1 17: 3 = 1 + 2 + 0 18: 3 = 2 + 0 + 1 19: 3 = 2 + 1 + 0 20: 3 = 3 + 0 + 0 ----: -- ------------ 21: 4 = 0 + 0 + 4 22: 4 = 0 + 1 + 3 23: 4 = 0 + 2 + 2 24: 4 = 0 + 3 + 1 25: 4 = 0 + 4 + 0 26: 4 = 1 + 0 + 3 27: 4 = 1 + 1 + 2 28: 4 = 1 + 2 + 1 29: 4 = 1 + 3 + 0 30: 4 = 2 + 0 + 2 31: 4 = 2 + 1 + 1 32: 4 = 2 + 2 + 0 33: 4 = 3 + 0 + 1 34: 4 = 3 + 1 + 0 35: 4 = 4 + 0 + 0 ----: -- ------------ 36: 5 = 0 + 0 + 5 37: 5 = 0 + 1 + 4 38: 5 = 0 + 2 + 3 39: 5 = 0 + 3 + 2 40: 5 = 0 + 4 + 1 41: 5 = 0 + 5 + 0 42: 5 = 1 + 0 + 4 43: 5 = 1 + 1 + 3 44: 5 = 1 + 2 + 2 45: 5 = 1 + 3 + 1 46: 5 = 1 + 4 + 0 47: 5 = 2 + 0 + 3 48: 5 = 2 + 1 + 2 49: 5 = 2 + 2 + 1 50: 5 = 2 + 3 + 0 51: 5 = 3 + 0 + 2 52: 5 = 3 + 1 + 1 53: 5 = 3 + 2 + 0 54: 5 = 4 + 0 + 1 55: 5 = 4 + 1 + 0 56: 5 = 5 + 0 + 0 ----: -- ------------ 57: 6 = 0 + 0 + 6 58: 6 = 0 + 1 + 5 59: 6 = 0 + 2 + 4 60: 6 = 0 + 3 + 3 61: 6 = 0 + 4 + 2 62: 6 = 0 + 5 + 1 63: 6 = 0 + 6 + 0 64: 6 = 1 + 0 + 5 65: 6 = 1 + 1 + 4 66: 6 = 1 + 2 + 3 67: 6 = 1 + 3 + 2 68: 6 = 1 + 4 + 1 69: 6 = 1 + 5 + 0 70: 6 = 2 + 0 + 4 71: 6 = 2 + 1 + 3 COMP_NEXT_GRLEX_TEST: Normal end of execution. COMP_RANDOM_GRLEX_TEST Python version: 3.6.5 A COMP is a composition of an integer N into K parts. Each part is nonnegative. The order matters. COMP_RANDOM_GRLEX selects a random COMP in graded lexicographic (grlex) order between indices RANK1 and RANK2. 28: 4 = 1 + 2 + 1 59: 6 = 0 + 2 + 4 54: 5 = 4 + 0 + 1 43: 5 = 1 + 1 + 3 37: 5 = 0 + 1 + 4 COMP_RANDOM_GRLEX_TEST: Normal end of execution. COMP_RANK_GRLEX_TEST Python version: 3.6.5 A COMP is a composition of an integer N into K parts. Each part is nonnegative. The order matters. COMP_RANK_GRLEX determines the rank of a COMP from its parts. Actual Inferred Test Rank Rank 0 28 28 1 59 59 2 54 54 3 43 43 4 37 37 COMP_RANK_GRLEX_TEST: Normal end of execution. COMP_TO_KSUB_TEST Python version: 3.6.5 COMP_TO_KSUB returns the K subset corresponding to a composition. COMP: 0 4 1 0 5 KSUB: 1 6 8 9 COMP: 1 4 2 0 3 KSUB: 2 7 10 11 COMP: 2 0 2 6 0 KSUB: 3 4 7 14 COMP: 2 2 3 0 3 KSUB: 3 6 10 11 COMP: 1 3 1 5 0 KSUB: 2 6 8 14 COMP_TO_KSUB_TEST: Normal end of execution. COMP_UNRANK_GRLEX_TEST Python version: 3.6.5 A COMP is a composition of an integer N into K parts. Each part is nonnegative. The order matters. COMP_UNRANK_GRLEX determines the parts of a COMP from its rank. Rank: -> NC COMP ----: -- ------------ 1: 0 = 0 + 0 + 0 ----: -- ------------ 2: 1 = 0 + 0 + 1 3: 1 = 0 + 1 + 0 4: 1 = 1 + 0 + 0 ----: -- ------------ 5: 2 = 0 + 0 + 2 6: 2 = 0 + 1 + 1 7: 2 = 0 + 2 + 0 8: 2 = 1 + 0 + 1 9: 2 = 1 + 1 + 0 10: 2 = 2 + 0 + 0 ----: -- ------------ 11: 3 = 0 + 0 + 3 12: 3 = 0 + 1 + 2 13: 3 = 0 + 2 + 1 14: 3 = 0 + 3 + 0 15: 3 = 1 + 0 + 2 16: 3 = 1 + 1 + 1 17: 3 = 1 + 2 + 0 18: 3 = 2 + 0 + 1 19: 3 = 2 + 1 + 0 20: 3 = 3 + 0 + 0 ----: -- ------------ 21: 4 = 0 + 0 + 4 22: 4 = 0 + 1 + 3 23: 4 = 0 + 2 + 2 24: 4 = 0 + 3 + 1 25: 4 = 0 + 4 + 0 26: 4 = 1 + 0 + 3 27: 4 = 1 + 1 + 2 28: 4 = 1 + 2 + 1 29: 4 = 1 + 3 + 0 30: 4 = 2 + 0 + 2 31: 4 = 2 + 1 + 1 32: 4 = 2 + 2 + 0 33: 4 = 3 + 0 + 1 34: 4 = 3 + 1 + 0 35: 4 = 4 + 0 + 0 ----: -- ------------ 36: 5 = 0 + 0 + 5 37: 5 = 0 + 1 + 4 38: 5 = 0 + 2 + 3 39: 5 = 0 + 3 + 2 40: 5 = 0 + 4 + 1 41: 5 = 0 + 5 + 0 42: 5 = 1 + 0 + 4 43: 5 = 1 + 1 + 3 44: 5 = 1 + 2 + 2 45: 5 = 1 + 3 + 1 46: 5 = 1 + 4 + 0 47: 5 = 2 + 0 + 3 48: 5 = 2 + 1 + 2 49: 5 = 2 + 2 + 1 50: 5 = 2 + 3 + 0 51: 5 = 3 + 0 + 2 52: 5 = 3 + 1 + 1 53: 5 = 3 + 2 + 0 54: 5 = 4 + 0 + 1 55: 5 = 4 + 1 + 0 56: 5 = 5 + 0 + 0 ----: -- ------------ 57: 6 = 0 + 0 + 6 58: 6 = 0 + 1 + 5 59: 6 = 0 + 2 + 4 60: 6 = 0 + 3 + 3 61: 6 = 0 + 4 + 2 62: 6 = 0 + 5 + 1 63: 6 = 0 + 6 + 0 64: 6 = 1 + 0 + 5 65: 6 = 1 + 1 + 4 66: 6 = 1 + 2 + 3 67: 6 = 1 + 3 + 2 68: 6 = 1 + 4 + 1 69: 6 = 1 + 5 + 0 70: 6 = 2 + 0 + 4 71: 6 = 2 + 1 + 3 COMP_UNRANK_GRLEX_TEST: Normal end of execution. COMPNZ_ENUM_TEST: Python version: 3.6.5 COMPNZ_ENUM returns the number of nonzero compositions of N into K parts. N\K 0 1 2 3 4 5 6 7 0: 0 1: 0 1 2: 0 1 1 3: 0 1 2 1 4: 0 1 3 3 1 5: 0 1 4 6 4 1 6: 0 1 5 10 10 5 1 7: 0 1 6 15 20 15 6 1 COMPNZ_ENUM_TEST: Normal end of execution. COMPNZ_NEXT_TEST Python version: 3.6.5 COMPNZ_NEXT generates compositions with nonzero parts. Seeking all compositions of N = 6 using 3 nonzero parts. 4 1 1 3 2 1 2 3 1 1 4 1 3 1 2 2 2 2 1 3 2 2 1 3 1 2 3 1 1 4 COMPNZ_NEXT_TEST Normal end of execution. COMPNZ_RANDOM_TEST Python version: 3.6.5 COMPNZ_RANDOM generates random compositions using nonzero parts. Seeking random compositions of N = 10 using 5 nonzero parts. 1 4 1 1 3 1 1 2 5 1 2 1 1 3 3 1 1 2 3 3 4 2 1 2 1 COMPNZ_RANDOM_TEST: Normal end of execution. COMPNZ_TO_KSUB_TEST Python version: 3.6.5 COMPNZ_TO_KSUB returns the K subset corresponding to a nonzero composition. The composition sums to 10 and contains 5 parts. COMPNZ: 1 4 1 1 3 KSUB: 1 5 6 7 COMPNZ: 1 1 2 5 1 KSUB: 1 2 4 9 COMPNZ: 2 1 1 3 3 KSUB: 2 3 4 7 COMPNZ: 1 1 2 3 3 KSUB: 1 2 4 7 COMPNZ: 4 2 1 2 1 KSUB: 4 6 7 9 COMPNZ_TO_KSUB_TEST: Normal end of execution. CONGRUENCE_TEST Python version: 3.6.5 CONGRUENCE solves a congruence equation: A * X = C mod ( B ) I A B C X Mod ( A*X-C,B) 0 1027 712 7 269 0 1 1027 712 -7 443 0 2 1027 -712 7 -1155 0 3 1027 -712 -7 -981 0 4 -1027 712 7 443 0 5 -1027 712 -7 269 0 6 -1027 -712 7 -981 0 7 -1027 -712 -7 -1155 0 8 6 8 50 7 0 9 0 0 0 0 0 10 0 1 0 0 0 11 0 1 1 0 0 12 1 0 0 0 0 13 1 0 1 1 0 14 1 1 0 0 0 15 1024 -15625 11529 -15629 0 16 0 0 1 0 0 17 0 3 11 0 1 18 5 0 19 3 0 19 2 4 7 0 1 CONGRUENCE_TEST Normal end of execution. COUNT_POSE_RANDOM_TEST Python version: 3.6.5 COUNT_POSE_RANDOM poses a random problem for the game "The Count is Good". Problem #0 The goal number: 296 The available numbers are 4 5 6 7 8 10 Problem #1 The goal number: 504 The available numbers are 1 4 6 7 8 25 Problem #2 The goal number: 106 The available numbers are 1 3 4 6 50 75 Problem #3 The goal number: 785 The available numbers are 1 2 6 7 9 75 Problem #4 The goal number: 739 The available numbers are 1 4 8 10 25 75 COUNT_POSE_RANDOM_TEST: Normal end of execution. DEBRUIJN_TEST Python version: 3.6.5 DEBRUIJN computes a de Bruijn string. The alphabet size is M = 2 The string length is N = 3 21222111 The alphabet size is M = 3 The string length is N = 3 212221132131232231332333111 The alphabet size is M = 2 The string length is N = 4 2121122122221111 DEBRUIJN_TEST: Normal end of execution. DEC_ADD_TEST Python version: 3.6.5 DEC_ADD adds two decimals. Number of decimal places is 3 A = 12.8 B = 4.38 C = 17.2 DEC_ADD_TEST Normal end of execution. DEC_DIV_TEST Python version: 3.6.5 DEC_DIV divides two decimals. Number of decimal places is 3 A = 52.3 B = 13400 C = 0.0039 DEC_DIV_TEST Normal end of execution. DEC_MUL_TEST Python version: 3.6.5 DEC_MUL multiplies two decimals. Number of decimal places is 2 A = 0.0014 B = 1600 C = 2.2 DEC_MUL_TEST Normal end of execution. DEC_ROUND_TEST Python version: 3.6.5 DEC_ROUND "rounds" a decimal to a number of digits. -----Before------- -----After-------- Digits Mantissa Exponent Mantissa Exponent 1 523 -1 5 1 2 523 -1 52 0 3 523 -1 523 -1 4 523 -1 523 -1 2 6340 2 63 4 3 6340 2 634 3 4 6340 2 634 3 DEC_ROUND_TEST Normal end of execution. DEC_TO_R8_TEST Python version: 3.6.5 DEC_TO_R8 converts a decimal to a real number. The number of decimal digits is 5 R => A * 10^B => R2 -5.631634 -56316 -4 -5.631600 9.126352 91263 -4 9.126300 6.590185 65901 -4 6.590100 1.233909 12339 -4 1.233900 -1.693858 -16938 -4 -1.693800 -8.677625 -86776 -4 -8.677600 -4.848444 -48484 -4 -4.848400 -7.800864 -78008 -4 -7.800800 -9.123420 -91234 -4 -9.123400 2.679314 26793 -4 2.679300 DEC_TO_R8_TEST Normal end of execution. DEC_TO_RAT_TEST Python version: 3.6.5 DEC_TO_RAT decimal => fraction. In this test, choose the top and bottom of a rational at random, and compute the equivalent real number. Then convert to decimal, and the equivalent real. Then convert back to rational and the equivalent real. -0.588297 = -563 / 957 -0.588297 = -5882967607105538 * 10^-16 -0.588297 = -2941483803552769 / 5000000000000000 1.1726 = 659 / 562 1.1726 = 1172597864768683 * 10^-15 1.1726 = 1172597864768683 / 1000000000000000 -2.52239 = -169 / 67 -2.52239 = -25223880597014924 * 10^-16 -2.52239 = -6305970149253731 / 2500000000000000 -4.40909 = -485 / 110 -4.40909 = -44090909090909096 * 10^-16 -4.40909 = -5511363636363637 / 1250000000000000 -1.44006 = -913 / 634 -1.44006 = -14400630914826496 * 10^-16 -1.44006 = -56252464511041 / 39062500000000 -1.94889 = -877 / 450 -1.94889 = -1948888888888889 * 10^-15 -1.94889 = -1948888888888889 / 1000000000000000 -0.260927 = -197 / 755 -0.260927 = -2609271523178808 * 10^-16 -0.260927 = -326158940397351 / 1250000000000000 297.5 = 595 / 2 297.5 = 2975 * 10^-1 297.5 = 595 / 2 2.26496 = 795 / 351 2.26496 = 2264957264957265 * 10^-15 2.26496 = 452991452991453 / 200000000000000 -57.9286 = -811 / 14 -57.9286 = -5792857142857144 * 10^-14 -57.9286 = -724107142857143 / 12500000000000 DEC_TO_RAT_TEST Normal end of execution. DEC_TO_S_TEST Python version: 3.6.5 DEC_TO_S prints a decimal value. Mantissa Exponent String 523 -1 52.3 134 2 13400 -134 2 -13400 0 10 0 123456 -8 0.00123456 123456 -7 0.0123456 123456 -6 0.123456 123456 -5 1.23456 123456 -4 12.3456 123456 -3 123.456 123456 -2 1234.56 123456 -1 12345.6 123456 0 123456 123456 1 1234560 123456 2 12345600 123456 3 123456000 DEC_TO_S_TEST: Normal end of execution. DEC_WIDTH_TEST Python version: 3.6.5 DEC_WIDTH determines the "width" of a decimal. Mantissa Exponent Width 523 -1 4 134 2 5 -134 2 6 0 10 1 123456 -8 10 123456 -7 9 123456 -6 8 123456 -5 7 123456 -4 7 123456 -3 7 123456 -2 7 123456 -1 7 123456 0 6 123456 1 7 123456 2 8 123456 3 9 DEC_WIDTH_TEST Normal end of execution. DERANGE_ENUM_TEST Python version: 3.6.5 DERANGE_ENUM counts derangements; N # of derangements 0 1 1 0 2 1 3 2 4 9 5 44 6 265 7 1854 8 14833 9 133496 10 1334961 DERANGE_ENUM_TEST: Normal end of execution. DERANGE_ENUM2_TEST Python version: 3.6.5 DERANGE_ENUM2 counts derangements; N # of derangements 0 1 1 0 2 1 3 2 4 9 5 44 6 265 7 1854 8 14833 9 133496 10 1334961 DERANGE_ENUM2_TEST: Normal end of execution. DERANGE_ENUM3_TEST Python version: 3.6.5 DERANGE_ENUM3 counts derangements; N # of derangements 0 1 1 0 2 1 3 2 4 9 5 44 6 265 7 1854 8 14833 9 133496 10 1334961 DERANGE_ENUM3_TEST: Normal end of execution. DERANGE0_BACK_NEXT_TEST Python version: 3.6.5 DERANGE0_BACK_NEXT generates derangements using backtracking. Here, we seek all derangements of order N = 5 1 4 3 1 2 0 2 4 3 1 0 2 3 4 3 0 2 1 4 4 3 0 1 2 5 4 2 3 1 0 6 4 2 3 0 1 7 4 2 1 0 3 8 4 2 0 1 3 9 4 0 3 2 1 10 4 0 3 1 2 11 4 0 1 2 3 12 3 4 1 2 0 13 3 4 1 0 2 14 3 4 0 2 1 15 3 4 0 1 2 16 3 2 4 1 0 17 3 2 4 0 1 18 3 2 1 4 0 19 3 2 0 4 1 20 3 0 4 2 1 21 3 0 4 1 2 22 3 0 1 4 2 23 2 4 3 1 0 24 2 4 3 0 1 25 2 4 1 0 3 26 2 4 0 1 3 27 2 3 4 1 0 28 2 3 4 0 1 29 2 3 1 4 0 30 2 3 0 4 1 31 2 0 4 1 3 32 2 0 3 4 1 33 2 0 1 4 3 34 1 4 3 2 0 35 1 4 3 0 2 36 1 4 0 2 3 37 1 3 4 2 0 38 1 3 4 0 2 39 1 3 0 4 2 40 1 2 4 0 3 41 1 2 3 4 0 42 1 2 0 4 3 43 1 0 4 2 3 44 1 0 3 4 2 DERANGE0_BACK_NEXT_TEST: Normal end of execution. DERANGE0_CHECK_TEST Python version: 3.6.5 DERANGE0_CHECK_checks whether a vector of N objects represents a derangement of (1,...,N). Potential derangement: 1 2 3 4 0 CHECK = True Potential derangement: 1 4 2 0 3 CHECK = False Potential derangement: 1 2 3 0 3 CHECK = False Potential derangement: -1 2 3 4 0 CHECK = False Potential derangement: 0 3 8 1 2 CHECK = False DERANGE0_CHECK_TEST Normal end of execution. DERANGE0_WEED_NEXT_TEST Python version: 3.6.5 DERANGE0_WEED_NEXT generates derangements by generating ALL permutations, and "weeding out" the ones that are not derangements. Here, we seek all derangements of order N = 5 1: 1 0 3 4 2 2: 1 0 4 2 3 3: 1 2 0 4 3 4: 1 2 3 4 0 5: 1 2 4 0 3 6: 1 3 0 4 2 7: 1 3 4 0 2 8: 1 3 4 2 0 9: 1 4 0 2 3 10: 1 4 3 0 2 11: 1 4 3 2 0 12: 2 0 1 4 3 13: 2 0 3 4 1 14: 2 0 4 1 3 15: 2 3 0 4 1 16: 2 3 1 4 0 17: 2 3 4 0 1 18: 2 3 4 1 0 19: 2 4 0 1 3 20: 2 4 1 0 3 21: 2 4 3 0 1 22: 2 4 3 1 0 23: 3 0 1 4 2 24: 3 0 4 1 2 25: 3 0 4 2 1 26: 3 2 0 4 1 27: 3 2 1 4 0 28: 3 2 4 0 1 29: 3 2 4 1 0 30: 3 4 0 1 2 31: 3 4 0 2 1 32: 3 4 1 0 2 33: 3 4 1 2 0 34: 4 0 1 2 3 35: 4 0 3 1 2 36: 4 0 3 2 1 37: 4 2 0 1 3 38: 4 2 1 0 3 39: 4 2 3 0 1 40: 4 2 3 1 0 41: 4 3 0 1 2 42: 4 3 0 2 1 43: 4 3 1 0 2 44: 4 3 1 2 0 DERANGE0_WEED_NEXT_TEST Normal end of execution. DIGIT_TO_CH_TEST Python version: 3.6.5 DIGIT_TO_CH: decimal digit -> character. -2 "*" -1 -1 "*" -1 0 "0" 0 1 "1" 1 2 "2" 2 3 "3" 3 4 "4" 4 5 "5" 5 6 "6" 6 7 "7" 7 8 "8" 8 9 "9" 9 10 "*" -1 11 "*" -1 DIGIT_TO_CH_TEST: Normal end of execution. DIGRAPH_ARC_EULER_TEST Python version: 3.6.5 DIGRAPH_ARC_EULER finds an Euler circuit of a digraph. The arc list of the digraph: 0 2 5 1 1 4 2 2 3 3 1 2 4 3 1 5 5 1 6 4 2 The edge list of the Euler circuit: 0 6 1 4 2 3 3 5 4 2 5 7 6 1 The node list of the Euler circuit: I Edge Node 1 6 1 2 4 2 3 3 3 4 5 1 5 2 4 6 7 2 7 1 5 DIGRAPH_ARC_EULER_TEST: Normal end of execution. DIGRAPH_ARC_PRINT_TEST Python version: 3.6.5 DIGRAPH_ARC_PRINT prints a digraph. The arc list of the digraph: 0 2 5 1 1 4 2 2 3 3 1 2 4 3 1 5 5 1 6 4 2 DIGRAPH_ARC_PRINT_TEST Normal end of execution. DIOPHANTINE_TEST Python version: 3.6.5 DIOPHANTINE solves a Diophantine equation: A * X + B * Y = C A B C X Y Error 1027 712 7 269 -388 0 1027 712 -7 -269 388 0 1027 -712 7 269 388 0 1027 -712 -7 -269 -388 0 -1027 712 7 -269 -388 0 -1027 712 -7 269 388 0 -1027 -712 7 -269 388 0 -1027 -712 -7 269 -388 0 6 8 50 3 4 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 1 0 1 0 1 0 0 0 0 0 1 0 1 1 0 0 1 1 0 1 -1 0 1024 -15625 11529 -4 -1 0 0 0 1 Error code = 1 0 3 11 Error code = 2 5 0 19 Error code = 3 2 4 7 Error code = 4 DIOPHANTINE_TEST Normal end of execution. DIOPHANTINE_SOLUTION_MINIMIZE_TEST Python version: 3.6.5 DIOPHANTINE_SOLUTION_MINIMIZE computes a minimal Euclidean norm solution of a Diophantine equation: A * X + B * Y = C Coefficients: A = 4096 B = -15625 C = 46116 Solution: X = 665499996 Y = 174456828 Residual R = A * X + B * Y - C: R = 0 The minimized solution: X = -4 Y = -4 Residual R = A * X + B * Y - C: R = 0 The minimal positive solution: X = 15621 Y = 4092 Residual R = A * X + B * Y - C: R = 0 DIOPHANTINE_SOLUTION_MINIMIZE_TEST Normal end of execution. DVEC_ADD_TEST Python version: 3.6.5 DVEC_ADD adds decimal vectors representing integers I J K = I + J -57 92 Directly: 35 DVEC_ADD 35 66 12 Directly: 78 DVEC_ADD 78 -17 -87 Directly: -104 DVEC_ADD -104 -49 -78 Directly: -127 DVEC_ADD -127 -92 27 Directly: -65 DVEC_ADD -65 -88 -10 Directly: -98 DVEC_ADD -98 -20 51 Directly: 31 DVEC_ADD 31 60 -100 Directly: -40 DVEC_ADD -40 80 -30 Directly: 50 DVEC_ADD 50 -81 -98 Directly: -179 DVEC_ADD -179 DVEC_ADD_TEST Normal end of execution. DVEC_COMPLEMENTX_TEST Python version: 3.6.5 DVEC_COMPLEMENTX returns the ten's complement of a (signed) decimal vector; I = -57 J = 57 -999999943 +000000057 I = 92 J = -92 +000000092 -999999908 I = 66 J = -66 +000000066 -999999934 I = 12 J = -12 +000000012 -999999988 I = -17 J = 17 -999999983 +000000017 DVEC_COMPLEMENTX_TEST: Normal end of execution. DVEC_MUL_TEST Python version: 3.6.5 DVEC_MUL multiplies decimal vectors representing integers; I J K = I * J -563 913 Directly: -514019 DVEC_MUL -514019 659 123 Directly: 81057 DVEC_MUL 81057 -169 -868 Directly: 146692 DVEC_MUL 146692 -485 -780 Directly: 378300 DVEC_MUL 378300 -913 268 Directly: -244684 DVEC_MUL -244684 -877 -101 Directly: 88577 DVEC_MUL 88577 -197 510 Directly: -100470 DVEC_MUL -100470 595 -997 Directly: -593215 DVEC_MUL -593215 795 -299 Directly: -237705 DVEC_MUL -237705 -811 -973 Directly: 789103 DVEC_MUL 789103 NOW REPEAT THE TEST... but use too few digits to represent big products. This corresponds to an "overflow". The result here should get the final decimal digits correctly, though. I J K = I * J 719 682 Directly: 490358 DVEC_MUL 90358 -754 -985 Directly: 742690 DVEC_MUL 42690 -480 825 Directly: -396000 DVEC_MUL -96000 -773 -297 Directly: 229581 DVEC_MUL 29581 646 -466 Directly: -301036 DVEC_MUL -1036 384 123 Directly: 47232 DVEC_MUL 47232 723 -92 Directly: -66516 DVEC_MUL -66516 824 196 Directly: 161504 DVEC_MUL 61504 -622 523 Directly: -325306 DVEC_MUL -25306 -206 -630 Directly: 129780 DVEC_MUL 29780 DVEC_MUL_TEST Normal end of execution. DVEC_PRINT_TEST Python version: 3.6.5 DVEC_PRINT prints a (signed) decimal vector; The DVEC: -0055771439876543210 DVEC_PRINT_TEST: Normal end of execution. DVEC_SUB_TEST Python version: 3.6.5 DVEC_SUB subtracts decimal vectors representing integers; I J L = I - J -57 92 Directly: -149 DVEC_SUB -149 66 12 Directly: 54 DVEC_SUB 54 -17 -87 Directly: 70 DVEC_SUB 70 -49 -78 Directly: 29 DVEC_SUB 29 -92 27 Directly: -119 DVEC_SUB -119 -88 -10 Directly: -78 DVEC_SUB -78 -20 51 Directly: -71 DVEC_SUB -71 60 -100 Directly: 160 DVEC_SUB 160 80 -30 Directly: 110 DVEC_SUB 110 -81 -98 Directly: 17 DVEC_SUB 17 DVEC_SUB_TEST Normal end of execution. DVEC_TO_I4_TEST Python version: 3.6.5 DVEC_TO_I4 converts a DVEC to an I4. I4 => DVEC => I4 -5632 9 9 4 3 6 8 -5632 DVEC_TO_I4_TEST: Normal end of execution. EQUIV_PRINT_TEST Python version: 3.6.5 EQUIV_PRINT prints a set partition. The partition: Set Size 1 1 :: 0 2 3 :: 1 2 3 The partition: Set Size 1 1 :: 3 2 1 :: 0 3 1 :: 1 4 1 :: 2 The partition: Set Size 1 2 :: 0 3 2 2 :: 1 2 The partition: Set Size 1 2 :: 0 2 2 1 :: 3 3 1 :: 1 The partition: Set Size 1 1 :: 2 2 1 :: 1 3 2 :: 0 3 EQUIV_PRINT_TEST Normal end of execution. EQUIV_PRINT2_TEST Python version: 3.6.5 EQUIV_PRINT2 prints a set partition. The partition: subset 1: ( 0 ) subset 2: ( 1 , 2 , 3 ) The partition: subset 1: ( 3 ) subset 2: ( 0 ) subset 3: ( 1 ) subset 4: ( 2 ) The partition: subset 1: ( 0 , 3 ) subset 2: ( 1 , 2 ) The partition: subset 1: ( 0 , 2 ) subset 2: ( 3 ) subset 3: ( 1 ) The partition: subset 1: ( 2 ) subset 2: ( 1 ) subset 3: ( 0 , 3 ) EQUIV_PRINT2_TEST Normal end of execution. EQUIV0_NEXT_TEST Python version: 3.6.5 EQUIV0_NEXT generates all partitions of a set. 0 1 2 3 1 1: 0 0 0 0 2 2: 0 0 0 1 3 2: 0 0 1 0 4 2: 0 0 1 1 5 3: 0 0 1 2 6 2: 0 1 0 0 7 2: 0 1 0 1 8 3: 0 1 0 2 9 2: 0 1 1 0 10 2: 0 1 1 1 11 3: 0 1 1 2 12 3: 0 1 2 0 13 3: 0 1 2 1 14 3: 0 1 2 2 15 4: 0 1 2 3 EQUIV0_NEXT_TEST Normal end of execution. EQUIV0_RANDOM_TEST Python version: 3.6.5 EQUIV0_RANDOM selects a random set partition. The partition: subset 1: ( 0 ) subset 2: ( 1 , 2 , 3 ) The partition: subset 1: ( 3 ) subset 2: ( 0 ) subset 3: ( 1 ) subset 4: ( 2 ) The partition: subset 1: ( 0 , 3 ) subset 2: ( 1 , 2 ) The partition: subset 1: ( 0 , 2 ) subset 2: ( 3 ) subset 3: ( 1 ) The partition: subset 1: ( 2 ) subset 2: ( 1 ) subset 3: ( 0 , 3 ) EQUIV0_RANDOM_TEST Normal end of execution. EQUIV1_NEXT_TEST Python version: 3.6.5 EQUIV1_NEXT generates all partitions of a set. 0 1 2 3 1 1: 1 1 1 1 2 2: 1 1 1 2 3 2: 1 1 2 1 4 2: 1 1 2 2 5 3: 1 1 2 3 6 2: 1 2 1 1 7 2: 1 2 1 2 8 3: 1 2 1 3 9 2: 1 2 2 1 10 2: 1 2 2 2 11 3: 1 2 2 3 12 3: 1 2 3 1 13 3: 1 2 3 2 14 3: 1 2 3 3 15 4: 1 2 3 4 EQUIV1_NEXT_TEST Normal end of execution. EQUIV1_NEXT2_TEST Python version: 3.6.5 EQUIV1_NEXT2 generates all partitions of a set. Here, N = 4 0 1 2 3 1: 1 1 1 1 2: 1 1 1 2 3: 1 1 2 1 4: 1 1 2 2 5: 1 1 2 3 6: 1 2 1 1 7: 1 2 1 2 8: 1 2 1 3 9: 1 2 2 1 10: 1 2 2 2 11: 1 2 2 3 12: 1 2 3 1 13: 1 2 3 2 14: 1 2 3 3 15: 1 2 3 4 EQUIV1_NEXT2_TEST Normal end of execution. EULER_ROW_TEST Python version: 3.6.5 EULER_ROW gets rows of Euler's triangle. 1 1 0 1 1 0 1 4 1 0 1 11 11 1 0 1 26 66 26 1 0 1 57 302 302 57 1 0 1 120 1191 2416 1191 120 1 0 1 247 4293 15619 15619 4293 247 1 0 1 502 14608 88234 156190 88234 14608 502 1 0 EULER_ROW_TEST Normal end of execution. FROBENIUS_NUMBER_ORDER2_TEST Python version: 3.6.5 FROBENIUS_NUMBER_ORDER2 computes Frobenius numbers of order 2. C1 C1 exact F computed F 2 5 3 3 3 17 31 31 4 19 53 53 5 13 47 47 12 11 109 109 99 100 9701 9701 FROBENIUS_NUMBER_ORDER2_TEST: Normal end of execution. FROBENIUS_NUMBER_ORDER2_VALUES_TEST: Python version: 3.6.5 FROBENIUS_NUMBER_ORDER2_VALUES returns values of the Frobenius number of order 2. C1 C2 F(C1,C2) 2 5 3 3 17 31 4 19 53 5 13 47 12 11 109 99 100 9701 FROBENIUS_NUMBER_ORDER2_VALUES_TEST: Normal end of execution. GAMMA_VALUES_TEST: Python version: 3.6.5 GAMMA_VALUES stores values of the Gamma function. X GAMMA(X) -0.500000 -3.5449077018110322 -0.010000 -100.5871979644108052 0.010000 99.4325851191506018 0.100000 9.5135076986687324 0.200000 4.5908437119988026 0.400000 2.2181595437576882 0.500000 1.7724538509055161 0.600000 1.4891922488128171 0.800000 1.1642297137253030 1.000000 1.0000000000000000 1.100000 0.9513507698668732 1.200000 0.9181687423997607 1.300000 0.8974706963062772 1.400000 0.8872638175030753 1.500000 0.8862269254527581 1.600000 0.8935153492876903 1.700000 0.9086387328532904 1.800000 0.9313837709802427 1.900000 0.9617658319073874 2.000000 1.0000000000000000 3.000000 2.0000000000000000 4.000000 6.0000000000000000 10.000000 362880.0000000000000000 20.000000 121645100408832000.0000000000000000 30.000000 8841761993739701898620088352768.0000000000000000 GAMMA_VALUES_TEST: Normal end of execution. GAMMA_LOG_VALUES: Python version: 3.6.5 GAMMA_LOG_VALUES stores values of the logarithm of the Gamma function. X GAMMA_LOG(X) 0.200000 1.5240638224307841 0.400000 0.7966778177017837 0.600000 0.3982338580692348 0.800000 0.1520596783998375 1.000000 0.0000000000000000 1.100000 -0.0498724412598397 1.200000 -0.0853740900033158 1.300000 -0.1081748095078604 1.400000 -0.1196129141723712 1.500000 -0.1207822376352452 1.600000 -0.1125917656967557 1.700000 -0.0958076974070659 1.800000 -0.0710838729143722 1.900000 -0.0389842759230833 2.000000 0.0000000000000000 3.000000 0.6931471805599453 4.000000 1.7917594692280550 10.000000 12.8018274800814691 20.000000 39.3398841871994946 30.000000 71.2570389671680147 GAMMA_LOG_VALUES_TEST: Normal end of execution. GRAY_NEXT_TEST Python version: 3.6.5 GRAY_NEXT returns the index of the single item to be changed in order to get the next Gray code. K Change Gray Code 1 0 0 0 0 0 2 1 1 0 0 0 3 2 1 1 0 0 4 -1 0 1 0 0 5 3 0 1 1 0 6 1 1 1 1 0 7 -2 1 0 1 0 8 -1 0 0 1 0 9 4 0 0 1 1 10 1 1 0 1 1 11 2 1 1 1 1 12 -1 0 1 1 1 13 -3 0 1 0 1 14 1 1 1 0 1 15 -2 1 0 0 1 16 -1 0 0 0 1 GRAY_NEXT_TEST Normal end of execution. GRAY_RANK2_TEST Python version: 3.6.5 GRAY_RANK2 ranks a Gray code; R = RANK G = GRAY_UNRANK2(RANK) R2 = GRAY_RANK2(GRAY_UNRANK2(RANK)) R G R2 0 0 0 1 1 1 2 3 2 3 2 3 4 6 4 5 7 5 6 5 6 7 4 7 8 12 8 9 13 9 10 15 10 11 14 11 12 10 12 13 11 13 14 9 14 15 8 15 16 24 16 17 25 17 18 27 18 19 26 19 20 30 20 21 31 21 22 29 22 23 28 23 24 20 24 GRAY_RANK2_TEST: Normal end of execution. GRAY_UNRANK2_TEST Python version: 3.6.5 GRAY_UNRANK2 unranks a Gray code. R = RANK G = GRAY_UNRANK2(RANK) R2 = GRAY_RANK2(GRAY_UNRANK2(RANK)) R G R2 0 0 0 1 1 1 2 3 2 3 2 3 4 6 4 5 7 5 6 5 6 7 4 7 8 12 8 9 13 9 10 15 10 11 14 11 12 10 12 13 11 13 14 9 14 15 8 15 16 24 16 17 25 17 18 27 18 19 26 19 20 30 20 21 31 21 22 29 22 23 28 23 24 20 24 GRAY_UNRANK2_TEST: Normal end of execution. I4_BCLR_TEST Python version: 3.6.5 I4_BCLR sets a given bit to 0. Working on I4 = 101 Pos I4_BCLR(I4,Pos) 0 100 1 101 2 97 3 101 4 101 5 69 6 37 7 101 8 101 9 101 10 101 11 101 12 101 13 101 14 101 15 101 16 101 17 101 18 101 19 101 20 101 21 101 22 101 23 101 24 101 25 101 26 101 27 101 28 101 29 101 30 101 31 101 Working on I4 = -31 Pos I4_BCLR(I4,Pos) 0 -32 1 -31 2 -31 3 -31 4 -31 5 -63 6 -95 7 -159 8 -287 9 -543 10 -1055 11 -2079 12 -4127 13 -8223 14 -16415 15 -32799 16 -65567 17 -131103 18 -262175 19 -524319 20 -1048607 21 -2097183 22 -4194335 23 -8388639 24 -16777247 25 -33554463 26 -67108895 27 -134217759 28 -268435487 29 -536870943 30 -1073741855 31 2147483617 I4_BCLR_TEST Normal end of execution. I4_BSET_TEST Python version: 3.6.5 I4_BSET sets a given bit to 1. Working on I4 = 101 Pos I4_BSET(I4,Pos) 0 101 1 103 2 101 3 109 4 117 5 101 6 101 7 229 8 357 9 613 10 1125 11 2149 12 4197 13 8293 14 16485 15 32869 16 65637 17 131173 18 262245 19 524389 20 1048677 21 2097253 22 4194405 23 8388709 24 16777317 25 33554533 26 67108965 27 134217829 28 268435557 29 536871013 30 1073741925 31 -2147483547 Working on I4 = -31 Pos I4_BSET(I4,Pos) 0 -31 1 -29 2 -27 3 -23 4 -15 5 -31 6 -31 7 -31 8 -31 9 -31 10 -31 11 -31 12 -31 13 -31 14 -31 15 -31 16 -31 17 -31 18 -31 19 -31 20 -31 21 -31 22 -31 23 -31 24 -31 25 -31 26 -31 27 -31 28 -31 29 -31 30 -31 31 -31 I4_BSET_TEST Normal end of execution. I4_BTEST_TEST Python version: 3.6.5 I4_BTEST reports whether a given bit is 0 or 1. Analyze the integer I4 = 101 Pos I4_BTEST(I4,POS) 0 True 1 False 2 True 3 False 4 False 5 True 6 True 7 False 8 False 9 False 10 False 11 False 12 False 13 False 14 False 15 False 16 False 17 False 18 False 19 False 20 False 21 False 22 False 23 False 24 False 25 False 26 False 27 False 28 False 29 False 30 False 31 False Analyze the integer I4 = -31 Pos I4_BTEST(I4,POS) 0 True 1 False 2 False 3 False 4 False 5 True 6 True 7 True 8 True 9 True 10 True 11 True 12 True 13 True 14 True 15 True 16 True 17 True 18 True 19 True 20 True 21 True 22 True 23 True 24 True 25 True 26 True 27 True 28 True 29 True 30 True 31 True I4_BTEST_TEST Normal end of execution. I4_CHOOSE_TEST Python version: 3.6.5 I4_CHOOSE evaluates C(N,K). N K CNK 0 0 1 1 0 1 1 1 1 2 0 1 2 1 2 2 2 1 3 0 1 3 1 3 3 2 3 3 3 1 4 0 1 4 1 4 4 2 6 4 3 4 4 4 1 I4_CHOOSE_TEST: Normal end of execution. I4_FACTOR_TEST Python version: 3.6.5 I4_FACTOR factors an integer. The integer is 2516 Prime representation: I, FACTOR(I), POWER(I) 0 2 2 1 17 1 2 37 1 I4_FACTOR_TEST Normal end of execution. I4_FACTORIAL_TEST Python version: 3.6.5 I4_FACTORIAL evaluates the factorial function. N Exact I4_FACTORIAL(N) 0 1 1 1 1 1 2 2 2 3 6 6 4 24 24 5 120 120 6 720 720 7 5040 5040 8 40320 40320 9 362880 362880 10 3628800 3628800 11 39916800 39916800 12 479001600 479001600 I4_FACTORIAL_TEST Normal end of execution. I4_FACTORIAL_VALUES_TEST: Python version: 3.6.5 I4_FACTORIAL_VALUES returns values of the integer factorial function. N I4_FACTORIAL(N) 0 1 1 1 2 2 3 6 4 24 5 120 6 720 7 5040 8 40320 9 362880 10 3628800 11 39916800 12 479001600 I4_FACTORIAL_VALUES_TEST: Normal end of execution. I4_FALL_TEST Python version: 3.6.5 I4_FALL evaluates the falling factorial Fall(I,N). M N Exact I4_FALL(M,N) 5 0 1 1 5 1 5 5 5 2 20 20 5 3 60 60 5 4 120 120 5 5 120 120 5 6 0 0 50 0 1 1 10 1 10 10 4000 1 4000 4000 10 2 90 90 18 3 4896 4896 4 4 24 24 98 3 912576 912576 1 7 0 0 I4_FALL_TEST: Normal end of execution. I4_GCD_TEST Python version: 3.6.5 I4_GCD computes the greatest common factor I J I4_GCD 36 30 6 49 -7 7 0 71 71 12 12 12 36 49 1 1 42 1 91 28 7 I4_GCD_TEST Normal end of execution I4_HUGE_TEST Python version: 3.6.5 I4_HUGE returns a huge integer. I4_HUGE() = 2147483647 I4_HUGE_TEST Normal end of execution. I4_LOG_10_TEST Python version: 3.6.5 I4_LOG_10: whole part of log base 10, X, I4_LOG_10 0 0 1 0 2 0 3 0 9 0 10 1 11 1 99 1 101 2 -1 0 -2 0 -3 0 -9 0 I4_LOG_10_TEST Normal end of execution. I4_MODP_TEST Python version: 3.6.5 I4_MODP factors a number into a multiple M and a positive remainder R. Number Divisor Multiple Remainder 107 50 2 7 107 -50 -2 7 -107 50 -3 43 -107 -50 3 43 Repeat using Python % Operator: 107 50 2 7 107 -50 -3 -43 -107 50 -3 43 -107 -50 2 -7 I4_MODP_TEST Normal end of execution. I4_MOEBIUS_TEST: Python version: 3.6.5 I4_MOEBIUS evaluates the Moebius function: N Exact I4_MOEBIUS(N) 1 1 1 2 -1 -1 3 -1 -1 4 0 0 5 -1 -1 6 1 1 7 -1 -1 8 0 0 9 0 0 10 1 1 11 -1 -1 12 0 0 13 -1 -1 14 1 1 15 1 1 16 0 0 17 -1 -1 18 0 0 19 -1 -1 20 0 0 I4_MOEBIUS_TEST Normal end of execution. I4_PARTITION_CONJ_TEST Python version: 3.6.5 I4_PARTITION_CONJ conjugates an integer partition. Original partition: 14 = 1 * 2 + 1 * 5 + 3 * 1 + 1 * 4 Conjugate partition: 14 = 1 * 6 + 1 * 3 + 2 * 2 + 1 * 1 I4_PARTITION_CONJ_TEST Normal end of execution. I4_PARTITION_COUNT_TEST Python version: 3.6.5 I4_PARTITION_COUNT counts partitions of an integer. N Exact Count 0 1 1 1 1 1 2 2 2 3 3 3 4 5 5 5 7 7 6 11 11 7 15 15 8 22 22 9 30 30 10 42 42 11 56 56 12 77 77 13 101 101 14 135 135 15 176 176 16 231 231 17 297 297 18 385 385 19 490 490 20 627 627 I4_PARTITION_COUNT_TEST Normal end of execution. I4_PARTITION_COUNT2_TEST Python version: 3.6.5 I4_PARTITION_COUNT2 counts partitions of an integer. N Exact Count 0 1 1 1 1 1 2 2 2 3 3 3 4 5 5 5 7 7 6 11 11 7 15 15 8 22 22 9 30 30 10 42 42 11 56 56 12 77 77 13 101 101 14 135 135 15 176 176 16 231 231 17 297 297 18 385 385 19 490 490 20 627 627 I4_PARTITION_COUNT2_TEST Normal end of execution. I4_PARTITION_COUNT_VALUES_TEST: Python version: 3.6.5 I4_PARTITION_COUNT_VALUES returns values of the integer partition count function. N P(N) 0 1 1 1 2 2 3 3 4 5 5 7 6 11 7 15 8 22 9 30 10 42 11 56 12 77 13 101 14 135 15 176 16 231 17 297 18 385 19 490 20 627 I4_PARTITION_COUNT_VALUES_TEST: Normal end of execution. I4_PARTITION_NEXT_TEST Python version: 3.6.5 I4_PARTITION_NEXT generates partitions of an integer. Here N = 7 7 = 1 * 7 7 = 1 * 6 + 1 * 1 7 = 1 * 5 + 1 * 2 7 = 1 * 5 + 2 * 1 7 = 1 * 4 + 1 * 3 7 = 1 * 4 + 1 * 2 + 1 * 1 7 = 1 * 4 + 3 * 1 7 = 2 * 3 + 1 * 1 7 = 1 * 3 + 2 * 2 7 = 1 * 3 + 1 * 2 + 2 * 1 7 = 1 * 3 + 4 * 1 7 = 3 * 2 + 1 * 1 7 = 2 * 2 + 3 * 1 7 = 1 * 2 + 5 * 1 7 = 7 * 1 I4_PARTITION_NEXT_TEST Normal end of execution. I4_PARTITION_NEXT2_TEST Python version: 3.6.5 I4_PARTITION_NEXT2 produces partitions of an integer. 7 = 1 * 7 7 = 1 * 6 + 1 * 1 7 = 1 * 5 + 1 * 2 7 = 1 * 5 + 2 * 1 7 = 1 * 4 + 1 * 3 7 = 1 * 4 + 1 * 2 + 1 * 1 7 = 1 * 4 + 3 * 1 7 = 2 * 3 + 1 * 1 7 = 1 * 3 + 2 * 2 7 = 1 * 3 + 1 * 2 + 2 * 1 7 = 1 * 3 + 4 * 1 7 = 3 * 2 + 1 * 1 7 = 2 * 2 + 3 * 1 7 = 1 * 2 + 5 * 1 7 = 7 * 1 I4_PARTITION_NEXT2_TEST Normal end of execution. I4_PARTITION_PRINT_TEST Python version: 3.6.5 I4_PARTITION_PRINT prints an integer partition. 14 = 1 * 2 + 1 * 5 + 3 * 1 + 1 * 4 I4_PARTITION_PRINT_TEST Normal end of execution. I4_PARTITION_RANDOM_TEST Python version: 3.6.5 I4_PARTITION_RANDOM generates a random partition. The number of partitions of N N Number of partitions 0 1 1 1 2 2 3 3 4 5 5 7 6 11 7 15 8 = 5 * 1 + 1 * 3 8 = 2 * 1 + 1 * 6 8 = 4 * 1 + 2 * 2 8 = 4 * 1 + 1 * 4 8 = 1 * 1 + 1 * 2 + 1 * 5 I4_PARTITION_RANDOM_TEST: Normal end of execution. I4_PARTITIONS_NEXT_TEST Python version: 3.6.5 I4_PARTITIONS_NEXT produces the next nondecreasing partitions of an integer, and if necessary, increments the integer to keep on going. I Sum Partition 0 0 0 0 0 0 1 1 0 0 1 2 2 0 0 2 2 1 1 0 3 3 3 0 0 4 3 2 1 0 5 3 1 1 1 6 4 4 0 0 7 4 3 1 0 8 4 2 2 0 9 4 2 1 1 10 5 5 0 0 11 5 4 1 0 12 5 3 2 0 13 5 3 1 1 14 5 2 2 1 You can start from any legal partition. Here, we restart at ( 2, 1, 0 ). I Sum Partition 0 3 2 1 0 0 3 1 1 1 1 4 4 0 0 2 4 3 1 0 3 4 2 2 0 4 4 2 1 1 5 5 5 0 0 6 5 4 1 0 7 5 3 2 0 8 5 3 1 1 9 5 2 2 1 10 6 6 0 0 11 6 5 1 0 12 6 4 2 0 13 6 3 3 0 14 6 4 1 1 I4_PARTITIONS_NEXT_TEST: Normal end of execution. I4_RISE_TEST Python version: 3.6.5 I4_RISE evaluates the rising factorial Fall(I,N). M N Exact I4_RISE(M,N) 5 0 1 1 5 1 5 5 5 2 30 30 5 3 210 210 5 4 1680 1680 5 5 15120 15120 5 6 151200 151200 50 0 1 1 10 1 10 10 4000 1 4000 4000 10 2 110 110 18 3 6840 6840 4 4 840 840 98 3 970200 970200 1 7 5040 5040 I4_RISE_TEST Normal end of execution. I4_SIGN_TEST Python version: 3.6.5 I4_SIGN returns the sign of an I4. I4 I4_SIGN(I4) -10 -1 -7 -1 0 1 5 1 9 1 I4_SIGN_TEST Normal end of execution. I4_SQRT_TEST Python version: 3.6.5 I4_SQRT computes the square root of an I4. N Sqrt(N) Remainder -5 2 1 -4 2 0 -3 1 2 -2 1 1 -1 1 0 0 0 0 1 1 0 2 1 1 3 1 2 4 2 0 5 2 1 6 2 2 7 2 3 8 2 4 9 3 0 10 3 1 11 3 2 12 3 3 13 3 4 14 3 5 15 3 6 16 4 0 17 4 1 18 4 2 19 4 3 20 4 4 I4_SQRT_TEST Normal end of execution. I4_SQRT_CF_TEST Python version: 3.6.5 I4_SQRT_CF computes the continued fraction form of the square root of an integer. N Period Whole Repeating Part 1 0 1 2 1 1 2 3 2 1 1 2 4 0 2 5 1 2 4 6 2 2 2 4 7 4 2 1 1 1 4 8 2 2 1 4 9 0 3 10 1 3 6 11 2 3 3 6 12 2 3 2 6 13 5 3 1 1 1 1 6 14 4 3 1 2 1 6 15 2 3 1 6 16 0 4 17 1 4 8 18 2 4 4 8 19 6 4 2 1 3 1 2 8 20 2 4 2 8 I4_SQRT_CF_TEST Normal end of execution. I4_TO_CHINESE_TEST Python version: 3.6.5 I4_TO_CHINESE computes the Chinese Remainder representation of an integer. The moduli: 0 3 1 4 2 5 3 7 The number being analyzed is 37 The remainders: 0 1 1 1 2 2 3 2 The reconstructed number is 37 The remainders of the reconstructed number are: 0 1 1 1 2 2 3 2 I4_TO_CHINESE_TEST: Normal end of execution. I4_TO_DVEC_TEST Python version: 3.6.5 I4_TO_DVEC converts an I4 to a DVEC. I4 => DVEC => I4 -5632 9 9 4 3 6 8 -5632 I4_TO_DVEC_TEST: Normal end of execution. I4_TO_I4POLY_TEST Python version: 3.6.5 I4_TO_I4POLY converts an integer to a polynomial in a given base I BASE DEGREE Coefficients 1 2 0 1 6 2 2 1 1 0 23 2 4 1 0 1 1 1 23 3 2 2 1 2 23 4 2 1 1 3 23 5 1 4 3 23 6 1 3 5 23 23 1 1 0 23 24 0 23 I4_TO_I4POLY_TEST Normal end of execution. I4_TO_VAN_DER_CORPUT_TEST Python version: 3.6.5 I4_TO_VAN_DER_CORPUT computes the elements of a van der Corput sequence. The sequence depends on the prime numbers used as a base. Bases: 2 3 5 7 11 0 0.000000 0.000000 0.000000 0.000000 0.000000 1 0.500000 0.333333 0.200000 0.142857 0.090909 2 0.250000 0.666667 0.400000 0.285714 0.181818 3 0.750000 0.111111 0.600000 0.428571 0.272727 4 0.125000 0.444444 0.800000 0.571429 0.363636 5 0.625000 0.777778 0.040000 0.714286 0.454545 6 0.375000 0.222222 0.240000 0.857143 0.545455 7 0.875000 0.555556 0.440000 0.020408 0.636364 8 0.062500 0.888889 0.640000 0.163265 0.727273 9 0.562500 0.037037 0.840000 0.306122 0.818182 I4_TO_VAN_DER_CORPUT_TEST Normal end of execution. I4_UNIFORM_AB_TEST Python version: 3.6.5 I4_UNIFORM_AB computes pseudorandom values in an interval [A,B]. The lower endpoint A = -100 The upper endpoint B = 200 The initial seed is 123456789 1 -35 2 187 3 149 4 69 5 25 6 -81 7 -23 8 -67 9 -87 10 90 11 -82 12 35 13 20 14 127 15 139 16 -100 17 170 18 5 19 -72 20 -96 I4_UNIFORM_AB_TEST: Normal end of execution. I4MAT_MM_TEST Python version: 3.6.5 I4MAT_MM multiplies two I4MAT's Matrix A: Col: 0 1 Row 0: 11 12 1: 21 22 2: 31 32 Matrix B: Col: 0 1 2 3 Row 0: 11 12 13 14 1: 21 22 23 24 C = A*B: Col: 0 1 2 3 Row 0: 373 396 419 442 1: 693 736 779 822 2: 1013 1076 1139 1202 I4MAT_MM_TEST: Normal end of execution. I4MAT_2PERM0_TEST Python version: 3.6.5 I4MAT_2PERM0 reorders an integer matrix in place. Rows and columns use different permutations. The input matrix: Col: 0 1 2 3 4 Row 0: 11 12 13 14 15 1: 21 22 23 24 25 2: 31 32 33 34 35 3: 41 42 43 44 45 4: 51 52 53 54 55 5: 61 62 63 64 65 6: 71 72 73 74 75 7: 81 82 83 84 85 8: 91 92 93 94 95 Col: 5 6 Row 0: 16 17 1: 26 27 2: 36 37 3: 46 47 4: 56 57 5: 66 67 6: 76 77 7: 86 87 8: 96 97 The row permutation: 0 1 2 3 4 5 6 7 8 1 2 8 5 6 7 4 3 0 The column permutation: 0 1 2 3 4 5 6 2 3 4 5 6 0 1 The permuted matrix: Col: 0 1 2 3 4 Row 0: 96 97 91 92 93 1: 16 17 11 12 13 2: 26 27 21 22 23 3: 86 87 81 82 83 4: 76 77 71 72 73 5: 46 47 41 42 43 6: 56 57 51 52 53 7: 66 67 61 62 63 8: 36 37 31 32 33 Col: 5 6 Row 0: 94 95 1: 14 15 2: 24 25 3: 84 85 4: 74 75 5: 44 45 6: 54 55 7: 64 65 8: 34 35 I4MAT_2PERM0_TEST Normal end of execution. I4MAT_PERM0_TEST Python version: 3.6.5 I4MAT_PERM0 reorders an integer matrix in place. The rows and columns use the same permutation. The input matrix: Col: 0 1 2 3 4 Row 0: 11 12 13 14 15 1: 21 22 23 24 25 2: 31 32 33 34 35 3: 41 42 43 44 45 4: 51 52 53 54 55 5: 61 62 63 64 65 6: 71 72 73 74 75 7: 81 82 83 84 85 8: 91 92 93 94 95 Col: 5 6 7 8 Row 0: 16 17 18 19 1: 26 27 28 29 2: 36 37 38 39 3: 46 47 48 49 4: 56 57 58 59 5: 66 67 68 69 6: 76 77 78 79 7: 86 87 88 89 8: 96 97 98 99 The row and column permutation: 0 1 2 3 4 5 6 7 8 1 2 8 5 6 7 4 3 0 The permuted matrix: Col: 0 1 2 3 4 Row 0: 99 91 92 98 97 1: 19 11 12 18 17 2: 29 21 22 28 27 3: 89 81 82 88 87 4: 79 71 72 78 77 5: 49 41 42 48 47 6: 59 51 52 58 57 7: 69 61 62 68 67 8: 39 31 32 38 37 Col: 5 6 7 8 Row 0: 94 95 96 93 1: 14 15 16 13 2: 24 25 26 23 3: 84 85 86 83 4: 74 75 76 73 5: 44 45 46 43 6: 54 55 56 53 7: 64 65 66 63 8: 34 35 36 33 I4MAT_PERM0_TEST Normal end of execution. I4MAT_PRINT_TEST: Python version: 3.6.5 Test I4MAT_PRINT, which prints an I4MAT. A 5 x 6 integer matrix: Col: 0 1 2 3 4 Row 0: 11 12 13 14 15 1: 21 22 23 24 25 2: 31 32 33 34 35 3: 41 42 43 44 45 4: 51 52 53 54 55 Col: 5 Row 0: 16 1: 26 2: 36 3: 46 4: 56 I4MAT_PRINT_TEST: Normal end of execution. I4MAT_PRINT_SOME_TEST Python version: 3.6.5 I4MAT_PRINT_SOME prints some of an I4MAT. Here is I4MAT, rows 0:2, cols 3:5: Col: 3 4 5 Row 0: 14 15 16 1: 24 25 26 2: 34 35 36 I4MAT_PRINT_SOME_TEST: Normal end of execution. I4MAT_U1_INVERSE_TEST Python version: 3.6.5 I4MAT_U1_INVERSE inverts a unit upper triangular matrix. The original matrix: Col: 0 1 2 3 4 Row 0: 1 2 0 5 0 1: 0 1 0 0 0 2: 0 0 1 3 0 3: 0 0 0 1 0 4: 0 0 0 0 1 5: 0 0 0 0 0 Col: 5 Row 0: 75 1: 0 2: 0 3: 6 4: 4 5: 1 The inverse matrix: Col: 0 1 2 3 4 Row 0: 1 -2 0 -5 0 1: 0 1 0 0 0 2: 0 0 1 -3 0 3: 0 0 0 1 0 4: 0 0 0 0 1 5: 0 0 0 0 0 Col: 5 Row 0: -45 1: 0 2: 18 3: -6 4: -4 5: 1 The product: Col: 0 1 2 3 4 Row 0: 1 0 0 0 0 1: 0 1 0 0 0 2: 0 0 1 0 0 3: 0 0 0 1 0 4: 0 0 0 0 1 5: 0 0 0 0 0 Col: 5 Row 0: 0 1: 0 2: 0 3: 0 4: 0 5: 1 I4MAT_U1_INVERSE_TEST: Normal end of execution. I4POLY_TEST Python version: 3.6.5 I4POLY converts between power sum, factorial and Taylor forms, and can evaluate a polynomial All calls have input A as follows: 0 0 0 0 0 1 Option IOPT = -3 Output array: 0 24 -50 35 -10 1 Option IOPT = -2 Output array: 0 1 15 25 10 1 Option IOPT = -1 X0 = 2 Value = 0 Option IOPT = 0 X0 = 2 Value = 32 Option IOPT = 6 X0 = 2 Output array: 32 80 80 40 10 1 Option IOPT = 6 X0 = -2 Output array: -32 80 -80 40 -10 1 I4POLY_TEST: Normal end of execution. I4POLY_ADD_TEST Python version: 3.6.5 I4POLY_ADD adds two I4POLY's. Polynomial A: p(x) = 5 * x^5 +4 * x^4 +3 * x^3 +2 * x^2 +1 * x Polynomial B: p(x) = -5 * x^5 +8 * x^3 +7 * x^2 -2 * x +1 Polynomial C = A+B: p(x) = 4 * x^4 +11 * x^3 +9 * x^2 -1 * x +1 I4POLY_ADD_TEST: Normal end of execution. I4POLY_CYCLO_TEST Python version: 3.6.5 I4POLY_CYCLO computes cyclotomic polynomials. N = 0 The cyclotomic polynomial: p(x) = 1 N = 1 The cyclotomic polynomial: p(x) = 1 * x -1 N = 2 The cyclotomic polynomial: p(x) = 1 * x +1 N = 3 The cyclotomic polynomial: p(x) = 1 * x^2 +1 * x +1 N = 4 The cyclotomic polynomial: p(x) = 1 * x^2 +1 N = 5 The cyclotomic polynomial: p(x) = 1 * x^4 +1 * x^3 +1 * x^2 +1 * x +1 N = 6 The cyclotomic polynomial: p(x) = 1 * x^2 -1 * x +1 N = 7 The cyclotomic polynomial: p(x) = 1 * x^6 +1 * x^5 +1 * x^4 +1 * x^3 +1 * x^2 +1 * x +1 N = 8 The cyclotomic polynomial: p(x) = 1 * x^4 +1 N = 9 The cyclotomic polynomial: p(x) = 1 * x^6 +1 * x^3 +1 N = 10 The cyclotomic polynomial: p(x) = 1 * x^4 -1 * x^3 +1 * x^2 -1 * x +1 I4POLY_CYCLO_TEST Normal end of execution. I4POLY_DEGREE_TEST Python version: 3.6.5 I4POLY_DEGREE returns the degree of an I4POLY. The polynomial: p(x) = 7 * x^7 +6 * x^6 +4 * x^4 +3 * x^3 +1 * x The polynomial degree is 7 I4POLY_DEGREE_TEST: Normal end of execution. I4POLY_DIF_TEST Python version: 3.6.5 I4POLY_DIF computes derivatives of an I4POLY. The polynomial A: p(x) = 1 * x^3 +2 * x^2 -5 * x -6 Differentiate A 1 times. The derivative, B: p(x) = 3 * x^2 +4 * x -5 The polynomial A: p(x) = 1 * x^4 +3 * x^3 +2 * x^2 +5 * x -2 Differentiate A 3 times. The derivative, B: p(x) = 24 * x +18 I4POLY_DIF_TEST: Normal end of execution. I4POLY_DIV_TEST Python version: 3.6.5 I4POLY_DIV computes the quotient and remainder for polynomial division. The polynomial to be divided, A: p(x) = 1 * x^3 +2 * x^2 -5 * x -6 The divisor polynomial, B: p(x) = 1 * x -2 The quotient polynomial, Q: p(x) = 1 * x^2 +4 * x +3 The remainder polynomial, R: p(x) = 0 The polynomial to be divided, A: p(x) = 1 * x^4 +3 * x^3 +2 * x^2 +5 * x -2 The divisor polynomial, B: p(x) = 1 * x^2 +1 * x -3 The quotient polynomial, Q: p(x) = 1 * x^2 +2 * x +3 The remainder polynomial, R: p(x) = 8 * x +7 I4POLY_DIV_TEST: Normal end of execution. I4POLY_MUL_TEST Python version: 3.6.5 I4POLY_MUL multiplies two polynomials. The factor A: p(x) = 1 * x +1 The factor B: p(x) = -1 * x +1 The product C = A*B: p(x) = -1 * x^2 +1 The factor A: p(x) = 3 * x^2 +2 * x +1 The factor B: p(x) = -2 * x +1 The product C = A*B: p(x) = -6 * x^3 -1 * x^2 +1 I4POLY_MUL_TEST: Normal end of execution. I4POLY_PRINT_TEST Python version: 3.6.5 I4POLY_PRINT prints an I4POLY. The polynomial: p(x) = 1 * x^4 +3 * x^3 +2 * x^2 +5 * x -2 I4POLY_PRINT_TEST Normal end of execution. I4POLY_TO_I4_TEST Python version: 3.6.5 I4POLY_TO_I4 evaluates an integer polynomial. I BASE DEGREE Coefficients 1 2 0 1 6 2 2 1 1 0 23 2 4 1 0 1 1 1 23 3 2 2 1 2 23 4 2 1 1 3 23 5 1 4 3 23 6 1 3 5 23 23 1 1 0 23 24 0 23 Now let I4_TO_I4POLY convert I to a polynomial, use I4POLY_TO_I4 to evaluate it, and compare. I I2 1 1 6 6 23 23 23 23 23 23 23 23 23 23 23 23 23 23 I4POLY_TO_I4_TEST Normal end of execution. I4VEC_ASCENDS_TEST Python version: 3.6.5 I4VEC_ASCENDS determines if an I4VEC ascends. Test vector: 1 3 2 4 I4VEC_ASCENDS = False Test vector: 2 2 2 2 I4VEC_ASCENDS = True Test vector: 1 2 2 4 I4VEC_ASCENDS = True Test vector: 1 2 3 4 I4VEC_ASCENDS = True Test vector: 4 4 3 1 I4VEC_ASCENDS = False Test vector: 9 7 3 0 I4VEC_ASCENDS = False I4VEC_ASCENDS_TEST Normal end of execution. I4VEC_BACKTRACK_TEST Python version: 3.6.5 I4VEC_BACKTRACK uses backtracking, seeking a vector X of N values which satisfies some condition. In this demonstration, we have 8 integers W(I). We seek all subsets that sum to 53. X(I) is 0 or 1 if the entry is skipped or used. 1 53: 15 22 16 2 53: 15 14 16 8 3 53: 22 14 9 8 Done! I4VEC_BACKTRACK_TEST: Normal end of execution. I4VEC_DECREMENT_TEST Python version: 3.6.5 I4VEC_DECREMENT decrements an I4VEC. The I4VEC: 0 -2 1 10 2 8 3 3 The I4VEC after decrementing: 0 -3 1 9 2 7 3 2 I4VEC_DECREMENT_TEST: Normal end of execution. I4VEC_DESCENDS_TEST Python version: 3.6.5 I4VEC_DESCENDS determines if an I4VEC descends. Test vector: 1 3 2 4 I4VEC_DESCENDS = False Test vector: 2 2 2 2 I4VEC_DESCENDS = True Test vector: 1 2 2 4 I4VEC_DESCENDS = False Test vector: 1 2 3 4 I4VEC_DESCENDS = False Test vector: 4 4 3 1 I4VEC_DESCENDS = True Test vector: 9 7 3 0 I4VEC_DESCENDS = True I4VEC_DESCENDS_TEST Normal end of execution. I4VEC_FRAC_TEST Python version: 3.6.5 I4VEC_FRAC: K-th smallest integer vector entry. Using initial random number seed = 123456789 The array to search: 0 5 1 20 2 17 3 12 4 9 5 2 6 6 7 3 8 1 9 13 Fractile Value 1 1 4 5 7 12 10 20 I4VEC_FRAC_TEST Normal end of execution. I4VEC_INDEX_TEST Python version: 3.6.5 For an integer vector: I4VEC_INDEX: first index of given value; Input vector: 0 -6 1 10 2 7 3 1 4 -2 5 -9 6 -5 7 -8 8 -10 9 3 Index of first occurrence of -9 is 5 Index of first occurrence of -8 is 7 I4VEC_INDEX_TEST: Normal end of execution. I4VEC_INDICATOR0_TEST Python version: 3.6.5 I4VEC_INDICATOR0 returns an indicator vector. The indicator0 vector: 0 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 I4VEC_INDICATOR0_TEST Normal end of execution. I4VEC_INDICATOR1_TEST Python version: 3.6.5 I4VEC_INDICATOR1 returns an indicator vector. The indicator1 vector: 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 I4VEC_INDICATOR1_TEST Normal end of execution. I4VEC_MAX_INDEX_LAST_TEST Python version: 3.6.5 I4VEC_MAX_INDEX_LAST: last maximal index Input vector: 0 0 1 3 2 3 3 2 4 1 5 0 6 1 7 0 8 0 9 2 10 0 11 1 12 1 13 3 14 3 Last maximum index: 14 I4VEC_MAX_INDEX_LAST_TEST: Normal end of execution. I4VEC_PAIRWISE_PRIME_TEST Python version: 3.6.5 I4VEC_PAIRWISE_PRIME determines if a vector of integers is pairwise prime. Pairwise Row Vector Prime? 1 3 2 4 False 2 2 2 2 False 5 7 12 29 True 1 13 1 11 True 1 4 9 16 False 6 35 13 77 False I4VEC_PAIRWISE_PRIME_TEST Normal end of execution. I4VEC_PRINT_TEST Python version: 3.6.5 I4VEC_PRINT prints an I4VEC. Here is an I4VEC: 0 91 1 92 2 93 3 94 I4VEC_PRINT_TEST: Normal end of execution. I4VEC_PRODUCT_TEST Python version: 3.6.5 I4VEC_PRODUCT computes the product of the entries in an I4VEC. Input vector: 0 -3 1 5 2 4 3 1 4 -1 5 -5 6 -3 7 -4 8 -5 9 1 Product of entries = 18000 I4VEC_PRODUCT_TEST: Normal end of execution. I4VEC_REVERSE_TEST Python version: 3.6.5 I4VEC_REVERSE reverses a list of integers. Original vector: 0 6 1 29 2 25 3 17 4 12 5 2 6 7 7 3 8 1 9 19 Reversed: 0 19 1 1 2 3 3 7 4 2 5 12 6 17 7 25 8 29 9 6 I4VEC_REVERSE_TEST: Normal end of execution. I4VEC_SORT_BUBBLE_A_TEST Python version: 3.6.5 I4VEC_SORT_BUBBLE_A ascending sorts, Unsorted: 0 13 1 58 2 50 3 34 4 25 5 4 6 15 7 6 8 2 9 38 10 3 11 27 12 24 13 46 14 48 15 0 16 54 17 21 18 5 19 0 Ascending sorted: 0 0 1 0 2 2 3 3 4 4 5 5 6 6 7 13 8 15 9 21 10 24 11 25 12 27 13 34 14 38 15 46 16 48 17 50 18 54 19 58 I4VEC_SORT_BUBBLE_A_TEST: Normal end of execution. I4VEC_SORT_HEAP_INDEX_D_TEST Python version: 3.6.5 I4VEC_SORT_HEAP_INDEX_D creates a descending sort index for an I4VEC. Unsorted array A: 0 13 1 58 2 50 3 34 4 25 5 4 6 15 7 6 8 2 9 38 10 3 11 27 12 24 13 46 14 48 15 0 16 54 17 21 18 5 19 0 Sort vector INDX: 0 1 1 16 2 2 3 14 4 13 5 9 6 3 7 11 8 4 9 12 10 17 11 6 12 0 13 7 14 18 15 5 16 10 17 8 18 19 19 15 I INDX(I) A(INDX(I)) 0 1 58 1 16 54 2 2 50 3 14 48 4 13 46 5 9 38 6 3 34 7 11 27 8 4 25 9 12 24 10 17 21 11 6 15 12 0 13 13 7 6 14 18 5 15 5 4 16 10 3 17 8 2 18 19 0 19 15 0 I4VEC_SORT_HEAP_INDEX_D_TEST: Normal end of execution. I4VEC_SUM_TEST Python version: 3.6.5 I4VEC_SUM sums the entries of an I4VEC. The vector: 0 2 1 10 2 9 3 6 4 4 The vector entries sum to 31 I4VEC_SUM_TEST: Normal end of execution. I4VEC_TRANSPOSE_PRINT_TEST Python version: 3.6.5 I4VEC_TRANSPOSE_PRINT prints an I4VEC with 5 entries to a row, and an optional title. My array: 1 2 3 4 5 6 7 8 9 10 11 12 I4VEC_TRANSPOSE_PRINT_TEST: Normal end of execution. I4VEC_UNIFORM_AB_TEST Python version: 3.6.5 I4VEC_UNIFORM_AB computes pseudorandom values in an interval [A,B]. The lower endpoint A = -100 The upper endpoint B = 200 The initial seed is 123456789 The random vector: 0 -35 1 187 2 149 3 69 4 25 5 -81 6 -23 7 -67 8 -87 9 90 10 -82 11 35 12 20 13 127 14 139 15 -100 16 170 17 5 18 -72 19 -96 I4VEC_UNIFORM_AB_TEST: Normal end of execution. INDEX_BOX_NEXT_2D_TEST Python version: 3.6.5 INDEX_BOX_NEXT_2D produces IJ indices that lie on the surface of a box in 2D. The box has logical dimensions: 5 by 3 # I J 1 1 1 2 1 2 3 1 3 4 2 1 5 2 3 6 3 1 7 3 3 8 4 1 9 4 3 10 5 1 11 5 2 12 5 3 INDEX_BOX_NEXT_2D_TEST: Normal end of execution. INDEX_BOX_NEXT_3D_TEST Python version: 3.6.5 INDEX_BOX_NEXT_3D produces IJK indices that lie on the surface of a box. The box has logical dimensions: 5 3 4 # I J K 1 1 1 1 2 1 1 2 3 1 1 3 4 1 1 4 5 1 2 1 6 1 2 2 7 1 2 3 8 1 2 4 9 1 3 1 10 1 3 2 11 1 3 3 12 1 3 4 13 2 1 1 14 2 1 2 15 2 1 3 16 2 1 4 17 2 2 1 18 2 2 4 19 2 3 1 20 2 3 2 21 2 3 3 22 2 3 4 23 3 1 1 24 3 1 2 25 3 1 3 26 3 1 4 27 3 2 1 28 3 2 4 29 3 3 1 30 3 3 2 31 3 3 3 32 3 3 4 33 4 1 1 34 4 1 2 35 4 1 3 36 4 1 4 37 4 2 1 38 4 2 4 39 4 3 1 40 4 3 2 41 4 3 3 42 4 3 4 43 5 1 1 44 5 1 2 45 5 1 3 46 5 1 4 47 5 2 1 48 5 2 2 49 5 2 3 50 5 2 4 51 5 3 1 52 5 3 2 53 5 3 3 54 5 3 4 INDEX_BOX_NEXT_3D_TEST: Normal end of execution. INDEX_BOX2_NEXT_2D_TEST Python version: 3.6.5 INDEX_BOX2_NEXT_2D produces IJ indices that lie on the surface of a box2 in 2D. The box has half-widths: 4 3 and has center cell: 10 20 # I J 1 6 17 2 6 18 3 6 19 4 6 20 5 6 21 6 6 22 7 6 23 8 7 17 9 7 23 10 8 17 11 8 23 12 9 17 13 9 23 14 10 17 15 10 23 16 11 17 17 11 23 18 12 17 19 12 23 20 13 17 21 13 23 22 14 17 23 14 18 24 14 19 25 14 20 26 14 21 27 14 22 28 14 23 INDEX_BOX2_NEXT_2D_TEST: Normal end of execution. INDEX_BOX2_NEXT_3D_TEST Python version: 3.6.5 INDEX_BOX2_NEXT_3D produces IJK indices that lie on the surface of a box. The box has half widths: 5 3 4 and central cell: 10 20 30 We will only print a PORTION of the data! # I J K 1 5 17 26 2 5 17 27 3 5 17 28 4 5 17 29 5 5 17 30 6 5 17 31 7 5 17 32 8 5 17 33 9 5 17 34 10 5 18 26 11 5 18 27 12 5 18 28 13 5 18 29 14 5 18 30 15 5 18 31 16 5 18 32 17 5 18 33 18 5 18 34 19 5 19 26 20 5 19 27 21 5 19 28 22 5 19 29 23 5 19 30 24 5 19 31 25 5 19 32 26 5 19 33 27 5 19 34 28 5 20 26 29 5 20 27 30 5 20 28 31 5 20 29 32 5 20 30 33 5 20 31 34 5 20 32 35 5 20 33 36 5 20 34 37 5 21 26 38 5 21 27 39 5 21 28 40 5 21 29 41 5 21 30 42 5 21 31 43 5 21 32 44 5 21 33 45 5 21 34 46 5 22 26 47 5 22 27 48 5 22 28 49 5 22 29 50 5 22 30 51 5 22 31 52 5 22 32 53 5 22 33 54 5 22 34 55 5 23 26 56 5 23 27 57 5 23 28 58 5 23 29 59 5 23 30 60 5 23 31 61 5 23 32 62 5 23 33 63 5 23 34 64 6 17 26 65 6 17 27 66 6 17 28 67 6 17 29 68 6 17 30 69 6 17 31 70 6 17 32 71 6 17 33 72 6 17 34 73 6 18 26 74 6 18 34 75 6 19 26 76 6 19 34 77 6 20 26 78 6 20 34 79 6 21 26 80 6 21 34 81 6 22 26 82 6 22 34 83 6 23 26 84 6 23 27 85 6 23 28 86 6 23 29 87 6 23 30 88 6 23 31 89 6 23 32 90 6 23 33 91 6 23 34 92 7 17 26 93 7 17 27 94 7 17 28 95 7 17 29 96 7 17 30 97 7 17 31 98 7 17 32 99 7 17 33 100 7 17 34 101 7 18 26 102 7 18 34 103 7 19 26 104 7 19 34 105 7 20 26 106 7 20 34 107 7 21 26 108 7 21 34 109 7 22 26 110 7 22 34 111 7 23 26 112 7 23 27 113 7 23 28 114 7 23 29 115 7 23 30 116 7 23 31 117 7 23 32 118 7 23 33 119 7 23 34 120 8 17 26 121 8 17 27 122 8 17 28 123 8 17 29 124 8 17 30 125 8 17 31 126 8 17 32 127 8 17 33 128 8 17 34 129 8 18 26 130 8 18 34 131 8 19 26 132 8 19 34 133 8 20 26 134 8 20 34 135 8 21 26 136 8 21 34 137 8 22 26 138 8 22 34 139 8 23 26 140 8 23 27 141 8 23 28 142 8 23 29 143 8 23 30 144 8 23 31 145 8 23 32 146 8 23 33 147 8 23 34 148 9 17 26 149 9 17 27 150 9 17 28 151 9 17 29 152 9 17 30 153 9 17 31 154 9 17 32 155 9 17 33 156 9 17 34 157 9 18 26 158 9 18 34 159 9 19 26 160 9 19 34 161 9 20 26 162 9 20 34 163 9 21 26 164 9 21 34 165 9 22 26 166 9 22 34 167 9 23 26 168 9 23 27 169 9 23 28 170 9 23 29 171 9 23 30 172 9 23 31 173 9 23 32 174 9 23 33 175 9 23 34 176 10 17 26 177 10 17 27 178 10 17 28 179 10 17 29 180 10 17 30 181 10 17 31 182 10 17 32 183 10 17 33 184 10 17 34 185 10 18 26 186 10 18 34 187 10 19 26 188 10 19 34 189 10 20 26 190 10 20 34 191 10 21 26 192 10 21 34 193 10 22 26 194 10 22 34 195 10 23 26 196 10 23 27 197 10 23 28 198 10 23 29 199 10 23 30 200 10 23 31 201 10 23 32 202 10 23 33 203 10 23 34 204 11 17 26 205 11 17 27 206 11 17 28 207 11 17 29 208 11 17 30 209 11 17 31 210 11 17 32 211 11 17 33 212 11 17 34 213 11 18 26 214 11 18 34 215 11 19 26 216 11 19 34 217 11 20 26 218 11 20 34 219 11 21 26 220 11 21 34 221 11 22 26 222 11 22 34 223 11 23 26 224 11 23 27 225 11 23 28 226 11 23 29 227 11 23 30 228 11 23 31 229 11 23 32 230 11 23 33 231 11 23 34 232 12 17 26 233 12 17 27 234 12 17 28 235 12 17 29 236 12 17 30 237 12 17 31 238 12 17 32 239 12 17 33 240 12 17 34 241 12 18 26 242 12 18 34 243 12 19 26 244 12 19 34 245 12 20 26 246 12 20 34 247 12 21 26 248 12 21 34 249 12 22 26 250 12 22 34 251 12 23 26 252 12 23 27 253 12 23 28 254 12 23 29 255 12 23 30 256 12 23 31 257 12 23 32 258 12 23 33 259 12 23 34 260 13 17 26 261 13 17 27 262 13 17 28 263 13 17 29 264 13 17 30 265 13 17 31 266 13 17 32 267 13 17 33 268 13 17 34 269 13 18 26 270 13 18 34 271 13 19 26 272 13 19 34 273 13 20 26 274 13 20 34 275 13 21 26 276 13 21 34 277 13 22 26 278 13 22 34 279 13 23 26 280 13 23 27 281 13 23 28 282 13 23 29 283 13 23 30 284 13 23 31 285 13 23 32 286 13 23 33 287 13 23 34 288 14 17 26 289 14 17 27 290 14 17 28 291 14 17 29 292 14 17 30 293 14 17 31 294 14 17 32 295 14 17 33 296 14 17 34 297 14 18 26 298 14 18 34 299 14 19 26 300 14 19 34 301 14 20 26 302 14 20 34 303 14 21 26 304 14 21 34 305 14 22 26 306 14 22 34 307 14 23 26 308 14 23 27 309 14 23 28 310 14 23 29 311 14 23 30 312 14 23 31 313 14 23 32 314 14 23 33 315 14 23 34 316 15 17 26 317 15 17 27 318 15 17 28 319 15 17 29 320 15 17 30 321 15 17 31 322 15 17 32 323 15 17 33 324 15 17 34 325 15 18 26 326 15 18 27 327 15 18 28 328 15 18 29 329 15 18 30 330 15 18 31 331 15 18 32 332 15 18 33 333 15 18 34 334 15 19 26 335 15 19 27 336 15 19 28 337 15 19 29 338 15 19 30 339 15 19 31 340 15 19 32 341 15 19 33 342 15 19 34 343 15 20 26 344 15 20 27 345 15 20 28 346 15 20 29 347 15 20 30 348 15 20 31 349 15 20 32 350 15 20 33 351 15 20 34 352 15 21 26 353 15 21 27 354 15 21 28 355 15 21 29 356 15 21 30 357 15 21 31 358 15 21 32 359 15 21 33 360 15 21 34 361 15 22 26 362 15 22 27 363 15 22 28 364 15 22 29 365 15 22 30 366 15 22 31 367 15 22 32 368 15 22 33 369 15 22 34 370 15 23 26 371 15 23 27 372 15 23 28 373 15 23 29 374 15 23 30 375 15 23 31 376 15 23 32 377 15 23 33 378 15 23 34 INDEX_BOX2_NEXT_3D_TEST: Normal end of execution. INDEX_NEXT0_TEST Python version: 3.6.5 INDEX_NEXT0 generates all indices of an array of given shape, with lower limit 1 and given upper limit. Number of index entries = 3 Coordinate maximum HI = 3 Index arrays: 1 1 1 2 1 1 3 1 1 1 2 1 2 2 1 3 2 1 1 3 1 2 3 1 3 3 1 1 1 2 2 1 2 3 1 2 1 2 2 2 2 2 3 2 2 1 3 2 2 3 2 3 3 2 1 1 3 2 1 3 3 1 3 1 2 3 2 2 3 3 2 3 1 3 3 2 3 3 3 3 3 INDEX_NEXT0_TEST: Normal end of execution. INDEX_NEXT1_TEST Python version: 3.6.5 INDEX_NEXT1 generates all indices of an array of given shape, with lower limit 1 and given upper limits. Number of index entries = 3 Coordinate maximum indices: 0 4 1 2 2 3 Index arrays: 1 1 1 2 1 1 3 1 1 4 1 1 1 2 1 2 2 1 3 2 1 4 2 1 1 1 2 2 1 2 3 1 2 4 1 2 1 2 2 2 2 2 3 2 2 4 2 2 1 1 3 2 1 3 3 1 3 4 1 3 1 2 3 2 2 3 3 2 3 4 2 3 INDEX_NEXT1_TEST: Normal end of execution. INDEX_NEXT2_TEST INDEX_NEXT2 generates all indices of an array of given shape with given lower and upper limits. Number of index entries = 3 Coordinate, Maximum Index 0 10 11 1 -5 -3 2 0 1 Index arrays: 10 -5 0 11 -5 0 10 -4 0 11 -4 0 10 -3 0 11 -3 0 10 -5 1 11 -5 1 10 -4 1 11 -4 1 10 -3 1 11 -3 1 INDEX_NEXT2_TEST: Normal end of execution. INDEX_RANK0_TEST Python version: 3.6.5 INDEX_RANK0 ranks an index with lower limit 1 and given upper limit. Number of index entries = 3 Coordinate maximum index = 3 The index array: 0 3 1 1 2 2 The rank of this object is 12 INDEX_RANK0_TEST: Normal end of execution. INDEX_RANK1_TEST Python version: 3.6.5 INDEX_RANK1 ranks an index with lower limit 1 and given upper limits. Number of index entries = 3 Coordinate, Maximum Index 0 4 1 2 2 3 The index array: 0 4 1 1 2 2 The rank of this object is 12 INDEX_RANK1_TEST: Normal end of execution. INDEX_RANK2_TEST Python version: 3.6.5 INDEX_RANK2 ranks an index with given lower and upper limits. Number of index entries = 3 Coordinate, Minimum index, Maximum Index 0 1 2 1 10 11 2 4 6 The index array: 0 1 1 11 2 5 The rank of this object is 7 INDEX_RANK2_TEST: Normal end of execution. INDEX_UNRANK0_TEST Python version: 3.6.5 INDEX_UNRANK0 unranks a multi-index. The multi-index has dimension 3 The upper limit is HI = 3 Rank, Multi-Index: 1 1 1 1 2 2 1 1 3 3 1 1 4 1 2 1 5 2 2 1 6 3 2 1 7 1 3 1 8 2 3 1 9 3 3 1 10 1 1 2 11 2 1 2 12 3 1 2 13 1 2 2 14 2 2 2 15 3 2 2 16 1 3 2 17 2 3 2 18 3 3 2 19 1 1 3 20 2 1 3 21 3 1 3 22 1 2 3 23 2 2 3 24 3 2 3 25 1 3 3 26 2 3 3 27 3 3 3 INDEX_UNRANK0_TEST: Normal end of execution. INDEX_UNRANK1_TEST Python version: 3.6.5 INDEX_UNRANK1 unranks a multi-index. The multi-index has dimension 3 The upper limits: 0 4 1 2 2 3 Rank, Multi-Index: 1 1 1 1 2 2 1 1 3 3 1 1 4 4 1 1 5 1 2 1 6 2 2 1 7 3 2 1 8 4 2 1 9 1 1 2 10 2 1 2 11 3 1 2 12 4 1 2 13 1 2 2 14 2 2 2 15 3 2 2 16 4 2 2 17 1 1 3 18 2 1 3 19 3 1 3 20 4 1 3 21 1 2 3 22 2 2 3 23 3 2 3 24 4 2 3 INDEX_UNRANK1_TEST: Normal end of execution. INDEX_UNRANK2_TEST Python version: 3.6.5 INDEX_UNRANK2 unranks a multi-index. The multi-index has dimension 3 The lower and upper limits are: 0 1 2 1 10 11 2 4 6 Rank, Multi-Index: 7 1 11 5 INDEX_UNRANK2_TEST: Normal end of execution. INVERSE_MOD_N_TEST Python version: 3.6.5 INVERSE_MOD_N seeks Y, the inverse of B mod N, so that mod ( B * Y, N ) = 1, but returns 0 if the inverse does not exist. B N Y Z = mod ( B * Y, N ) 1 2 1 1 1 3 1 1 2 3 2 1 1 4 1 1 2 4 0 0 3 4 3 1 1 5 1 1 2 5 3 1 3 5 2 1 4 5 4 1 1 6 1 1 2 6 0 0 3 6 0 0 4 6 0 0 5 6 5 1 1 7 1 1 2 7 4 1 3 7 5 1 4 7 2 1 5 7 3 1 6 7 6 1 1 8 1 1 2 8 0 0 3 8 3 1 4 8 0 0 5 8 5 1 6 8 0 0 7 8 7 1 1 9 1 1 2 9 5 1 3 9 0 0 4 9 7 1 5 9 2 1 6 9 0 0 7 9 4 1 8 9 8 1 1 10 1 1 2 10 0 0 3 10 7 1 4 10 0 0 5 10 0 0 6 10 0 0 7 10 3 1 8 10 0 0 9 10 9 1 INVERSE_MOD_N_TEST Normal end of execution INVERSION_TO_PERM0_TEST Python version: 3.6.5 INVERSION_TO_PERM0: inversion => permutation (0,...,N-1). Permutation: 0 2 1 4 2 0 3 3 4 1 Inversion: 0 0 1 0 2 2 3 1 4 3 Recovered permutation: 0 2 1 4 2 0 3 3 4 1 INVERSION_TO_PERM0_TEST: Normal end of execution. INVOLUTE_ENUM_TEST Python version: 3.6.5 INVOLUTE_ENUM counts involutions; N # of involutions 0 1 1 1 2 2 3 4 4 10 5 26 6 76 7 232 8 764 9 2620 10 9496 INVOLUTE_ENUM_TEST: Normal end of execution. JFRAC_TO_RFRAC_TEST Python version: 3.6.5 JFRAC_TO_RFRAC converts a J fraction to a rational polynomial fraction. RFRAC P: 0: 0.218418 1: 0.956318 2: 0.829509 3: 0.561695 4: 0.415307 5: 0.0661187 RFRAC Q: 0: 0.641848 1: 0.273997 2: 0.109216 3: 1.57976 4: 0.153816 5: 1.12019 6: 1 JFRAC R: 0: 0.0661187 1: 24.0763 2: -0.310636 3: 1.40276 4: 5.16789 5: -0.0686133 JFRAC S: 0: -5.16104 1: 4.91564 2: -0.94563 3: -1.04001 4: 2.91888 5: 0.432351 Recovered RFRAC P: 0: 0.218418 1: 0.956318 2: 0.829509 3: 0.561695 4: 0.415307 5: 0.0661187 Recovered RFRAC Q: 0: 0.641848 1: 0.273997 2: 0.109216 3: 1.57976 4: 0.153816 5: 1.12019 6: 1 JFRAC_TO_RFRAC_TEST: Normal end of execution. JOSEPHUS_TEST Python version: 3.6.5 JOSEPHUS solves Josephus problems. N M K X 41 3 41 31 41 -38 41 31 41 3 40 16 64 2 64 1 1000 2 1000 977 JOSEPHUS_TEST Normal end of execution. KSUB_NEXT_TEST Python version: 3.6.5 KSUB_NEXT generates all K subsets of an N set in lexicographic order. 1 1 2 3 2 1 2 4 3 1 2 5 4 1 3 4 5 1 3 5 6 1 4 5 7 2 3 4 8 2 3 5 9 2 4 5 10 3 4 5 KSUB_NEXT_TEST: Normal end of execution. KSUB_NEXT2_TEST Python version: 3.6.5 KSUB_NEXT2 generates the next K subset of an N set by the revolving door method. Rank Subset Add Remove ----------- 1 1 2 3 0 0 2 1 3 4 4 2 3 2 3 4 2 1 4 1 2 4 1 3 5 1 4 5 5 2 6 2 4 5 2 1 7 3 4 5 3 2 8 1 3 5 1 4 9 2 3 5 2 1 10 1 2 5 1 3 KSUB_NEXT2_TEST: Normal end of execution. KSUB_NEXT3_TEST Python version: 3.6.5 KSUB_NEXT3 generates all K subsets of an N set using the revolving door method. Rank Subset Added Removed 1 1 2 3 -1 -1 2 1 3 4 4 2 3 2 3 4 2 1 4 1 2 4 1 3 5 1 4 5 5 2 6 2 4 5 2 1 7 3 4 5 3 2 8 1 3 5 1 4 9 2 3 5 2 1 10 1 2 5 1 3 KSUB_NEXT3_TEST: Normal end of execution. KSUB_NEXT4_TEST Python version: 3.6.5 KSUB_NEXT4 generates K subsets of an N set. N = 5 K = 3 Rank Subset 1 1 2 3 2 1 2 4 3 1 3 4 4 2 3 4 5 1 2 5 6 1 3 5 7 2 3 5 8 1 4 5 9 2 4 5 10 3 4 5 KSUB_NEXT4_TEST: Normal end of execution. KSUB_RANDOM_TEST Python version: 3.6.5 KSUB_RANDOM generates a random K subset of an N set. Set size is N = 5 Subset size is K = 3 1 2 3 2 3 2 1 2 3 2 3 3 2 3 3 KSUB_RANDOM_TEST: Normal end of execution. KSUB_RANDOM2_TEST Python version: 3.6.5 KSUB_RANDOM2 generates a random K subset of an N set. Set size is N = 5 Subset size is K = 3 1 4 5 1 2 3 1 3 4 1 4 5 1 2 3 3 4 5 2 3 5 2 4 5 1 2 4 1 3 5 KSUB_RANDOM2_TEST: Normal end of execution. KSUB_RANDOM3_TEST Python version: 3.6.5 KSUB_RANDOM3 generates a random K subset of an N set. Set size is N = 5 Subset size is K = 3 1 0 0 1 1 1 1 0 1 0 1 0 0 1 1 1 1 1 0 0 0 1 0 1 1 1 1 0 1 0 1 0 0 1 1 1 0 1 0 1 1 0 0 1 1 0 1 0 1 1 KSUB_RANDOM3_TEST: Normal end of execution. KSUB_RANDOM4_TEST Python version: 3.6.5 KSUB_RANDOM4 generates a random K subset of an N set. Set size is N = 100 Subset size is K = 3 44 59 77 16 90 93 5 58 73 5 77 79 12 13 20 8 9 56 13 19 76 6 42 69 23 96 98 56 59 83 KSUB_RANDOM4_TEST: Normal end of execution. KSUB_RANDOM5_TEST Python version: 3.6.5 KSUB_RANDOM5 generates a random K subset of an N set. Set size is N = 100 Subset size is K = 3 21 83 95 8 42 56 6 11 25 7 46 63 40 75 80 0 36 89 2 9 86 2 13 84 13 26 91 28 35 82 KSUB_RANDOM5_TEST: Normal end of execution. KSUB_RANK_TEST Python version: 3.6.5 KSUB_RANK: rank of a K subset of an N set. For N = 5 and K = 3 the subset is: 1 3 5 The rank is 6 KSUB_RANK_TEST: Normal end of execution. KSUB_TO_COMP_TEST Python version: 3.6.5 KSUB_TO_COMP returns the composition corresponding to a K subset. KSUB: 1 6 8 9 COMP: 0 5 2 1 5 KSUB: 2 7 10 11 COMP: 1 5 3 1 3 KSUB: 3 4 7 14 COMP: 2 1 3 7 0 KSUB: 3 6 10 11 COMP: 2 3 4 1 3 KSUB: 2 6 8 14 COMP: 1 4 2 6 0 KSUB_TO_COMP_TEST: Normal end of execution. KSUB_TO_COMPNZ_TEST Python version: 3.6.5 KSUB_TO_COMPNZ returns the nonzero composition corresponding to a K subset. KSUB: 1 6 8 9 COMPNZ: 1 5 2 1 6 KSUB: 2 7 10 11 COMPNZ: 2 5 3 1 4 KSUB: 3 4 7 14 COMPNZ: 3 1 3 7 1 KSUB: 3 6 10 11 COMPNZ: 3 3 4 1 4 KSUB: 2 6 8 14 COMPNZ: 2 4 2 6 1 KSUB_TO_COMPNZ_TEST: Normal end of execution. KSUB_UNRANK_TEST Python version: 3.6.5 KSUB_UNRANK: find the K-subset of an N set of a given rank. N is 5 K is 3 and the desired rank is 8 The subset of the given rank is: 1 4 5 KSUB_UNRANK_TEST: Normal end of execution. L4VEC_NEXT_TEST Python version: 3.6.5 L4VEC_NEXT generates logical vectors of dimension N one at a time. Vector size N = 2 0: False False 1: False True 2: True False 3: True True Vector size N = 3 0: False False False 1: False False True 2: False True False 3: False True True 4: True False False 5: True False True 6: True True False 7: True True True L4VEC_NEXT_TEST: Normal end of execution. MOEBIUS_VALUES_TEST: Python version: 3.6.5 MOEBIUS_VALUES stores values of the MOEBIUS function. N MOEBIUS(N) 1 1 2 -1 3 -1 4 0 5 -1 6 1 7 -1 8 0 9 0 10 1 11 -1 12 0 13 -1 14 1 15 1 16 0 17 -1 18 0 19 -1 20 0 MOEBIUS_VALUES_TEST: Normal end of execution. MONOMIAL_COUNT_TEST Python version: 3.6.5 MONOMIAL_COUNT counts the number of monomials of degrees 0 through DEGREE_MAX in a space of dimension DIM. Using DEGREE_MAX = 9 Dim Count 1 10 2 55 3 220 4 715 5 2002 6 5005 MONOMIAL_COUNT_TEST: Normal end of execution. MONOMIAL_COUNTS_TEST Python version: 3.6.5 MONOMIAL_COUNTS counts the number of monomials of degrees 0 through DEGREE_MAX in a space of dimension DIM. DIM = 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 10 1 Total 10 DIM = 2 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 Total 55 DIM = 3 1 1 2 3 3 6 4 10 5 15 6 21 7 28 8 36 9 45 10 55 Total 220 DIM = 4 1 1 2 4 3 10 4 20 5 35 6 56 7 84 8 120 9 165 10 220 Total 715 DIM = 5 1 1 2 5 3 15 4 35 5 70 6 126 7 210 8 330 9 495 10 715 Total 2002 DIM = 6 1 1 2 6 3 21 4 56 5 126 6 252 7 462 8 792 9 1287 10 2002 Total 5005 MONOMIAL_COUNTS_TEST: Normal end of execution. MORSE_THUE_TEST Python version: 3.6.5 MORSE_THUE computes the Morse-Thue numbers. 0 0 1 1 2 1 3 0 4 1 5 0 6 0 7 1 8 1 9 0 10 0 11 1 12 0 13 1 14 1 15 0 16 1 17 0 18 0 19 1 20 0 21 1 22 1 23 0 24 0 25 1 26 1 27 0 28 1 29 0 30 0 31 1 32 1 33 0 34 0 35 1 36 0 37 1 38 1 39 0 40 0 41 1 42 1 43 0 44 1 45 0 46 0 47 1 48 0 49 1 50 1 51 0 52 1 53 0 54 0 55 1 56 1 57 0 58 0 59 1 60 0 61 1 62 1 63 0 64 1 65 0 66 0 67 1 68 0 69 1 70 1 71 0 72 0 73 1 74 1 75 0 76 1 77 0 78 0 79 1 80 0 81 1 82 1 83 0 84 1 85 0 86 0 87 1 88 1 89 0 90 0 91 1 92 0 93 1 94 1 95 0 96 0 97 1 98 1 99 0 100 1 MORSE_THUE_TEST Normal end of execution. MULTINOMIAL_COEF1_TEST Python version: 3.6.5 MULTINOMIAL_COEF1 computes multinomial coefficients using the Gamma function Line 10 of the BINOMIAL table: 0 10 1 1 9 10 2 8 45 3 7 120 4 6 210 5 5 252 6 4 210 7 3 120 8 2 45 9 1 10 10 0 1 Level 5 of the TRINOMIAL coefficients: 0 0 5 1 0 1 4 5 0 2 3 10 0 3 2 10 0 4 1 5 0 5 0 1 1 0 4 5 1 1 3 20 1 2 2 30 1 3 1 20 1 4 0 5 2 0 3 10 2 1 2 30 2 2 1 30 2 3 0 10 3 0 2 10 3 1 1 20 3 2 0 10 4 0 1 5 4 1 0 5 5 0 0 1 MULTINOMIAL_COEF1_TEST: Normal end of execution. MULTINOMIAL_COEF2_TEST Python version: 3.6.5 MULTINOMIAL_COEF2 computes multinomial coefficients directly. Line 10 of the BINOMIAL table: 0 10 1 1 9 10 2 8 45 3 7 120 4 6 210 5 5 252 6 4 210 7 3 120 8 2 45 9 1 10 10 0 1 Level 5 of the TRINOMIAL coefficients: 0 0 5 1 0 1 4 5 0 2 3 10 0 3 2 10 0 4 1 5 0 5 0 1 1 0 4 5 1 1 3 20 1 2 2 30 1 3 1 20 1 4 0 5 2 0 3 10 2 1 2 30 2 2 1 30 2 3 0 10 3 0 2 10 3 1 1 20 3 2 0 10 4 0 1 5 4 1 0 5 5 0 0 1 MULTINOMIAL_COEF2_TEST: Normal end of execution. MULTIPERM_ENUM_TEST: Python version: 3.6.5 MULTIPERM_ENUM enumerates multipermutations. N is the number of objects to be permuted. K is the number of distinct types of objects. COUNTS is the number of objects of each type. NUMBER is the number of multipermutations. Number N K Counts(1:K) 5 5 2 4 1 1 5 1 5 5 5 2 1 4 1 5 1 5 60 5 4 1 1 1 2 MULTIPERM_ENUM_TEST: Normal end of execution. MULTIPERM_NEXT_TEST Python version: 3.6.5 MULTIPERM_NEXT computes multipermutations in lexical order. 1 1 2 2 3 3 3 2 1 2 3 2 3 3 3 1 2 3 3 2 3 4 1 2 3 3 3 2 5 1 3 2 2 3 3 6 1 3 2 3 2 3 7 1 3 2 3 3 2 8 1 3 3 2 2 3 9 1 3 3 2 3 2 10 1 3 3 3 2 2 11 2 1 2 3 3 3 12 2 1 3 2 3 3 13 2 1 3 3 2 3 14 2 1 3 3 3 2 15 2 2 1 3 3 3 16 2 2 3 1 3 3 17 2 2 3 3 1 3 18 2 2 3 3 3 1 19 2 3 1 2 3 3 20 2 3 1 3 2 3 21 2 3 1 3 3 2 22 2 3 2 1 3 3 23 2 3 2 3 1 3 24 2 3 2 3 3 1 25 2 3 3 1 2 3 26 2 3 3 1 3 2 27 2 3 3 2 1 3 28 2 3 3 2 3 1 29 2 3 3 3 1 2 30 2 3 3 3 2 1 31 3 1 2 2 3 3 32 3 1 2 3 2 3 33 3 1 2 3 3 2 34 3 1 3 2 2 3 35 3 1 3 2 3 2 36 3 1 3 3 2 2 37 3 2 1 2 3 3 38 3 2 1 3 2 3 39 3 2 1 3 3 2 40 3 2 2 1 3 3 41 3 2 2 3 1 3 42 3 2 2 3 3 1 43 3 2 3 1 2 3 44 3 2 3 1 3 2 45 3 2 3 2 1 3 46 3 2 3 2 3 1 47 3 2 3 3 1 2 48 3 2 3 3 2 1 49 3 3 1 2 2 3 50 3 3 1 2 3 2 51 3 3 1 3 2 2 52 3 3 2 1 2 3 53 3 3 2 1 3 2 54 3 3 2 2 1 3 55 3 3 2 2 3 1 56 3 3 2 3 1 2 57 3 3 2 3 2 1 58 3 3 3 1 2 2 59 3 3 3 2 1 2 60 3 3 3 2 2 1 MULTIPERM_NEXT_TEST: Normal end of execution. NIM_SUM_TEST Python version: 3.6.5 NIM_SUM computes the Nim sum of two integers. I J Nim(I+J) I1, I2, I3 in decimal: 218 957 871 I1, I2, I3 in binary: 0 1 0 1 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 1 1 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 1 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 I1, I2, I3 in decimal: 830 562 268 I1, I2, I3 in binary: 0 1 1 1 1 1 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 I1, I2, I3 in decimal: 415 66 477 I1, I2, I3 in binary: 1 1 1 1 1 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 1 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 I1, I2, I3 in decimal: 257 110 367 I1, I2, I3 in binary: 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 I1, I2, I3 in decimal: 43 634 593 I1, I2, I3 in binary: 1 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 NIM_SUM_TEST: Normal end of execution. PADOVAN_TEST Python version: 3.6.5 PADOVAN computes the Padovan numbers. Initial Padovan sequence: 0 1 1 1 2 1 3 2 4 2 5 3 6 4 7 5 8 7 9 9 PADOVAN_TEST: Normal end of execution. PELL_BASIC_TEST Python version: 3.6.5 PELL_BASIC solves the basic Pell equation. D X Y R 2 2 1 2 3 2 1 1 5 5 2 5 6 5 2 1 7 8 3 1 8 3 1 1 10 10 3 10 11 10 3 1 12 7 2 1 13 379 105 316 14 15 4 1 15 4 1 1 17 17 4 17 18 17 4 1 19 170 39 1 20 9 2 1 PELL_BASIC_TEST Normal end of execution. PELL_NEXT_TEST Python version: 3.6.5 PELL_NEXT computes the "next" solution of the Pell equation. D X Y R 2 2 1 2 6 4 4 3 2 1 1 7 4 1 5 5 2 5 45 20 25 6 5 2 1 49 20 1 7 8 3 1 127 48 1 8 3 1 1 17 6 1 10 10 3 10 190 60 100 11 10 3 1 199 60 1 12 7 2 1 97 28 1 13 379 105 316 286966 79590 99856 14 15 4 1 449 120 1 15 4 1 1 31 8 1 17 17 4 17 561 136 289 18 17 4 1 577 136 1 19 170 39 1 57799 13260 1 20 9 2 1 161 36 1 PELL_NEXT_TEST Normal end of execution. PENT_ENUM_TEST Python version: 3.6.5 PENT_ENUM counts points in pentagons; N Pent(N) 0 0 1 1 2 5 3 12 4 22 5 35 6 51 7 70 8 92 9 117 10 145 PENT_ENUM_TEST: Normal end of execution. PERM_ASCEND_TEST Python version: 3.6.5 PERM_ASCEND determines the length of the longest increasing subsequence in a permutation. The permutation: 0 1 2 3 4 5 6 7 8 1 2 8 5 6 7 4 3 0 The longest increasing subsequence has length 5 A longest increasing subsequence: 0 1 1 2 2 5 3 6 4 7 PERM_ASCEND_TEST Normal end of execution. PERM_FIXED_ENUM_TEST Python version: 3.6.5 PERM_FIXED_ENUM enumerates the permutations of N objects that leave M unchanged. For this test, N = 10 M F(N,M) 0 1334961 1 1334960 2 667485 3 222480 4 55650 5 11088 6 1890 7 240 8 45 9 0 10 1 PERM_FIXED_ENUM_TEST: Normal end of execution. PERM0_BREAK_COUNT_TEST Python version: 3.6.5 PERM0_BREAK_COUNT counts the breaks in a permutation. The permutation: 0 1 2 3 4 5 3 4 1 0 5 2 The number of breaks is 5 PERM0_BREAK_COUNT_TEST: Normal end of execution. PERM0_CHECK_TEST Python version: 3.6.5 PERM0_CHECK checks a permutation of 0,...,N-1. Permutation 1: 5 2 3 4 1 PERM0_CHECK - Warning! Permutation is missing the value 0. Permutation 2: 4 1 3 0 2 Permutation 3: 0 2 1 3 2 PERM0_CHECK - Warning! Permutation is missing the value 4. PERM0_CHECK_TEST: Normal end of execution. PERM0_CYCLE_TEST Python version: 3.6.5 PERM0_CYCLE analyzes a permutation. The permutation: 0 1 2 3 4 5 6 7 8 1 2 8 5 6 7 4 3 0 S = 1 NCYCLE = 3 The permutation cycle tags: 0 1 2 3 4 5 6 7 8 -1 1 1 -1 -1 1 1 1 1 PERM0_CYCLE_TEST: Normal end of execution. PERM0_DISTANCE_TEST Python version: 3.6.5 PERM0_DISTANCE computes the Ulam metric distance between two permutations. Permutation P1 0 1 2 3 4 5 6 7 8 9 3 2 1 9 0 6 8 5 7 4 Permutation P2 0 1 2 3 4 5 6 7 8 9 8 2 4 6 7 5 0 3 9 1 Permutation P3 0 1 2 3 4 5 6 7 8 9 1 3 0 2 7 5 8 6 9 4 K(P1,P1) should be 0. K(P1,P1) = 0 K(P1,P2) should equal K(P2,P1). K(P1,P2) = 7 K(P2,P1) = 7 K(P1,P3) <= K(P1,P2) + K(P2,P3). K(P1,P3) = 6 K(P1,P2) = 7 K(P2,P3) = 6 K(P1,P2) + K(P2,P3) = 13 PERM0_DISTANCE_TEST: Normal end of execution. PERM0_FREE_TEST Python version: 3.6.5 PERM0_FREE returns the unused values in a partial permutation. Partial permutation: 4 Values not yet used: 0 1 2 3 Partial permutation: 4 1 Values not yet used: 0 2 3 Partial permutation: 4 1 2 Values not yet used: 0 3 Partial permutation: 4 1 2 3 Values not yet used: 0 Partial permutation: 4 1 2 3 0 Values not yet used:(empty vector) PERM0_FREE_TEST: Normal end of execution. PERM0_INVERSE_TEST Python version: 3.6.5 PERM0_INVERSE inverts a permutation of (0,...,N-1) The original permutation: 0 1 2 3 4 5 6 3 2 4 0 6 5 1 The inverted permutation: 0 1 2 3 4 5 6 3 6 1 0 2 5 4 PERM0_INVERSE_TEST: Normal end of execution. PERM0_INVERSE2_TEST Python version: 3.6.5 PERM0_INVERSE2 inverts a permutation in place. The original permutation: 0 1 2 3 4 5 6 3 2 4 0 6 5 1 The inverted permutation: 0 1 2 3 4 5 6 3 6 1 0 2 5 4 PERM0_INVERSE2_TEST: Normal end of execution. PERM0_INVERSE3_TEST Python version: 3.6.5 PERM0_INVERSE3 inverts a permutation. The original permutation: 0 1 2 3 4 5 6 3 2 4 0 6 5 1 The inverted permutation: 0 1 2 3 4 5 6 3 6 1 0 2 5 4 PERM0_INVERSE3_TEST: Normal end of execution. PERM0_LEX_NEXT_TEST Python version: 3.6.5 PERM0_LEX_NEXT generates permutations in order. 0 1 2 3 0 1 3 2 0 2 1 3 0 2 3 1 0 3 1 2 0 3 2 1 1 0 2 3 1 0 3 2 1 2 0 3 1 2 3 0 1 3 0 2 1 3 2 0 2 0 1 3 2 0 3 1 2 1 0 3 2 1 3 0 2 3 0 1 2 3 1 0 3 0 1 2 3 0 2 1 3 1 0 2 3 1 2 0 3 2 0 1 3 2 1 0 PERM0_LEX_NEXT_TEST Normal end of execution. PERM0_MUL_TEST Python version: 3.6.5 PERM0_MUL multiplies two permutations. Permutation P1: 0 1 2 3 4 1 4 0 2 3 Permutation P2: 0 1 2 3 4 2 1 0 3 4 Product permutation: 0 1 2 3 4 1 4 2 0 3 PERM0_MUL_TEST: Normal end of execution. PERM0_NEXT_TEST Python version: 3.6.5 PERM0_NEXT generates permutations. 0 1 2 3 1 0 2 3 2 0 1 3 0 2 1 3 1 2 0 3 2 1 0 3 3 1 0 2 1 3 0 2 0 3 1 2 3 0 1 2 1 0 3 2 0 1 3 2 0 2 3 1 2 0 3 1 3 0 2 1 0 3 2 1 2 3 0 1 3 2 0 1 3 2 1 0 2 3 1 0 1 3 2 0 3 1 2 0 2 1 3 0 1 2 3 0 PERM0_NEXT_TEST: Normal end of execution. PERM0_NEXT3_TEST Python version: 3.6.5 PERM0_NEXT3 generates permutations in order. 0 1 2 3 0 1 3 2 0 3 1 2 3 0 1 2 3 0 2 1 0 3 2 1 0 2 3 1 0 2 1 3 2 0 1 3 2 0 3 1 2 3 0 1 3 2 0 1 3 2 1 0 2 3 1 0 2 1 3 0 2 1 0 3 1 2 0 3 1 2 3 0 1 3 2 0 3 1 2 0 3 1 0 2 1 3 0 2 1 0 3 2 1 0 2 3 PERM0_NEXT3_TEST: Normal end of execution. PERM0_PRINT_TEST Python version: 3.6.5 PERM0_PRINT prints a permutation. A 0-based permutation: 0 1 2 3 4 5 6 6 1 3 0 4 2 5 PERM0_PRINT_TEST Normal end of execution. PERM0_RANDOM_TEST Python version: 3.6.5 PERM0_RANDOM randomly selects a 0-based permutation. 2 9 8 6 3 5 7 4 0 1 6 1 5 2 8 4 0 9 3 7 0 1 8 2 4 5 7 9 3 6 3 8 4 7 0 9 2 5 6 1 1 7 5 4 0 6 8 2 3 9 PERM0_RANDOM_TEST Normal end of execution. PERM0_RANDOM2_TEST Python version: 3.6.5 PERM0_RANDOM2 randomly selects a 0-based permutation. 3 2 1 9 0 6 8 5 7 4 8 2 4 6 7 5 0 3 9 1 1 3 0 2 7 5 8 6 9 4 7 9 6 8 4 1 3 2 0 5 4 5 9 1 3 7 8 0 2 6 PERM0_RANDOM2_TEST Normal end of execution. PERM0_RANK_TEST Python version: 3.6.5 PERM0_RANK ranks a permutation. The permutation: 0 1 2 3 0 3 1 2 The rank is: 3 PERM0_RANK_TEST Normal end of execution. PERM0_SIGN_TEST Python version: 3.6.5 PERM0_SIGN computes the sign of a permutation of (0,...,N-1). RANK SIGN Permutation 0 1 0 1 2 3 1 -1 0 1 3 2 2 -1 0 2 1 3 3 1 0 2 3 1 4 1 0 3 1 2 5 -1 0 3 2 1 6 -1 1 0 2 3 7 1 1 0 3 2 8 1 1 2 0 3 9 -1 1 2 3 0 10 -1 1 3 0 2 11 1 1 3 2 0 12 1 2 0 1 3 13 -1 2 0 3 1 14 -1 2 1 0 3 15 1 2 1 3 0 16 1 2 3 0 1 17 -1 2 3 1 0 18 -1 3 0 1 2 19 1 3 0 2 1 20 1 3 1 0 2 21 -1 3 1 2 0 22 -1 3 2 0 1 23 1 3 2 1 0 PERM0_SIGN_TEST Normal end of execution. PERM0_TO_EQUIV_TEST Python version: 3.6.5 PERM0_TO_EQUIV returns the set partition or equivalence classes determined by a permutation. The input permutation: 0 1 2 3 4 5 6 7 8 1 2 8 5 6 7 4 3 0 The partition: Set Size 1 4 :: 0 1 2 8 2 3 :: 3 5 7 3 2 :: 4 6 PERM0_TO_EQUIV_TEST Normal end of execution PERM0_TO_INVERSION_TEST Python version: 3.6.5 PERM0_TO_INVERSION: permutation (0,...,N-1) => inversion. Permutation: 0 1 2 3 4 2 4 0 3 1 Inversion: 0 0 1 0 2 2 3 1 4 3 Recovered permutation: 0 1 2 3 4 2 4 0 3 1 PERM0_TO_INVERSION_TEST: Normal end of execution. PERM0_TO_YTB_TEST Python version: 3.6.5 PERM0_TO_YTB converts a permutation to a Young tableau. The permutation 0 1 2 3 4 5 6 6 1 3 0 4 2 5 The Young tableau 1 3 5 6 2 4 7 PERM0_TO_YTB_TEST: Normal end of execution. PERM0_UNRANK_TEST Python version: 3.6.5 PERM0_UNRANK, given a rank, computes the corresponding permutation. The requested rank is 6 The permutation: 0 1 2 3 0 3 2 1 PERM0_UNRANK_TEST Normal end of execution. PERM1_CANON_TO_CYCLE_TEST Python version: 3.6.5 PERM1_CANON_TO_CYCLE converts a permutation of (1,...,N) from canonical to cycle form. The permutation in canonical form: 1 2 3 4 5 6 4 5 2 1 6 3 The permutation in cycle form: 1 2 3 4 5 6 -4 5 -2 -1 6 3 PERM1_CANON_TO_CYCLE_TEST: Normal end of execution. PERM1_CHECK_TEST Python version: 3.6.5 PERM1_CHECK checks a permutation of 1,...,N. Permutation 1: 1 2 3 4 5 5 2 3 4 1 Permutation 2: 1 2 3 4 5 4 1 3 0 2 PERM1_CHECK - Warning! Permutation is missing the value 5. Permutation 3: 1 2 3 4 5 0 2 1 3 2 PERM1_CHECK - Warning! Permutation is missing the value 4. PERM1_CHECK_TEST: Normal end of execution. PERM1_CYCLE_TO_CANON_TEST Python version: 3.6.5 PERM1_CYCLE_TO_CANON converts a permutation of (1,...,N) from cycle to canonical form. The permutation in cycle form: 1 2 3 4 5 6 -6 3 1 -5 4 -2 The permutation in canonical form: 1 2 3 4 5 6 4 5 2 1 6 3 PERM1_CYCLE_TO_CANON_TEST Normal end of execution. PERM1_CYCLE_TO_INDEX_TEST Python version: 3.6.5 PERM1_CYCLE_TO_INDEX converts a permutation of (1,...,N) from cycle to standard index form. The standard index form permutation: 1 2 3 4 5 6 7 8 9 2 3 9 6 7 8 5 4 1 The permutation in cycle form: 1 2 3 4 5 6 7 8 9 -1 2 3 9 -4 6 8 -5 7 The standard index form permutation: 1 2 3 4 5 6 7 8 9 2 3 9 6 7 8 5 4 1 PERM1_CYCLE_TO_INDEX_TEST Normal end of execution. PERM1_INDEX_TO_CYCLE_TEST Python version: 3.6.5 PERM1_INDEX_TO_CYCLE converts a permutation of (1,...,N) from standard index to cycle form. The standard index form permutation: 1 2 3 4 5 6 7 8 9 2 3 9 6 7 8 5 4 1 The permutation in cycle form: 1 2 3 4 5 6 7 8 9 -1 2 3 9 -4 6 8 -5 7 The standard index form permutation: 1 2 3 4 5 6 7 8 9 2 3 9 6 7 8 5 4 1 PERM1_INDEX_TO_CYCLE_TEST Normal end of execution. PERM1_PRINT_TEST Python version: 3.6.5 PERM1_PRINT prints a permutation of (1,...,N). A 1-based permutation: 1 2 3 4 5 6 7 7 2 4 1 5 3 6 PERM1_PRINT_TEST Normal end of execution. PERRIN_TEST Python version: 3.6.5 PERRIN computes the Perrin numbers. The Perrin sequence: 0 3 1 0 2 2 3 3 4 2 5 5 6 5 7 7 8 10 9 12 10 17 11 22 12 29 13 39 14 51 15 68 16 90 17 119 18 158 19 209 PERRIN_TEST: Normal end of execution. PORD_CHECK_TEST Python version: 3.6.5 PORD_CHECK checks a partial ordering. The partial ordering matrix: Col: 0 1 2 3 4 Row 0: 1 0 0 0 0 1: 0 1 0 1 0 2: 1 0 1 1 0 3: 0 0 0 1 0 4: 1 1 1 1 1 5: 0 0 0 1 0 6: 1 0 1 1 0 7: 0 0 0 1 0 8: 0 0 0 0 0 9: 1 0 1 1 0 Col: 5 6 7 8 9 Row 0: 0 0 0 0 0 1: 1 0 1 0 0 2: 0 0 0 0 0 3: 0 0 0 0 0 4: 1 1 1 0 1 5: 1 0 1 0 0 6: 1 1 1 0 1 7: 0 0 1 0 0 8: 0 0 0 0 0 9: 0 0 1 0 1 CHECK FLAG = 0 0 means no error. 1 means illegal value of N. 2 means some A(I,J) and A(J,I) are both nonzero. PORD_CHECK_TEST: Normal end of execution. POWER_MOD_TEST Python version: 3.6.5 POWER_MOD computes the remainder of a power of an integer modulo another integer. A = 7 N = 50 M = 11 mod ( A^N, M ) = 1 A = 3 N = 118 M = 119 mod ( A^N, M ) = 32 POWER_MOD_TEST Normal end of execution. POWER_SERIES1_TEST Python version: 3.6.5 POWER_SERIES1 composes a power series Power series of G(x) = (1+F(x))^alpha N = 10 ALPHA = 7 Series for F(x): 1 0 0 0 0 0 0 0 0 0 Series for G(x): 7 21 35 35 21 7 1 0 0 0 POWER_SERIES1_TEST: Normal end of execution. POWER_SERIES2_TEST Python version: 3.6.5 POWER_SERIES2 composes a power series Here we compute the power series of G(x) = exp(F(x))-1 The number of terms is N = 4 Series for F(x): 0: -4 1: 0 2: 0 3: 0 Series for G(x): 0: -4 1: 8 2: -10.6667 3: 10.6667 POWER_SERIES2_TEST: Normal end of execution. POWER_SERIES3_TEST Python version: 3.6.5 POWER_SERIES3 composes a power series Power series of H(x) = G(F(x)) Number of terms, N = 4 Series for F(x): 0: 1 1: 1 2: 0 3: 0 Series for G(x): 0: 1 1: 1 2: 0 3: 0 Series for H(x): 0: 1 1: 2 2: 2 3: 3 POWER_SERIES3_TEST: Normal end of execution. POWER_SERIES4_TEST Python version: 3.6.5 POWER_SERIES4 composes a power series. Power series of H(x) = G(1/F(x)) Number of terms N = 10 Series for F(x): 0: 1 1: 0.5 2: 0.333333 3: 0.25 4: 0.2 5: 0.166667 6: 0.142857 7: 0.125 8: 0.111111 9: 0.1 Series for G(x): 0: 1 1: 0 2: 0 3: 0 4: 0 5: 0 6: 0 7: 0 8: 0 9: 0 Series for H(x): 0: 1 1: -0.5 2: 0.166667 3: -0.0416667 4: 0.00833333 5: -0.00138889 6: 0.000198413 7: -2.48016e-05 8: 2.75573e-06 9: -2.75573e-07 POWER_SERIES4_TEST: Normal end of execution. PRIME_TEST Python version: 3.6.5 PRIME returns primes from a table. Number of primes stored is 1600 I Prime(I) 1 2 2 3 3 5 4 7 5 11 6 13 7 17 8 19 9 23 10 29 1590 13411 1591 13417 1592 13421 1593 13441 1594 13451 1595 13457 1596 13463 1597 13469 1598 13477 1599 13487 1600 13499 PRIME_TEST Normal end of execution. PYTHAG_TRIPLE_NEXT_TEST Python version: 3.6.5 PYTHAG_TRIPLE_NEXT computes the "next" Pythagorean triple. I J A B C A^2+B^2 C^2 2 1 3 4 5 25 25 3 2 5 12 13 169 169 4 1 15 8 17 289 289 4 3 7 24 25 625 625 5 2 21 20 29 841 841 5 4 9 40 41 1681 1681 6 1 35 12 37 1369 1369 6 3 27 36 45 2025 2025 6 5 11 60 61 3721 3721 7 2 45 28 53 2809 2809 7 4 33 56 65 4225 4225 7 6 13 84 85 7225 7225 8 1 63 16 65 4225 4225 8 3 55 48 73 5329 5329 8 5 39 80 89 7921 7921 8 7 15 112 113 12769 12769 9 2 77 36 85 7225 7225 9 4 65 72 97 9409 9409 9 6 45 108 117 13689 13689 9 8 17 144 145 21025 21025 10 1 99 20 101 10201 10201 PYTHAG_TRIPLE_NEXT_TEST: Normal end of execution. R8_AGM_TEST: Python version: 3.6.5 R8_AGM computes the arithmetic geometric mean. X Y AGM AGM Exact Computed 22.000000 96.000000 52.27464119870424 52.27464119870424 83.000000 56.000000 68.83653005985852 68.83653005985852 42.000000 7.000000 20.65930119673401 20.65930119673401 26.000000 11.000000 17.69685487374365 17.69685487374367 4.000000 63.000000 23.8670497217533 23.8670497217533 6.000000 45.000000 20.71701598280599 20.71701598280599 40.000000 75.000000 56.12784225561668 56.12784225561668 80.000000 0.000000 0 0 90.000000 35.000000 59.26956508122964 59.26956508122989 9.000000 1.000000 3.936235503649555 3.936235503649556 53.000000 53.000000 53 53 1.000000 2.000000 1.456791031046907 1.456791031046907 1.000000 4.000000 2.243028580287603 2.243028580287603 1.000000 8.000000 3.615756177597363 3.615756177597363 R8_AGM_TEST Normal end of execution. R8_CHOOSE_TEST Python version: 3.6.5 R8_CHOOSE evaluates C(N,K). N K CNK 0 0 1 1 0 1 1 1 1 2 0 1 2 1 2 2 2 1 3 0 1 3 1 3 3 2 3 3 3 1 4 0 1 4 1 4 4 2 6 4 3 4 4 4 1 5 0 1 5 1 5 5 2 10 5 3 10 5 4 5 5 5 1 R8_CHOOSE_TEST Normal end of execution. R8_FALL_TEST Python version: 3.6.5 R8_FALL evaluates the falling factorial Fall(X,N). X N Exact Computed 5 4 120 120 5.25 4 163.16015625 163.16015625 5.5 4 216.5625 216.5625 5.75 4 281.66015625 281.66015625 6 4 360 360 7.5 0 1 1 7.5 1 7.5 7.5 7.5 2 48.75 48.75 7.5 3 268.125 268.125 7.5 4 1206.5625 1206.5625 7.5 5 4222.96875 4222.96875 7.5 6 10557.421875 10557.421875 7.5 7 15836.1328125 15836.1328125 7.5 8 7918.06640625 7918.06640625 7.5 9 -3959.033203125 -3959.033203125 R8_FALL_TEST Normal end of execution. R8_FALL_VALUES_TEST: Python version: 3.6.5 R8_FALL_VALUES returns values of the falling factorial. X N R8_FALL(X,N) 5.0000 4 120 5.2500 4 163.16015625 5.5000 4 216.5625 5.7500 4 281.66015625 6.0000 4 360 7.5000 0 1 7.5000 1 7.5 7.5000 2 48.75 7.5000 3 268.125 7.5000 4 1206.5625 7.5000 5 4222.96875 7.5000 6 10557.421875 7.5000 7 15836.1328125 7.5000 8 7918.06640625 7.5000 9 -3959.033203125 R8_FALL_VALUES_TEST: Normal end of execution. R8_GAMMA_TEST: Python version: 3.6.5 R8_GAMMA evaluates the Gamma function. X GAMMA(X) R8_GAMMA(X) -0.5 -3.544907701811032 -3.544907701811032 -0.01 -100.5871979644108 -100.5871979644108 0.01 99.4325851191506 99.4325851191506 0.1 9.513507698668732 9.513507698668731 0.2 4.590843711998803 4.590843711998803 0.4 2.218159543757688 2.218159543757688 0.5 1.772453850905516 1.772453850905516 0.6 1.489192248812817 1.489192248812817 0.8 1.164229713725303 1.164229713725303 1 1 1 1.1 0.9513507698668732 0.9513507698668732 1.2 0.9181687423997607 0.9181687423997607 1.3 0.8974706963062772 0.8974706963062772 1.4 0.8872638175030753 0.8872638175030754 1.5 0.8862269254527581 0.8862269254527581 1.6 0.8935153492876903 0.8935153492876903 1.7 0.9086387328532904 0.9086387328532904 1.8 0.9313837709802427 0.9313837709802427 1.9 0.9617658319073874 0.9617658319073874 2 1 1 3 2 2 4 6 6 10 362880 362880 20 1.21645100408832e+17 1.216451004088321e+17 30 8.841761993739702e+30 8.841761993739751e+30 R8_GAMMA_TEST Normal end of execution. R8_RISE_TEST Python version: 3.6.5 R8_RISE evaluates the rising factorial Rise(X,N). X N Exact Computed 5 4 1680 1680 5.25 4 1962.59765625 1962.59765625 5.5 4 2279.0625 2279.0625 5.75 4 2631.97265625 2631.97265625 6 4 3024 3024 7.5 0 1 1 7.5 1 7.5 7.5 7.5 2 63.75 63.75 7.5 3 605.625 605.625 7.5 4 6359.0625 6359.0625 7.5 5 73129.21875 73129.21875 7.5 6 914115.234375 914115.234375 7.5 7 12340555.6640625 12340555.6640625 7.5 8 178938057.1289063 178938057.1289062 7.5 9 2773539885.498047 2773539885.498047 R8_RISE_TEST Normal end of execution. R8_RISE_VALUES_TEST: Python version: 3.6.5 R8_RISE_VALUES returns values of the rising factorial. X N R8_RISE(X,N) 5.0000 4 1680 5.2500 4 1962.59765625 5.5000 4 2279.0625 5.7500 4 2631.97265625 6.0000 4 3024 7.5000 0 1 7.5000 1 7.5 7.5000 2 63.75 7.5000 3 605.625 7.5000 4 6359.0625 7.5000 5 73129.21875 7.5000 6 914115.234375 7.5000 7 12340555.6640625 7.5000 8 178938057.1289063 7.5000 9 2773539885.498047 R8_RISE_VALUES_TEST: Normal end of execution. R8_TO_CFRAC_TEST Python version: 3.6.5 R8_TO_CFRAC converts a real number to a sequence of continued fraction convergents. Use the real number R = 6.28319 6 6 1 6.000000 0.283185 3 19 3 6.333333 -0.050148 1 25 4 6.250000 0.033185 1 44 7 6.285714 -0.002529 7 333 53 6.283019 0.000166 2 710 113 6.283186 -0.000001 146 103993 16551 6.283185 0.000000 R8_TO_CFRAC_TEST Normal end of execution. R8_TO_DEC_TEST Python version: 3.6.5 R8_TO_DEC converts a real number to a decimal The number of decimal digits is 5 R => A * 10^B => R2 -5.631634 -56316 -4 -5.631600 9.126352 91263 -4 9.126300 6.590185 65901 -4 6.590100 1.233909 12339 -4 1.233900 -1.693858 -16938 -4 -1.693800 -8.677625 -86776 -4 -8.677600 -4.848444 -48484 -4 -4.848400 -7.800864 -78008 -4 -7.800800 -9.123420 -91234 -4 -9.123400 2.679314 26793 -4 2.679300 R8_TO_RAT_TEST Python version: 3.6.5 R8_TO_RAT converts a real number to a rational The maximum number of digits allowed is 4 R => A / B => R2 -0.315817 -1579 5000 -0.3158 7.06318 8829 1250 7.0632 5.79509 57951 10000 5.7951 3.11695 3117 1000 3.117 1.65307 16531 10000 1.6531 -1.83881 -4597 2500 -1.8388 0.0757779 379 5000 0.0758 -1.40043 -3501 2500 -1.4004 -2.06171 -20617 10000 -2.0617 3.83966 38397 10000 3.8397 R8_TO_RAT_TEST Normal end of execution. R8_UNIFORM_01_TEST Python version: 3.6.5 R8_UNIFORM_01 produces a sequence of random values. Using random seed 123456789 SEED R8_UNIFORM_01(SEED) 469049721 0.218418 2053676357 0.956318 1781357515 0.829509 1206231778 0.561695 891865166 0.415307 141988902 0.066119 553144097 0.257578 236130416 0.109957 94122056 0.043829 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 R8_UNIFORM_01(SEED) 469049721 0.218418 2053676357 0.956318 1781357515 0.829509 1206231778 0.561695 891865166 0.415307 141988902 0.066119 553144097 0.257578 236130416 0.109957 94122056 0.043829 1361431000 0.633966 R8_UNIFORM_01_TEST Normal end of execution. R8_UNIFORM_AB_TEST Python version: 3.6.5 R8_UNIFORM_AB returns random values in a given range: [ A, B ] For this problem: A = 10.000000 B = 20.000000 12.184183 19.563176 18.295092 15.616954 14.153071 10.661187 12.575778 11.099568 10.438290 16.339657 R8_UNIFORM_AB_TEST Normal end of execution R8MAT_DET_TEST Python version: 3.6.5 R8MAT_DET: determinant of a real matrix. The 123/456/789 matrix: Col: 0 1 2 Row 0 : 1 2 3 1 : 4 5 6 2 : 7 8 9 Determinant of the 123/456/789 matrix is 0 The Hilbert matrix: Col: 0 1 2 3 Row 0 : 0.5 0.333333 0.25 0.2 1 : 0.333333 0.25 0.2 0.166667 2 : 0.25 0.2 0.166667 0.142857 3 : 0.2 0.166667 0.142857 0.125 Determinant of the Hilbert matrix is 2.36206e-09 The -1,2,-1 matrix: Col: 0 1 2 Row 0 : 2 -1 0 1 : -1 2 -1 2 : 0 -1 2 Determinant of the -1,2,-1 matrix is 4 R8MAT_DET_TEST: Normal end of execution. R8MAT_2PERM0_TEST Python version: 3.6.5 R8MAT_2PERM0 reorders an R8MAT in place. Rows and columns use different permutations. The input matrix: Col: 0 1 2 3 4 Row 0 : 11 12 13 14 15 1 : 21 22 23 24 25 2 : 31 32 33 34 35 3 : 41 42 43 44 45 4 : 51 52 53 54 55 5 : 61 62 63 64 65 6 : 71 72 73 74 75 7 : 81 82 83 84 85 8 : 91 92 93 94 95 Col: 5 6 Row 0 : 16 17 1 : 26 27 2 : 36 37 3 : 46 47 4 : 56 57 5 : 66 67 6 : 76 77 7 : 86 87 8 : 96 97 The row permutation: 0 1 2 3 4 5 6 7 8 1 2 8 5 6 7 4 3 0 The column permutation: 0 1 2 3 4 5 6 2 3 4 5 6 0 1 The permuted matrix: Col: 0 1 2 3 4 Row 0 : 96 97 91 92 93 1 : 16 17 11 12 13 2 : 26 27 21 22 23 3 : 86 87 81 82 83 4 : 76 77 71 72 73 5 : 46 47 41 42 43 6 : 56 57 51 52 53 7 : 66 67 61 62 63 8 : 36 37 31 32 33 Col: 5 6 Row 0 : 94 95 1 : 14 15 2 : 24 25 3 : 84 85 4 : 74 75 5 : 44 45 6 : 54 55 7 : 64 65 8 : 34 35 R8MAT_2PERM0_TEST Normal end of execution. R8MAT_PERM0_TEST Python version: 3.6.5 R8MAT_PERM0 reorders an integer matrix in place. The rows and columns use the same permutation. The input matrix: Col: 0 1 2 3 4 Row 0 : 11 12 13 14 15 1 : 21 22 23 24 25 2 : 31 32 33 34 35 3 : 41 42 43 44 45 4 : 51 52 53 54 55 5 : 61 62 63 64 65 6 : 71 72 73 74 75 7 : 81 82 83 84 85 8 : 91 92 93 94 95 Col: 5 6 7 8 Row 0 : 16 17 18 19 1 : 26 27 28 29 2 : 36 37 38 39 3 : 46 47 48 49 4 : 56 57 58 59 5 : 66 67 68 69 6 : 76 77 78 79 7 : 86 87 88 89 8 : 96 97 98 99 The row and column permutation: 0 1 2 3 4 5 6 7 8 1 2 8 5 6 7 4 3 0 The permuted matrix: Col: 0 1 2 3 4 Row 0 : 99 91 92 98 97 1 : 19 11 12 18 17 2 : 29 21 22 28 27 3 : 89 81 82 88 87 4 : 79 71 72 78 77 5 : 49 41 42 48 47 6 : 59 51 52 58 57 7 : 69 61 62 68 67 8 : 39 31 32 38 37 Col: 5 6 7 8 Row 0 : 94 95 96 93 1 : 14 15 16 13 2 : 24 25 26 23 3 : 84 85 86 83 4 : 74 75 76 73 5 : 44 45 46 43 6 : 54 55 56 53 7 : 64 65 66 63 8 : 34 35 36 33 R8MAT_PERM0_TEST Normal end of execution. R8MAT_PERMANENT_TEST Python version: 3.6.5 R8MAT_PERMANENT: the matrix permanent function. We will analyze matrices with 0 diagonal and 1 on all offdiagonals. Order Permanent. 2 1 3 2 4 9 5 44 6 265 7 1854 8 14833 9 133496 10 1.33496e+06 11 1.46846e+07 12 1.76215e+08 R8MAT_PERMANENT_TEST: Normal end of execution. R8MAT_PRINT_TEST Python version: 3.6.5 R8MAT_PRINT prints an R8MAT. Here is an R8MAT: Col: 0 1 2 3 4 Row 0 : 11 12 13 14 15 1 : 21 22 23 24 25 2 : 31 32 33 34 35 3 : 41 42 43 44 45 Col: 5 Row 0 : 16 1 : 26 2 : 36 3 : 46 R8MAT_PRINT_TEST: Normal end of execution. R8MAT_PRINT_SOME_TEST Python version: 3.6.5 R8MAT_PRINT_SOME prints some of an R8MAT. Here is an R8MAT: Col: 3 4 5 Row 0 : 14 15 16 1 : 24 25 26 2 : 34 35 36 R8MAT_PRINT_SOME_TEST: Normal end of execution. R8POLY_TEST Python version: 3.6.5 R8POLY converts between power sum, factorial and Taylor forms, and can evaluate a polynomial All calls have input A as follows: 0 0 0 0 0 1 Option IOPT = -3 Output array: 0 24 -50 35 -10 1 Option IOPT = -2 Output array: 0 1 15 25 10 1 Option IOPT = -1 X0 = 2 Value = 0 Option IOPT = 0 X0 = 2 Value = 32 Option IOPT = 6 X0 = 2 Output array: 32 80 80 40 10 1 Option IOPT = 6 X0 = -2 Output array: -32 80 -80 40 -10 1 R8POLY_TEST: Normal end of execution. R8POLY_ADD_TEST Python version: 3.6.5 R8POLY_ADD adds two R8POLY's. Polynomial A: p(x) = 5.5 * x^5 + 4.4 * x^4 + 3.3 * x^3 + 2.2 * x^2 + 1.1 * x Polynomial B: p(x) = - 5.5 * x^5 + 8.3 * x^3 + 7.2 * x^2 - 2.1 * x + 1 Polynomial C = A+B: p(x) = 4.4 * x^4 + 11.6 * x^3 + 9.4 * x^2 - 1 * x + 1 R8POLY_ADD_TEST: Normal end of execution. R8POLY_DEGREE_TEST Python version: 3.6.5 R8POLY_DEGREE determines the degree of an R8POLY. The R8POLY: p(x) = 4 * x^3 + 3 * x^2 + 2 * x + 1 Dimensioned degree = 3, Actual degree = 3 The R8POLY: p(x) = 0 * x^3 + 3 * x^2 + 2 * x + 1 Dimensioned degree = 3, Actual degree = 2 The R8POLY: p(x) = 4 * x^3 + 2 * x + 1 Dimensioned degree = 3, Actual degree = 3 The R8POLY: p(x) = 0 * x^3 + 1 Dimensioned degree = 3, Actual degree = 0 The R8POLY: p(x) = 0 * x^3 Dimensioned degree = 3, Actual degree = 0 R8POLY_DEGREE_TEST: Normal end of execution. R8POLY_DIF_TEST Python version: 3.6.5 R8POLY_DIF computes derivatives of an R8POLY. The polynomial A: p(x) = 1 * x^3 + 2 * x^2 - 5 * x - 6 Differentiate A 1 times. The derivative, B: p(x) = 3 * x^2 + 4 * x - 5 The polynomial A: p(x) = 1 * x^4 + 3 * x^3 + 2 * x^2 + 5 * x - 2 Differentiate A 3 times. The derivative, B: p(x) = 24 * x + 18 R8POLY_DIF_TEST: Normal end of execution. R8POLY_DIV_TEST Python version: 3.6.5 R8POLY_DIV computes the quotient and remainder for polynomial division. The polynomial to be divided, A: p(x) = 1 * x^3 + 2 * x^2 - 5 * x - 6 The divisor polynomial, B: p(x) = 1 * x - 2 The quotient polynomial, Q: p(x) = 1 * x^2 + 4 * x + 3 The remainder polynomial, R: p(x) = 0 The polynomial to be divided, A: p(x) = 1 * x^4 + 3 * x^3 + 2 * x^2 + 5 * x - 2 The divisor polynomial, B: p(x) = 1 * x^2 + 1 * x - 3 The quotient polynomial, Q: p(x) = 1 * x^2 + 2 * x + 3 The remainder polynomial, R: p(x) = 8 * x + 7 R8POLY_DIV_TEST: Normal end of execution. R8POLY_F2P_TEST Python version: 3.6.5 R8POLY_F2P: factorial => power sum. The power sum polynomial: p(x) = 4 * x^3 + 3 * x^2 + 2 * x + 1 The factorial polynomial coefficients: 0: 1 1: 9 2: 15 3: 4 The recovered power sum polynomial: p(x) = 4 * x^3 + 3 * x^2 + 2 * x + 1 R8POLY_F2P_TEST Normal end of execution. R8POLY_FVAL_TEST Python version: 3.6.5 R8POLY_FVAL evaluates a polynomial in factorial form. The factorial polynomial coefficients: 0: 1 1: 2 2: 3 3: 4 4: 5 R8POLY(2) = 11 The correct value is 11. R8POLY_NVAL_TEST: Normal end of execution. R8POLY_MUL_TEST Python version: 3.6.5 R8POLY_MUL multiplies two polynomials. The factor A: p(x) = 1 * x + 1 The factor B: p(x) = - 1 * x + 1 The product C = A*B: p(x) = - 1 * x^2 + 1 The factor A: p(x) = 3 * x^2 + 2 * x + 1 The factor B: p(x) = - 2 * x + 1 The product C = A*B: p(x) = - 6 * x^3 - 1 * x^2 + 1 R8POLY_MUL_TEST: Normal end of execution. R8POLY_N2P_TEST Python version: 3.6.5 R8POLY_N2P: Newton => power sum The power sum polynomial: p(x) = 4 * x^3 + 3 * x^2 + 2 * x + 1 Newton polynomial coefficients: 0: 49 1: 132 2: 51 3: 4 Newton polynomial abscissas: 0: 2 1: 4 2: 6 3: 8 The recovered power sum polynomial: p(x) = 4 * x^3 + 3 * x^2 + 2 * x + 1 R8POLY_N2P_TEST: Normal end of execution. R8POLY_NVAL_TEST Python version: 3.6.5 R8POLY_NVAL evaluates a Newton polynomial. Newton polynomial coefficients: 0: 1 1: 2 2: 3 3: 4 4: 5 Newton polynomial abscissas: 0: 0 1: 1 2: 2 3: 3 R8POLY(2) = 11 The correct value is 11. R8POLY_NVAL_TEST: Normal end of execution. R8POLY_NX_TEST Python version: 3.6.5 R8POLY_NX replaces one abscissa in a Newton polynomial. Newton polynomial coefficients: 0: 1 1: 2 2: 3 Newton polynomial abscissas: 0: 1 1: 2 2: 3 Replace one abscissa by X = 0 Newton polynomial coefficients: 0: 5 1: -4 2: 3 Newton polynomial abscissas: 0: 0 1: 1 2: 2 R8POLY_NX_TEST Normal end of execution. R8POLY_P2F_TEST Python version: 3.6.5 R8POLY_P2F: power sum => factorial; The power sum polynomial: p(x) = 4 * x^3 + 3 * x^2 + 2 * x + 1 The factorial polynomial coefficients: 0: 1 1: 9 2: 15 3: 4 The recovered power sum polynomial: p(x) = 4 * x^3 + 3 * x^2 + 2 * x + 1 R8POLY_P2F_TEST Normal end of execution. R8POLY_P2N_TEST Python version: 3.6.5 R8POLY_P2N: Power sum => Newton. The power sum polynomial: p(x) = 4 * x^3 + 3 * x^2 + 2 * x + 1 Newton polynomial coefficients: 0: 49 1: 132 2: 51 3: 4 Newton polynomial abscissas: 0: 2 1: 4 2: 6 3: 8 The recovered power sum polynomial: p(x) = 4 * x^3 + 3 * x^2 + 2 * x + 1 R8POLY_P2N_TEST: Normal end of execution. R8POLY_P2T_TEST Python version: 3.6.5 R8POLY_P2T: Power sum => Taylor. Taylor expansion point is X = 2 The Taylor coefficients: 0: 1 1: 2 2: 3 3: 4 The power sum polynomial: p(x) = 4 * x^3 - 21 * x^2 + 38 * x - 23 The recovered Taylor coefficients: 0: 1 1: 2 2: 3 3: 4 R8POLY_P2T_TEST: Normal end of execution. R8POLY_POWER_TEST Python version: 3.6.5 R8POLY_POWER takes a polynomial to a power. The polynomial A: p(x) = - 1 * x + 2 Raised to the power 3: p(x) = - 1 * x^3 + 6 * x^2 - 12 * x + 8 The polynomial A: p(x) = 1 * x^2 + 1 * x Raised to the power 2: p(x) = 1 * x^4 + 2 * x^3 + 1 * x^2 R8POLY_POWER_TEST Normal end of execution. R8POLY_PRINT_TEST Python version: 3.6.5 R8POLY_PRINT prints an R8POLY. The R8POLY: p(x) = 9 * x^5 + 0.78 * x^4 + 56 * x^2 - 3.4 * x + 12 R8POLY_PRINT_TEST: Normal end of execution. R8POLY_PVAL_TEST Python version: 3.6.5 R8POLY_PVAL evaluates a polynomial in power sum form. The polynomial to be evaluated: p(x) = 5 * x^4 + 4 * x^3 + 3 * x^2 + 2 * x + 1 At X = 2.000000 Computed polynomial value is 129.000000 Correct value is 129. R8POLY_PVAL_TEST Normal end of execution. R8POLY_T2P_TEST Python version: 3.6.5 R8POLY_T2P: Taylor => Power sum Taylor expansion point is X = 2 The Taylor coefficients: 0: 1 1: 2 2: 3 3: 4 The power sum polynomial: p(x) = 4 * x^3 - 21 * x^2 + 38 * x - 23 The recovered Taylor coefficients: 0: 1 1: 2 2: 3 3: 4 R8POLY_T2P_TEST: Normal end of execution. R8VEC_BACKTRACK_TEST Python version: 3.6.5 R8VEC_BACKTRACK uses backtracking, seeking a vector X of N values which satisfies some condition. In this demonstration, we have 8 values W(I). We seek all subsets that sum to 53.0. X(I) is 0.0 or 1.0 if the entry is skipped or used. 1 53: 15 22 16 2 53: 15 14 16 8 3 53: 22 14 9 8 Done! R8VEC_BACKTRACK_TEST: Normal end of execution. R8VEC_FRAC_TEST Python version: 3.6.5 R8VEC_FRAC: K-th smallest real vector entry; The real array to search: 0: 2.18418 1: 9.56318 2: 8.29509 3: 5.61695 4: 4.15307 5: 0.661187 6: 2.57578 7: 1.09957 8: 0.43829 9: 6.33966 Frac R8VEC_FRAC 1 0.438290 2 0.661187 3 1.099568 4 2.184183 5 2.575778 6 4.153071 7 5.616954 8 6.339657 9 8.295092 10 9.563176 R8VEC_FRAC_TEST Normal end of execution. R8VEC_INDICATOR1_TEST Python version: 3.6.5 R8VEC_INDICATOR1 returns the 1-based indicator matrix. The 1-based indicator vector: 0: 1 1: 2 2: 3 3: 4 4: 5 5: 6 6: 7 7: 8 8: 9 9: 10 R8VEC_INDICATOR1_TEST Normal end of execution. R8VEC_MIRROR_NEXT_TEST Python version: 3.6.5 R8VEC_MIRROR_NEXT generates all sign variations of a real vector. 0 1 2 3 0 -1 2 3 0 1 -2 3 0 -1 -2 3 0 1 2 -3 0 -1 2 -3 0 1 -2 -3 0 -1 -2 -3 Done. 0 1 0 3 0 -1 0 3 0 1 -0 -3 0 -1 -0 -3 Done. R8VEC_MIRROR_NEXT_TEST: Normal end of execution. R8VEC_PRINT_TEST Python version: 3.6.5 R8VEC_PRINT prints an R8VEC. Here is an R8VEC: 0: 123.456 1: 5e-06 2: -1e+06 3: 3.14159 R8VEC_PRINT_TEST: Normal end of execution. R8VEC_UNIFORM_01_TEST Python version: 3.6.5 R8VEC_UNIFORM_01 computes a random R8VEC. Initial seed is 123456789 Random R8VEC: 0: 0.218418 1: 0.956318 2: 0.829509 3: 0.561695 4: 0.415307 5: 0.0661187 6: 0.257578 7: 0.109957 8: 0.043829 9: 0.633966 R8VEC_UNIFORM_01_TEST: Normal end of execution. R8VEC_UNIFORM_AB_TEST Python version: 3.6.5 R8VEC_UNIFORM_AB computes a random R8VEC. -1 <= X <= 5 Initial seed is 123456789 Random R8VEC: 0: 0.31051 1: 4.73791 2: 3.97706 3: 2.37017 4: 1.49184 5: -0.603288 6: 0.545467 7: -0.340259 8: -0.737026 9: 2.80379 R8VEC_UNIFORM_AB_TEST: Normal end of execution. RAT_ADD_TEST Python version: 3.6.5 RAT_ADD adds two rationals. A = 3/4 B = 10/7 C = A + B = 61/28 RAT_ADD_TEST Normal end of execution. RAT_DIV_TEST Python version: 3.6.5 RAT_DIV divides two rationals. A = 3/4 B = 10/7 C = A / B = 21/40 RAT_DIV_TEST Normal end of execution. RAT_FAREY_TEST Python version: 3.6.5 RAT_FAREY computes a row of the Farey fraction table. Row 1 Number of fractions: 2 0/1 1/1 Row 2 Number of fractions: 3 0/1 1/2 1/1 Row 3 Number of fractions: 5 0/1 1/3 1/2 2/3 1/1 Row 4 Number of fractions: 7 0/1 1/4 1/3 1/2 2/3 3/4 1/1 Row 5 Number of fractions: 11 0/1 1/5 1/4 1/3 2/5 1/2 3/5 2/3 3/4 4/5 1/1 Row 6 Number of fractions: 13 0/1 1/6 1/5 1/4 1/3 2/5 1/2 3/5 2/3 3/4 4/5 5/6 1/1 Row 7 Number of fractions: 19 0/1 1/7 1/6 1/5 1/4 2/7 1/3 2/5 3/7 1/2 4/7 3/5 2/3 5/7 3/4 4/5 5/6 6/7 1/1 RAT_FAREY_TEST Normal end of execution. RAT_FAREY2_TEST Python version: 3.6.5 RAT_FAREY2 computes a row of the Farey fraction table. Row 0 Number of fractions: 2 0/1 1/1 Row 1 Number of fractions: 3 0/1 1/2 1/1 Row 2 Number of fractions: 5 0/1 1/3 1/2 2/3 1/1 Row 3 Number of fractions: 9 0/1 1/4 1/3 2/5 1/2 3/5 2/3 3/4 1/1 Row 4 Number of fractions: 17 0/1 1/5 1/4 2/7 1/3 3/8 2/5 3/7 1/2 4/7 3/5 5/8 2/3 5/7 3/4 4/5 1/1 RAT_FAREY2_TEST Normal end of execution. RAT_MUL_TEST Python version: 3.6.5 RAT_MUL multiplies two rationals. A = 3/4 B = 10/7 C = A * B = 15/14 RAT_MUL_TEST Normal end of execution. RAT_NORMALIZE_TEST Python version: 3.6.5 RAT_NORMALIZE normalizes a rational. A B A B normalized normalized 3 4 3 4 1 1000 1 1000 20 1 20 1 8 4 2 1 -10 7 -10 7 9 -15 -3 5 -11 -11 1 1 RAT_TO_CFRAC_TEST Python version: 3.6.5 RAT_TO_CFRAC fraction => continued fraction, Regular fraction is 4096 / 15625 Continued fraction coefficients: 0 0 1 3 2 1 3 4 4 2 5 1 6 1 7 11 8 13 The continued fraction convergents. The last row contains the value of the continued fraction, written as a common fraction. I, P(I), Q(I), P(I)/Q(I) 0 0 1 0.000000 1 1 3 0.333333 2 1 4 0.250000 3 5 19 0.263158 4 11 42 0.261905 5 16 61 0.262295 6 27 103 0.262136 7 313 1194 0.262144 8 4096 15625 0.262144 RAT_TO_CFRAC_TEST Normal end of execution. RAT_TO_DEC_TEST Python version: 3.6.5 RAT_TO_DEC fraction => decimal, In this test, choose the top and bottom of a rational at random, and compute the equivalent real number. Then convert to decimal, and the equivalent real. Then convert back to rational and the equivalent real. -0.588297 = -563 / 957 -0.588297 = -5882967607105538 * 10^-16 -0.588297 = -2941483803552769 / 5000000000000000 1.1726 = 659 / 562 1.1726 = 1172597864768683 * 10^-15 1.1726 = 1172597864768683 / 1000000000000000 -2.52239 = -169 / 67 -2.52239 = -25223880597014924 * 10^-16 -2.52239 = -6305970149253731 / 2500000000000000 -4.40909 = -485 / 110 -4.40909 = -44090909090909096 * 10^-16 -4.40909 = -5511363636363637 / 1250000000000000 -1.44006 = -913 / 634 -1.44006 = -14400630914826496 * 10^-16 -1.44006 = -56252464511041 / 39062500000000 -1.94889 = -877 / 450 -1.94889 = -1948888888888889 * 10^-15 -1.94889 = -1948888888888889 / 1000000000000000 -0.260927 = -197 / 755 -0.260927 = -2609271523178808 * 10^-16 -0.260927 = -326158940397351 / 1250000000000000 297.5 = 595 / 2 297.5 = 2975 * 10^-1 297.5 = 595 / 2 2.26496 = 795 / 351 2.26496 = 2264957264957265 * 10^-15 2.26496 = 452991452991453 / 200000000000000 -57.9286 = -811 / 14 -57.9286 = -5792857142857144 * 10^-14 -57.9286 = -724107142857143 / 12500000000000 RAT_TO_DEC_TEST Normal end of execution. RAT_TO_R8_TEST Python version: 3.6.5 RAT_TO_R8 converts a rational to a real number. The maximum number of digits allowed is 4 R => A / B => R2 -0.315817 -1579 5000 -0.3158 7.06318 8829 1250 7.0632 5.79509 57951 10000 5.7951 3.11695 3117 1000 3.117 1.65307 16531 10000 1.6531 -1.83881 -4597 2500 -1.8388 0.0757779 379 5000 0.0758 -1.40043 -3501 2500 -1.4004 -2.06171 -20617 10000 -2.0617 3.83966 38397 10000 3.8397 RAT_TO_R8_TEST Normal end of execution. RAT_TO_S_TEST Python version: 3.6.5 RAT_TO_S converts a rational to a string. A B A/B 3 4 3/4 1 1000 1/1000 20 1 20/1 8 4 8/4 -10 7 -10/7 9 -15 9/-15 -11 -11 -11/-11 RAT_TO_S_TEST: Normal end of execution. RAT_WIDTH_TEST Python version: 3.6.5 RAT_WIDTH determines the "width" of a rational. Top Bottom Width 1000 3 4 1000 40 4 1000 500 4 1000 6000 4 1000 70000 5 1 1 1 -1 200 3 -10 200 3 -100 200 4 -1000 200 5 1 -200 3 10 -200 3 100 -200 4 1000 -200 5 10000 -200 6 17 3000 4 4000000 4000000 7 RAT_WIDTH_TEST Normal end of execution. REGRO_NEXT_TEST Python version: 3.6.5 REGRO_NEXT generates all restricted growth functions. 1 1 1 1 1 2 1 1 1 2 3 1 1 2 1 4 1 1 2 2 5 1 1 2 3 6 1 2 1 1 7 1 2 1 2 8 1 2 1 3 9 1 2 2 1 10 1 2 2 2 11 1 2 2 3 12 1 2 3 1 13 1 2 3 2 14 1 2 3 3 15 1 2 3 4 REGRO_NEXT_TEST: Normal end of execution. RFRAC_TO_CFRAC_TEST Python version: 3.6.5 RFRAC_TO_CFRAC: rational polynomial fraction to continued fraction. Rational polynomial numerator coefficients: 0: 1 1: 1 2: 2 Rational polynomial numerator coefficients: 0: 1 1: 3 2: 1 3: 1 Continued fraction coefficients: 0: 1 1: 0.5 2: 1.33333 3: -0.5 4: -1.5 5: 2 Recovered rational polynomial numerator coefficients: 0: 1 1: 1 2: 2 Recovered rational polynomial numerator coefficients: 0: 1 1: 3 2: 1 3: 1 RFRAC_TO_CFRAC_TEST Normal end of execution. RFRAC_TO_JFRAC_TEST Python version: 3.6.5 RFRAC_TO_JFRAC converts a rational polynomial fraction to a J fraction. RFRAC P: 0: 0.218418 1: 0.956318 2: 0.829509 3: 0.561695 4: 0.415307 5: 0.0661187 RFRAC Q: 0: 0.641848 1: 0.273997 2: 0.109216 3: 1.57976 4: 0.153816 5: 1.12019 6: 1 JFRAC R: 0: 0.0661187 1: 24.0763 2: -0.310636 3: 1.40276 4: 5.16789 5: -0.0686133 JFRAC S: 0: -5.16104 1: 4.91564 2: -0.94563 3: -1.04001 4: 2.91888 5: 0.432351 Recovered RFRAC P: 0: 0.218418 1: 0.956318 2: 0.829509 3: 0.561695 4: 0.415307 5: 0.0661187 Recovered RFRAC Q: 0: 0.641848 1: 0.273997 2: 0.109216 3: 1.57976 4: 0.153816 5: 1.12019 6: 1 RFRAC_TO_JFRAC_TEST: Normal end of execution. SCHROEDER_TEST Python version: 3.6.5 SCHROEDER computes the Schroeder numbers. N S(N) 0 1 1 1 2 3 3 11 4 45 5 197 6 903 7 4279 8 20793 9 103049 SCHROEDER_TEST: Normal end of execution. SORT_HEAP_EXTERNAL_TEST Python version: 3.6.5 SORT_HEAP_EXTERNAL sorts objects externally. Unsorted array: 0 5 1 20 2 17 3 12 4 9 5 2 6 6 7 3 8 1 9 13 10 2 11 9 12 9 13 16 14 16 15 1 16 18 17 8 18 2 19 1 Sorted array: 0 1 1 1 2 1 3 2 4 2 5 2 6 3 7 5 8 6 9 8 10 9 11 9 12 9 13 12 14 13 15 16 16 16 17 17 18 18 19 20 SORT_HEAP_EXTERNAL_TEST: Normal end of execution. SUBCOMP_NEXT_TEST Python version: 3.6.5 SUBCOMP_NEXT generates subcompositions. Seek all subcompositions of N = 6 Into K = 3 parts. # Sum 1 0 0 0 0 2 1 1 0 0 3 1 0 1 0 4 1 0 0 1 5 2 2 0 0 6 2 1 1 0 7 2 0 2 0 8 2 1 0 1 9 2 0 1 1 10 2 0 0 2 11 3 3 0 0 12 3 2 1 0 13 3 1 2 0 14 3 0 3 0 15 3 2 0 1 16 3 1 1 1 17 3 0 2 1 18 3 1 0 2 19 3 0 1 2 20 3 0 0 3 21 4 4 0 0 22 4 3 1 0 23 4 2 2 0 24 4 1 3 0 25 4 0 4 0 26 4 3 0 1 27 4 2 1 1 28 4 1 2 1 29 4 0 3 1 30 4 2 0 2 31 4 1 1 2 32 4 0 2 2 33 4 1 0 3 34 4 0 1 3 35 4 0 0 4 36 5 5 0 0 37 5 4 1 0 38 5 3 2 0 39 5 2 3 0 40 5 1 4 0 41 5 0 5 0 42 5 4 0 1 43 5 3 1 1 44 5 2 2 1 45 5 1 3 1 46 5 0 4 1 47 5 3 0 2 48 5 2 1 2 49 5 1 2 2 50 5 0 3 2 51 5 2 0 3 52 5 1 1 3 53 5 0 2 3 54 5 1 0 4 55 5 0 1 4 56 5 0 0 5 57 6 6 0 0 58 6 5 1 0 59 6 4 2 0 60 6 3 3 0 61 6 2 4 0 62 6 1 5 0 63 6 0 6 0 64 6 5 0 1 65 6 4 1 1 66 6 3 2 1 67 6 2 3 1 68 6 1 4 1 69 6 0 5 1 70 6 4 0 2 71 6 3 1 2 72 6 2 2 2 73 6 1 3 2 74 6 0 4 2 75 6 3 0 3 76 6 2 1 3 77 6 1 2 3 78 6 0 3 3 79 6 2 0 4 80 6 1 1 4 81 6 0 2 4 82 6 1 0 5 83 6 0 1 5 84 6 0 0 6 SUBCOMP_NEXT_TEST Normal end of execution. SUBCOMPNZ_NEXT_TEST Python version: 3.6.5 SUBCOMPNZ_NEXT generates subcompositions using nonzero parts. Seek all subcompositions of N = 6 using K = 3 nonzero parts. # Sum 1 3 1 1 1 2 4 2 1 1 3 4 1 2 1 4 4 1 1 2 5 5 3 1 1 6 5 2 2 1 7 5 1 3 1 8 5 2 1 2 9 5 1 2 2 10 5 1 1 3 11 6 4 1 1 12 6 3 2 1 13 6 2 3 1 14 6 1 4 1 15 6 3 1 2 16 6 2 2 2 17 6 1 3 2 18 6 2 1 3 19 6 1 2 3 20 6 1 1 4 SUBCOMPNZ_NEXT_TEST Normal end of execution. SUBCOMPNZ2_NEXT_TEST Python version: 3.6.5 SUBCOMPNZ2_NEXT generates subcompositions using nonzero parts. Seek all subcompositions of N using K = 3 nonzero parts for 5 <= N <= 7 # N 1 5 3 1 1 2 5 2 2 1 3 5 1 3 1 4 5 2 1 2 5 5 1 2 2 6 5 1 1 3 7 6 4 1 1 8 6 3 2 1 9 6 2 3 1 10 6 1 4 1 11 6 3 1 2 12 6 2 2 2 13 6 1 3 2 14 6 2 1 3 15 6 1 2 3 16 6 1 1 4 17 7 5 1 1 18 7 4 2 1 19 7 3 3 1 20 7 2 4 1 21 7 1 5 1 22 7 4 1 2 23 7 3 2 2 24 7 2 3 2 25 7 1 4 2 26 7 3 1 3 27 7 2 2 3 28 7 1 3 3 29 7 2 1 4 30 7 1 2 4 31 7 1 1 5 SUBCOMPNZ2_NEXT_TEST Normal end of execution. SUBSET_BY_SIZE_NEXT_TEST Python version: 3.6.5 SUBSET_BY_SIZE_NEXT generates all subsets of an N set. 1 1 2 3 4 5 2 1 2 3 4 3 1 2 3 5 4 1 2 4 5 5 1 3 4 5 6 2 3 4 5 7 1 2 3 8 1 2 4 9 1 2 5 10 1 3 4 11 1 3 5 12 1 4 5 13 2 3 4 14 2 3 5 15 2 4 5 16 3 4 5 17 1 2 18 1 3 19 1 4 20 1 5 21 2 3 22 2 4 23 2 5 24 3 4 25 3 5 26 4 5 27 1 28 2 29 3 30 4 31 5 32 The empty set SUBSET_BY_SIZE_NEXT_TEST Normal end of execution. SUBSET_GRAY_NEXT_TEST Python version: 3.6.5 SUBSET_GRAY_NEXT generates all subsets of an N set. using the Gray code ordering: 0 0 1 0 1 means the subset contains 3 and 5. Gray code 1 0 0 0 0 0 2 1 0 0 0 0 3 1 1 0 0 0 4 0 1 0 0 0 5 0 1 1 0 0 6 1 1 1 0 0 7 1 0 1 0 0 8 0 0 1 0 0 9 0 0 1 1 0 10 1 0 1 1 0 11 1 1 1 1 0 12 0 1 1 1 0 13 0 1 0 1 0 14 1 1 0 1 0 15 1 0 0 1 0 16 0 0 0 1 0 17 0 0 0 1 1 18 1 0 0 1 1 19 1 1 0 1 1 20 0 1 0 1 1 21 0 1 1 1 1 22 1 1 1 1 1 23 1 0 1 1 1 24 0 0 1 1 1 25 0 0 1 0 1 26 1 0 1 0 1 27 1 1 1 0 1 28 0 1 1 0 1 29 0 1 0 0 1 30 1 1 0 0 1 31 1 0 0 0 1 32 0 0 0 0 1 SUBSET_GRAY_NEXT_TEST Normal end of execution. SUBSET_GRAY_RANK_TEST Python version: 3.6.5 SUBSET_GRAY_RANK returns rank of a subset of an N set using the Gray code ordering. For N = 5 the subset is: 1 0 1 1 0 The rank is 28 SUBSET_GRAY_RANK_TEST: Normal end of execution. SUBSET_GRAY_UNRANK_TEST Python version: 3.6.5 SUBSET_GRAY_UNRANK finds the subset of an N set of a given rank under the Gray code ordering. N is 5 Rank Subset 1 0 0 0 0 0 2 0 0 0 0 1 3 0 0 0 1 1 4 0 0 0 1 0 5 0 0 1 1 0 6 0 0 1 1 1 7 0 0 1 0 1 8 0 0 1 0 0 9 0 1 1 0 0 10 0 1 1 0 1 SUBSET_GRAY_UNRANK_TEST Normal end of execution. SUBSET_LEX_NEXT_TEST Python version: 3.6.5 SUBSET_LEX_NEXT generates all subsets of an N set. The user can impose a restriction on the maximum size of the subsets. Here, we require the subsets to be no larger than 3 1 1 2 1 2 3 1 2 4 1 2 5 1 3 1 3 4 1 3 5 1 4 1 4 5 1 5 2 2 3 2 3 4 2 3 5 2 4 2 4 5 2 5 3 3 4 3 4 5 3 5 4 4 5 5 The empty set. SUBSET_LEX_NEXT_TEST: Normal end of execution. SUBSET_RANDOM_TEST Python version: 3.6.5 SUBSET_RANDOM randomly selects a subset. The number of elements in the set is 5 0 1 1 1 0 0 0 0 0 1 0 0 0 1 1 0 1 0 0 0 1 1 0 0 0 SUBSET_RANDOM_TEST Normal end of execution. SUBTRIANGLE_NEXT_TEST Python version: 3.6.5 SUBTRIANGLE_NEXT generates the indices of subtriangles in a triangle whose edges were divided into N subedges. For this test, N = 4 Rank I1 J1 I2 J2 I3 J3 1 0 0 1 0 0 1 2 1 1 0 1 1 0 3 1 0 2 0 1 1 4 2 1 1 1 2 0 5 2 0 3 0 2 1 6 3 1 2 1 3 0 7 3 0 4 0 3 1 8 0 1 1 1 0 2 9 1 2 0 2 1 1 10 1 1 2 1 1 2 11 2 2 1 2 2 1 12 2 1 3 1 2 2 13 0 2 1 2 0 3 14 1 3 0 3 1 2 15 1 2 2 2 1 3 16 0 3 1 3 0 4 SUBTRIANGLE_NEXT_TEST: Normal end of execution. THUE_BINARY_NEXT_TEST Python version: 3.6.5 THUE_BINARY_NEXT returns the next Thue binary sequence. 1: 0 2: 0 1 4: 0 1 1 0 8: 0 1 1 0 1 0 0 1 16: 0 1 1 0 1 0 0 1 1 0 0 1 0 1 1 0 32: 0 1 1 0 1 0 0 1 1 0 0 1 0 1 1 0 1 0 0 1 0 1 1 0 0 1 1 0 1 0 0 1 64: 0 1 1 0 1 0 0 1 1 0 0 1 0 1 1 0 1 0 0 1 0 1 1 0 0 1 1 0 1 0 0 1 1 0 0 1 0 1 1 0 0 1 1 0 1 0 0 1 0 1 1 0 1 0 0 1 1 0 0 1 0 1 1 0 THUE_BINARY_NEXT_TEST: Normal end of execution. THUE_TERNARY_NEXT_TEST Python version: 3.6.5 THUE_TERNARY_NEXT returns the next Thue ternary sequence. 0 1 1 1 0 2 2 1 0 2 1 2 0 3 1 0 2 1 2 0 1 0 2 0 1 2 4 1 0 2 1 2 0 1 0 2 0 1 2 1 0 2 1 2 0 1 2 1 0 2 0 5 1 0 2 1 2 0 1 0 2 0 1 2 1 0 2 1 2 0 1 2 1 0 2 0 1 0 2 1 2 0 1 0 2 0 1 2 1 0 2 0 1 0 2 1 2 0 1 2 THUE_TERNARY_NEXT_TEST: Normal end of execution. TUPLE_NEXT_TEST Python version: 3.6.5 TUPLE_NEXT returns the next "tuple", that is, a vector of N integers, each between M1 and M2. M1 = 2 M2 = 4 N = 2 # X[0] X[1] 1 2 2 2 2 3 3 2 4 4 3 2 5 3 3 6 3 4 7 4 2 8 4 3 9 4 4 TUPLE_NEXT_TEST: Normal end of execution. TUPLE_NEXT2_TEST Python version: 3.6.5 TUPLE_NEXT2 returns the next "tuple", that is, a vector of N integers. N = 3 Min 2 3 8 1 2 3 8 2 2 3 7 3 2 3 6 4 2 3 5 5 3 3 8 6 3 3 7 7 3 3 6 8 3 3 5 9 4 3 8 10 4 3 7 11 4 3 6 12 4 3 5 Max 4 3 5 TUPLE_NEXT2_TEST: Normal end of execution. TUPLE_NEXT_FAST_TEST Python version: 3.6.5 TUPLE_NEXT_FAST returns the next "tuple", that is, a vector of N integers, each between 1 and M. M = 3 N = 2 0 1 1 1 1 2 2 1 3 3 2 1 4 2 2 5 2 3 6 3 1 7 3 2 8 3 3 TUPLE_NEXT_FAST_TEST: Normal end of execution. TUPLE_NEXT_GE_TEST Python version: 3.6.5 TUPLE_NEXT_GE returns the next "tuple", that is, a vector of N integers, each between 1 and M, with the constraint that the entries be nondecreasing. M = 3 N = 3 1 1 1 1 2 1 1 2 3 1 1 3 4 1 2 2 5 1 2 3 6 1 3 3 7 2 2 2 8 2 2 3 9 2 3 3 10 3 3 3 TUPLE_NEXT_GE_TEST: Normal end of execution. TIMESTAMP_TEST: Python version: 3.6.5 TIMESTAMP prints a timestamp of the current date and time. Thu Sep 13 17:18:31 2018 TIMESTAMP_TEST: Normal end of execution. TRIANG_TEST Python version: 3.6.5 TRIANG relabels elements for a partial ordering, The input matrix: Col: 0 1 2 3 4 Row 0: 1 0 0 0 0 1: 0 1 0 1 0 2: 1 0 1 1 0 3: 0 0 0 1 0 4: 1 1 1 1 1 5: 0 0 0 1 0 6: 1 0 1 1 0 7: 0 0 0 1 0 8: 0 0 0 0 0 9: 1 0 1 1 0 Col: 5 6 7 8 9 Row 0: 0 0 0 0 0 1: 1 0 1 0 0 2: 0 0 0 0 0 3: 0 0 0 0 0 4: 1 1 1 0 1 5: 1 0 1 0 0 6: 1 1 1 0 1 7: 0 0 1 0 0 8: 0 0 0 0 0 9: 0 0 1 0 1 The new ordering: 0 1 2 3 4 5 6 7 8 9 4 5 3 8 0 6 1 7 9 2 The reordered matrix: Col: 0 1 2 3 4 Row 0: 1 1 1 1 1 1: 0 1 1 1 1 2: 0 0 1 1 1 3: 0 0 0 1 1 4: 0 0 0 0 1 5: 0 0 0 0 0 6: 0 0 0 0 0 7: 0 0 0 0 0 8: 0 0 0 0 0 9: 0 0 0 0 0 Col: 5 6 7 8 9 Row 0: 1 1 1 1 0 1: 0 1 1 1 0 2: 0 0 1 1 0 3: 0 0 0 1 0 4: 0 0 0 0 0 5: 1 1 1 1 0 6: 0 1 1 1 0 7: 0 0 1 1 0 8: 0 0 0 1 0 9: 0 0 0 0 0 TRIANG_TEST: Normal end of execution. TUPLE_NEXT_TEST Python version: 3.6.5 TUPLE_NEXT returns the next "tuple", that is, a vector of N integers, each between M1 and M2. M1 = 2 M2 = 4 N = 2 # X[0] X[1] 1 2 2 2 2 3 3 2 4 4 3 2 5 3 3 6 3 4 7 4 2 8 4 3 9 4 4 TUPLE_NEXT_TEST: Normal end of execution. TUPLE_NEXT2_TEST Python version: 3.6.5 TUPLE_NEXT2 returns the next "tuple", that is, a vector of N integers. N = 3 Min 2 3 8 1 2 3 8 2 2 3 7 3 2 3 6 4 2 3 5 5 3 3 8 6 3 3 7 7 3 3 6 8 3 3 5 9 4 3 8 10 4 3 7 11 4 3 6 12 4 3 5 Max 4 3 5 TUPLE_NEXT2_TEST: Normal end of execution. UBVEC_ADD_TEST Python version: 3.6.5 UBVEC_ADD adds unsigned binary vectors representing unsigned integers I J K = I + J 22 96 Directly: 118 UBVEC_ADD 118 83 56 Directly: 139 UBVEC_ADD 139 41 6 Directly: 47 UBVEC_ADD 47 26 11 Directly: 37 UBVEC_ADD 37 4 64 Directly: 68 UBVEC_ADD 68 6 45 Directly: 51 UBVEC_ADD 51 40 76 Directly: 116 UBVEC_ADD 116 80 0 Directly: 80 UBVEC_ADD 80 90 35 Directly: 125 UBVEC_ADD 125 9 1 Directly: 10 UBVEC_ADD 10 UBVEC_ADD_TEST Normal end of execution. UBVEC_PRINT_TEST Python version: 3.6.5 UBVEC_PRINT prints an unsigned binary vector. UBVEC: 0 0 1 1 1 0 1 0 0 1 UBVEC_PRINT_TEST Normal end of execution. UBVEC_TO_UI4_TEST Python version: 3.6.5 UBVEC_TO_UI4 converts an unsigned binary vector to an unsigned integer UI4 --> UBVEC --> UI4 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 1 2 0 0 0 0 0 0 0 0 1 0 2 3 0 0 0 0 0 0 0 0 1 1 3 4 0 0 0 0 0 0 0 1 0 0 4 5 0 0 0 0 0 0 0 1 0 1 5 6 0 0 0 0 0 0 0 1 1 0 6 7 0 0 0 0 0 0 0 1 1 1 7 8 0 0 0 0 0 0 1 0 0 0 8 9 0 0 0 0 0 0 1 0 0 1 9 10 0 0 0 0 0 0 1 0 1 0 10 UBVEC_TO_UI4_TEST Normal end of execution. UBVEC_XOR_TEST Python version: 3.6.5 UBVEC_XOR exclusive-ors unsigned binary vectors representing unsigned integers I J K = I XOR J 22 96 118 83 56 107 41 6 47 26 11 17 4 64 68 6 45 43 40 76 100 80 0 80 90 35 121 9 1 8 UBVEC_XOR_TEST Normal end of execution. UI4_TO_UBVEC_TEST Python version: 3.6.5 UI4_TO_UBVEC converts an unsigned integer to an unsigned binary vector; UI4 --> UBVEC --> UI4 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 1 2 0 0 0 0 0 0 0 0 1 0 2 3 0 0 0 0 0 0 0 0 1 1 3 4 0 0 0 0 0 0 0 1 0 0 4 5 0 0 0 0 0 0 0 1 0 1 5 6 0 0 0 0 0 0 0 1 1 0 6 7 0 0 0 0 0 0 0 1 1 1 7 8 0 0 0 0 0 0 1 0 0 0 8 9 0 0 0 0 0 0 1 0 0 1 9 10 0 0 0 0 0 0 1 0 1 0 10 UI4_TO_UBVEC_TEST Normal end of execution. VEC_COLEX_NEXT_TEST Python version: 3.6.5 VEC_COLEX_NEXT generates all DIM_NUM-vectors in colex order in a given base BASE. The spatial dimension DIM_NUM = 3 The base BASE = 3 0 0 0 1 0 0 2 0 0 0 1 0 1 1 0 2 1 0 0 2 0 1 2 0 2 2 0 0 0 1 1 0 1 2 0 1 0 1 1 1 1 1 2 1 1 0 2 1 1 2 1 2 2 1 0 0 2 1 0 2 2 0 2 0 1 2 1 1 2 2 1 2 0 2 2 1 2 2 2 2 2 VEC_COLEX_NEXT_TEST: Normal end of execution. VEC_COLEX_NEXT2_TEST Python version: 3.6.5 VEC_COLEX_NEXT2 generates all DIM_NUM-vectors in colex order in a given base BASE. The spatial dimension DIM_NUM = 3 The base vector: 2 1 3 0 0 0 1 0 0 0 0 1 1 0 1 0 0 2 1 0 2 VEC_COLEX_NEXT2_TEST: Normal end of execution. VEC_COLEX_NEXT3_TEST Python version: 3.6.5 VEC_COLEX_NEXT3 generates all DIM_NUM-vectors in colex order in a given base BASE. The spatial dimension DIM_NUM = 3 The base vector: 2 1 3 1 1 1 2 1 1 1 1 2 2 1 2 1 1 3 2 1 3 VEC_COLEX_NEXT3_TEST: Normal end of execution. VEC_GRAY_NEXT_TEST Python version: 3.6.5 VEC_GRAY_NEXT generates product space elements. The number of components is 4 The number of elements is 16 Each component has its own number of degrees of freedom. Rank Change 2 2 1 4 1 0 0 0 0 0 2 3 0 0 0 1 3 3 0 0 0 2 4 3 0 0 0 3 5 1 0 1 0 3 6 3 0 1 0 2 7 3 0 1 0 1 8 3 0 1 0 0 9 0 1 1 0 0 10 3 1 1 0 1 11 3 1 1 0 2 12 3 1 1 0 3 13 1 1 0 0 3 14 3 1 0 0 2 15 3 1 0 0 1 16 3 1 0 0 0 VEC_GRAY_NEXT_TEST: Normal end of execution. VEC_GRAY_RANK_TEST Python version: 3.6.5 VEC_GRAY_RANK ranks product space elements. The number of components is 4 The number of elements is 16 Each component has its own number of degrees of freedom. VEC_GRAY_RANK reports the element 1 1 0 2 has rank 11 VEC_GRAY_RANK_TEST: Normal end of execution. VEC_GRAY_UNRANK_TEST Python version: 3.6.5 VEC_GRAY_UNRANK unranks product space elements. The number of components is 4 The number of elements is 16 Each component has its own number of degrees of freedom. VEC_GRAY_UNRANK reports the element of rank 7: 0 1 0 1 VEC_GRAY_UNRANK_TEST: Normal end of execution. VEC_LEX_NEXT_TEST Python version: 3.6.5 VEC_LEX_NEXT generates all DIM_NUM-vectors in lex order in a given base BASE. The spatial dimension DIM_NUM = 3 The base BASE = 3 0 0 0 0 0 1 0 0 2 0 1 0 0 1 1 0 1 2 0 2 0 0 2 1 0 2 2 1 0 0 1 0 1 1 0 2 1 1 0 1 1 1 1 1 2 1 2 0 1 2 1 1 2 2 2 0 0 2 0 1 2 0 2 2 1 0 2 1 1 2 1 2 2 2 0 2 2 1 2 2 2 VEC_LEX_NEXT_TEST: Normal end of execution. VEC_RANDOM_TEST Python version: 3.6.5 VEC_RANDOM generates a random N-vector in a given base. Here, we use base 3 0 2 2 1 1 0 0 0 0 1 0 1 1 2 2 VEC_RANDOM_TEST: Normal end of execution. VECTOR_CONSTRAINED_NEXT_TEST Python version: 3.6.5 VECTOR_CONSTRAINED_NEXT: Consider vectors: X_MIN(1:N) <= X(1:N) <= X_MAX(1:N), Set P = Product X_MAX(1:N) Accept only vectors for which: sum ( (X(1:N)-1) * P / X_MAX(1:N) ) <= P XMIN: 2 2 1 XMAX: 4 5 3 Maximum allowed CONSTRAINT = P = 60 1: 2 2 1 27 2: 3 2 1 42 3: 4 2 1 57 4: 2 3 1 39 5: 3 3 1 54 6: 2 4 1 51 7: 2 2 2 47 8: 2 3 2 59 VECTOR_CONSTRAINED_NEXT_TEST Normal end of execution. VECTOR_CONSTRAINED_NEXT2_TEST Python version: 3.6.5 VECTOR_CONSTRAINED_NEXT2: Consider vectors: X_MIN(1:N) <= X(1:N) <= X_MAX(1:N), Set P = Product X_MAX(1:N) Accept only vectors for which: sum ( X(1:N) * P / X_MAX(1:N) ) <= P XMIN: 1 1 XMAX: 5 6 Maximum allowed CONSTRAINT = P = 120 1 1 1 44 2 1 2 64 3 1 3 84 4 1 4 104 XMIN: 1 1 1 XMAX: 5 6 4 Maximum allowed CONSTRAINT = P = 120 1 1 1 1 74 2 1 2 1 94 3 1 3 1 114 4 1 1 2 104 VECTOR_CONSTRAINED_NEXT2_TEST Normal end of execution. VECTOR_CONSTRAINED_NEXT3_TEST Python version: 3.6.5 VECTOR_CONSTRAINED_NEXT3: Consider vectors: X_MIN(1:N) <= X(1:N) <= X_MAX(1:N), Set CONSTRAINT = sum ( X(1:N) / X_MAX(1:N) ) Accept only vectors for which: CONSTRAINT <= 1 XMIN: 1 1 XMAX: 5 6 Maximum allowed CONSTRAINT = P = 120 1 1 1 0.366667 2 2 1 0.566667 3 3 1 0.766667 4 4 1 0.966667 5 1 2 0.533333 6 2 2 0.733333 7 3 2 0.933333 8 1 3 0.7 9 2 3 0.9 10 1 4 0.866667 XMIN: 1 1 1 XMAX: 5 6 4 Maximum allowed CONSTRAINT = P = 120 1 1 1 1 0.616667 2 2 1 1 0.816667 3 1 2 1 0.783333 4 2 2 1 0.983333 5 1 3 1 0.95 6 1 1 2 0.866667 VECTOR_CONSTRAINED_NEXT3_TEST Normal end of execution. VECTOR_CONSTRAINED_NEXT4_TEST Python version: 3.6.5 VECTOR_CONSTRAINED_NEXT4: Consider vectors: X_MIN(1:N) <= X(1:N) <= X_MAX(1:N), Set TOTAL = sum ( ALPHA(1:N) * X(1:N) ) Accept only vectors for which: TOTAL <= Q ALPHA: 4.000000 3.000000 Q: 20.000000 XMIN: 1 0 XMAX: 2 6 1 4.000000 1 0 2 8.000000 2 0 3 7.000000 1 1 4 11.000000 2 1 5 10.000000 1 2 6 14.000000 2 2 7 13.000000 1 3 8 17.000000 2 3 9 16.000000 1 4 10 20.000000 2 4 11 19.000000 1 5 ALPHA: 4.000000 3.000000 5.000000 Q: 20.000000 XMIN: 1 0 1 XMAX: 2 6 4 1 9.000000 1 0 1 2 13.000000 2 0 1 3 12.000000 1 1 1 4 16.000000 2 1 1 5 15.000000 1 2 1 6 19.000000 2 2 1 7 18.000000 1 3 1 8 14.000000 1 0 2 9 18.000000 2 0 2 10 17.000000 1 1 2 11 20.000000 1 2 2 12 19.000000 1 0 3 VECTOR_CONSTRAINED_NEXT4_TEST Normal end of execution. VECTOR_CONSTRAINED_NEXT5_TEST Python version: 3.6.5 VECTOR_CONSTRAINED_NEXT5: Generate integer vectors X such that: SUM_MIN <= sum ( X(1:N) ) <= SUM_MAX, We require every X(I) to be at least 1. N = 3 SUM_MIN = 5 SUM_MAX = 7 # X(1) X(2) X(3) 1: 3 1 1 2: 2 2 1 3: 2 1 2 4: 1 3 1 5: 1 2 2 6: 1 1 3 7: 4 1 1 8: 3 2 1 9: 3 1 2 10: 2 3 1 11: 2 2 2 12: 2 1 3 13: 1 4 1 14: 1 3 2 15: 1 2 3 16: 1 1 4 17: 5 1 1 18: 4 2 1 19: 4 1 2 20: 3 3 1 21: 3 2 2 22: 3 1 3 23: 2 4 1 24: 2 3 2 25: 2 2 3 26: 2 1 4 27: 1 5 1 28: 1 4 2 29: 1 3 3 30: 1 2 4 31: 1 1 5 VECTOR_CONSTRAINED_NEXT5_TEST Normal end of execution. VECTOR_CONSTRAINED_NEXT6_TEST Python version: 3.6.5 VECTOR_CONSTRAINED_NEXT6: Consider vectors: X_MIN(1:N) <= X(1:N) <= X_MAX(1:N), Set TOTAL = sum ( ALPHA(1:N) * X(1:N) ) Accept only vectors for which: Q_MIN <= TOTAL <= Q_MAX ALPHA: 4.000000 3.000000 Q_MIN: 16.000000 Q_MAX: 20.000000 X_MIN: 1 0 X_MAX: 2 6 1 16.000000 1 4 2 19.000000 1 5 3 17.000000 2 3 4 20.000000 2 4 ALPHA: 4.000000 3.000000 5.000000 Q_MIN: 16.000000 Q_MAX: 20.000000 X_MIN: 1 0 1 X_MAX: 2 6 4 1 19.000000 1 0 3 2 17.000000 1 1 2 3 20.000000 1 2 2 4 18.000000 1 3 1 5 18.000000 2 0 2 6 16.000000 2 1 1 7 19.000000 2 2 1 VECTOR_CONSTRAINED_NEXT6_TEST Normal end of execution. VECTOR_CONSTRAINED_NEXT7_TEST Python version: 3.6.5 VECTOR_CONSTRAINED_NEXT7: Consider vectors: 0 <= X(1:N) <= X_MAX(1:N), Set TOTAL = sum ( ALPHA(1:N) * X(1:N) ) Accept only vectors for which: Q_MIN <= TOTAL <= Q_MAX ALPHA: 4.000000 3.000000 Q_MIN: 16.000000 Q_MAX: 20.000000 X_MAX: 2 6 1 18.000000 0 6 2 19.000000 1 5 3 17.000000 2 3 4 20.000000 2 4 ALPHA: 4.000000 3.000000 5.000000 Q_MIN: 16.000000 Q_MAX: 20.000000 X_MAX: 2 6 4 1 20.000000 0 0 4 2 18.000000 0 1 3 3 19.000000 0 3 2 4 17.000000 0 4 1 5 20.000000 0 5 1 6 18.000000 0 6 0 7 19.000000 1 0 3 8 17.000000 1 1 2 9 20.000000 1 2 2 10 18.000000 1 3 1 11 19.000000 1 5 0 12 18.000000 2 0 2 13 19.000000 2 2 1 14 17.000000 2 3 0 15 20.000000 2 4 0 VECTOR_CONSTRAINED_NEXT7_TEST Normal end of execution. VECTOR_NEXT_TEST Python version: 3.6.5 VECTOR_NEXT generates all vectors X such that: X_MIN(1:N) <= X(1:N) <= X_MAX(1:N) X_MIN: 1 4 X( 1): 1 4 X( 2): 2 4 X( 3): 1 5 X( 4): 2 5 X( 5): 1 6 X( 6): 2 6 X_MAX: 2 6 X_MIN: 1 4 3 X( 1): 1 4 3 X( 2): 2 4 3 X( 3): 1 5 3 X( 4): 2 5 3 X( 5): 1 6 3 X( 6): 2 6 3 X( 7): 1 4 4 X( 8): 2 4 4 X( 9): 1 5 4 X(10): 2 5 4 X(11): 1 6 4 X(12): 2 6 4 X_MAX: 2 6 4 VECTOR_NEXT_TEST: Normal end of execution. YTB_ENUM_TEST: Python version: 3.6.5 YTB_ENUM counts Young tableaus. N YTB(N) 0 0 1 1 2 2 3 4 4 10 5 26 6 76 7 232 8 764 9 2620 10 9496 YTB_ENUM_TEST: Normal end of execution. YTB_NEXT_TEST Python version: 3.6.5 YTB_NEXT generates Young tableaus. 1 4 6 2 5 3 1 3 6 2 5 4 1 2 6 3 5 4 1 3 6 2 4 5 1 2 6 3 4 5 1 4 5 2 6 3 1 3 5 2 6 4 1 2 5 3 6 4 1 3 4 2 6 5 1 2 4 3 6 5 1 2 3 4 6 5 1 3 5 2 4 6 1 2 5 3 4 6 1 3 4 2 5 6 1 2 4 3 5 6 1 2 3 4 5 6 YTB_NEXT_TEST: Normal end of execution. YTB_PRINT_TEST Python version: 3.6.5 YTB_PRINT prints a Young tableau. A Young tableau: 1 2 6 3 4 5 YTB_PRINT_TEST: Normal end of execution. YTB_RANDOM_TEST Python version: 3.6.5 YTB_RANDOM generates a random Young tableau 1 2 6 3 5 4 1 3 6 2 4 5 1 3 6 2 4 5 1 3 5 2 4 6 1 2 5 3 4 6 YTB_RANDOM_TEST: Normal end of execution. SUBSET_TEST: Normal end of execution. Thu Sep 13 17:18:31 2018