Thu Sep 13 12:59:33 2018 POLYNOMIAL_TEST Python version: 3.6.5 Test the POLYNOMIAL library. 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_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_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. I4VEC_CONCATENATE_TEST Python version: 3.6.5 I4VEC_CONCATENATE concatenates two I4VECs Array 1: 0 91 1 31 2 71 3 51 4 31 Array 2: 0 42 1 22 2 12 Array 3 = Array 1 + Array 2: 0 91 1 31 2 71 3 51 4 31 5 42 6 22 7 12 I4VEC_CONCATENATE_TEST Normal end of execution. I4VEC_PERMUTE_TEST Python version: 3.6.5 I4VEC_PERMUTE reorders an I4VEC according to a given permutation. A[*], before rearrangement: 0 2 1 12 2 10 3 7 4 5 5 0 6 3 7 1 8 0 9 8 10 0 11 5 Permutation vector P[*]: 0 4 1 9 2 1 3 3 4 11 5 7 6 6 7 5 8 0 9 8 10 10 11 2 A[P[*]]: 0 5 1 8 2 12 3 7 4 5 5 1 6 3 7 0 8 2 9 0 10 0 11 10 I4VEC_PERMUTE_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_SORT_HEAP_INDEX_A_TEST Python version: 3.6.5 I4VEC_SORT_HEAP_INDEX_A creates an ascending 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 15 1 19 2 8 3 10 4 5 5 18 6 7 7 0 8 6 9 17 10 12 11 4 12 11 13 3 14 9 15 13 16 14 17 2 18 16 19 1 I INDX(I) A(INDX(I)) 0 15 0 1 19 0 2 8 2 3 10 3 4 5 4 5 18 5 6 7 6 7 0 13 8 6 15 9 17 21 10 12 24 11 4 25 12 11 27 13 3 34 14 9 38 15 13 46 16 14 48 17 2 50 18 16 54 19 1 58 I4VEC_SORT_HEAP_INDEX_A_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_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. R8VEC_CONCATENATE_TEST Python version: 3.6.5 R8VEC_CONCATENATE concatenates two R8VECs Array 1: 0: 91.1 1: 31.2 2: 71.3 3: 51.4 4: 31.5 Array 2: 0: 42.6 1: 22.7 2: 12.8 Array 3 = Array 1 + Array 2: 0: 91.1 1: 31.2 2: 71.3 3: 51.4 4: 31.5 5: 42.6 6: 22.7 7: 12.8 R8VEC_CONCATENATE_TEST Normal end of execution. R8VEC_PERMUTE_TEST Python version: 3.6.5 R8VEC_PERMUTE permutes an R8VEC. Original array X[]: 0: 1.1 1: 2.2 2: 3.3 3: 4.4 4: 5.5 Permutation vector P[]: 0 1 1 3 2 4 3 0 4 2 Permuted array X[P[*]]: 0: 2.2 1: 4.4 2: 5.5 3: 1.1 4: 3.3 R8VEC_PERMUTE_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. PERM0_UNIFORM_TEST Python version: 3.6.5 PERM0_UNIFORM randomly selects a permutation of 0, ..., N-1. 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_UNIFORM_TEST Normal end of execution. MONO_UPTO_ENUM_TEST Python version: 3.6.5 MONO_UPTO_ENUM can enumerate the number of monomials in M variables, of total degree between 0 and N. N: 0 1 2 3 4 5 6 7 8 M +--------------------------------------------------------------- 1 | 1 2 3 4 5 6 7 8 9 2 | 1 3 6 10 15 21 28 36 45 3 | 1 4 10 20 35 56 84 120 165 4 | 1 5 15 35 70 126 210 330 495 5 | 1 6 21 56 126 252 462 792 1287 6 | 1 7 28 84 210 462 924 1716 3003 7 | 1 8 36 120 330 792 1716 3432 6435 8 | 1 9 45 165 495 1287 3003 6435 12870 MONO_UPTO_ENUM_TEST Normal end of execution. MONO_NEXT_GRLEX_TEST Python version: 3.6.5 MONO_NEXT_GRLEX computes the next monomial in M variables in grlex order. Let M = 4 0 3 3 2 0 3 4 1 0 3 5 0 0 4 0 4 0 4 1 3 0 4 2 2 1 0 1 0 1 1 0 0 2 0 0 0 0 0 0 3 0 0 1 2 0 0 2 1 0 2 0 1 0 2 1 0 0 3 0 0 1 0 0 2 1 0 1 1 1 0 2 0 1 3 3 0 1 4 0 2 1 4 1 1 1 4 2 0 1 5 0 1 1 5 1 0 3 1 0 0 4 0 0 0 0 0 0 5 0 0 1 4 0 0 2 3 0 0 3 2 3 3 0 0 4 0 0 2 4 0 1 1 4 0 2 0 4 1 0 1 4 1 1 0 1 3 0 1 1 3 1 0 1 4 0 0 2 0 0 3 2 0 1 2 2 0 2 1 3 1 2 2 3 1 3 1 3 1 4 0 3 2 0 3 3 2 1 2 3 2 2 1 3 1 3 2 3 1 4 1 3 1 5 0 3 2 0 4 3 2 1 3 3 2 2 2 0 3 1 0 0 4 0 0 1 0 0 3 1 0 1 2 1 0 2 1 1 0 3 0 MONO_NEXT_GRLEX_TEST Normal end of execution. MONO_RANK_GRLEX_TEST Python version: 3.6.5 MONO_RANK_GRLEX returns the rank of a monomial in the sequence of all monomials in M dimensions, in grlex order. Print a monomial sequence with ranks assigned. Let M = 3 N = 4 1 0 0 0 2 0 0 1 3 0 1 0 4 1 0 0 5 0 0 2 6 0 1 1 7 0 2 0 8 1 0 1 9 1 1 0 10 2 0 0 11 0 0 3 12 0 1 2 13 0 2 1 14 0 3 0 15 1 0 2 16 1 1 1 17 1 2 0 18 2 0 1 19 2 1 0 20 3 0 0 21 0 0 4 22 0 1 3 23 0 2 2 24 0 3 1 25 0 4 0 26 1 0 3 27 1 1 2 28 1 2 1 29 1 3 0 30 2 0 2 31 2 1 1 32 2 2 0 33 3 0 1 34 3 1 0 35 4 0 0 Now, given a monomial, retrieve its rank in the sequence: 1 0 0 0 4 1 0 0 2 0 0 1 7 0 2 0 15 1 0 2 24 0 3 1 77 3 2 1 158 5 2 1 MONO_RANK_GRLEX_TEST Normal end of execution. MONO_TOTAL_NEXT_GRLEX_TEST Python version: 3.6.5 MONO_TOTAL_NEXT_GRLEX can list the monomials in M variables, of total degree N, in grlex order, one at a time. We start the process with (0,0,...,0,N). The process ends with (N,0,...,0,0) Let M = 3 N = 3 1 0 0 3 2 0 1 2 3 0 2 1 4 0 3 0 5 1 0 2 6 1 1 1 7 1 2 0 8 2 0 1 9 2 1 0 10 3 0 0 MONO_TOTAL_NEXT_GRLEX_TEST Normal end of execution. MONO_UNRANK_GRLEX Python version: 3.6.5 MONO_UNRANK_GRLEX is given a rank, and returns the corresponding monomial in the sequence of all monomials in M dimensions in grlex order. For reference, print a monomial sequence with ranks. Let M = 3 N = 4 1 0 0 0 2 0 0 1 3 0 1 0 4 1 0 0 5 0 0 2 6 0 1 1 7 0 2 0 8 1 0 1 9 1 1 0 10 2 0 0 11 0 0 3 12 0 1 2 13 0 2 1 14 0 3 0 15 1 0 2 16 1 1 1 17 1 2 0 18 2 0 1 19 2 1 0 20 3 0 0 21 0 0 4 22 0 1 3 23 0 2 2 24 0 3 1 25 0 4 0 26 1 0 3 27 1 1 2 28 1 2 1 29 1 3 0 30 2 0 2 31 2 1 1 32 2 2 0 33 3 0 1 34 3 1 0 35 4 0 0 Now choose random ranks between 1 and 35 8 1 0 1 34 3 1 0 30 2 0 2 20 3 0 0 15 1 0 2 MONO_UNRANK_GRLEX_TEST Normal end of execution. MONO_VALUE_TEST Python version: 3.6.5 MONO_VALUE evaluates a monomial. Let M = 3 N = 6 M(X) = x^(2,1,0) M(1,2,3) = 2 M(-2,4,1) = 16 M(X) = x^(4,2,0) M(1,2,3) = 4 M(-2,4,1) = 256 M(X) = x^(2,0,4) M(1,2,3) = 81 M(-2,4,1) = 4 M(X) = x^(2,1,2) M(1,2,3) = 18 M(-2,4,1) = 16 M(X) = x^(4,0,0) M(1,2,3) = 1 M(-2,4,1) = 16 MONO_VALUE_TEST: Normal end of execution. POLYNOMIAL_ADD_TEST Python version: 3.6.5 POLYNOMIAL_ADD adds two polynomials P1(X): + 7.0 * x^(0,0,0) - 5.0 * x^(0,0,1) + 9.0 * x^(1,0,0) + 11.0 * x^(0,0,2) + 0.0 * x^(0,1,2) - 13.0 * x^(3,0,1). P2(X): + 2.0 * x^(0,0,0) + 3.0 * x^(0,1,0) - 8.0 * x^(1,0,0) + 4.0 * x^(2,0,2) + 9.0 * x^(3,0,1). P(X) = P1(X) + P2(X): + 9.0 * x^(0,0,0) - 5.0 * x^(0,0,1) + 3.0 * x^(0,1,0) + 1.0 * x^(1,0,0) + 11.0 * x^(0,0,2) + 4.0 * x^(2,0,2) - 4.0 * x^(3,0,1). POLYNOMIAL_ADD_TEST: Normal end of execution. POLYNOMIAL_AXPY_TEST Python version: 3.6.5 POLYNOMIAL_AXPY adds a multiple of one polynomial to another. P1(X): + 7.0 * x^(0,0,0) - 5.0 * x^(0,0,1) + 9.0 * x^(1,0,0) + 11.0 * x^(0,0,2) + 0.0 * x^(0,1,2) - 13.0 * x^(3,0,1). P2(X): + 2.0 * x^(0,0,0) + 3.0 * x^(0,1,0) - 8.0 * x^(1,0,0) + 4.0 * x^(2,0,2) + 9.0 * x^(3,0,1). Use the multiplier S = 10 P(X) = S * P1(X) + P2(X): + 72.0 * x^(0,0,0) - 50.0 * x^(0,0,1) + 3.0 * x^(0,1,0) + 82.0 * x^(1,0,0) + 110.0 * x^(0,0,2) + 4.0 * x^(2,0,2) - 121.0 * x^(3,0,1). POLYNOMIAL_AXPY_TEST: Normal end of execution. POLYNOMIAL_COMPRESS_TEST Python version: 3.6.5 POLYNOMIAL_COMPRESS compresses a polynomial. Uncompressed polynomial = + 7.0 * x^(0,0,0) - 5.0 * x^(0,0,1) + 5.0 * x^(0,0,1) + 9.0 * x^(1,0,0) + 11.0 * x^(0,0,2) + 3.0 * x^(0,0,2) + 6.0 * x^(0,0,2) + 0.0 * x^(0,1,2) - 13.0 * x^(3,0,1) + 1e-20 * x^(4,0,0). Compressed polynomial = + 7.0 * x^(0,0,0) + 9.0 * x^(1,0,0) + 20.0 * x^(0,0,2) - 13.0 * x^(3,0,1). POLYNOMIAL_COMPRESS_TEST: Normal end of execution. POLYNOMIAL_DIF_TEST Python version: 3.6.5 POLYNOMIAL_DIF differentiates a polynomial. P(X): + 2.0 * x^(0,0) + 3.0 * x^(3,0) + 4.0 * x^(1,3) + 5.0 * x^(3,4). d3 P(X) dx1 dx1 dx2 = + 120.0 * x^(1,3). POLYNOMIAL_DIF_TEST: Normal end of execution. POLYNOMIAL_MUL_TEST Python version: 3.6.5 POLYNOMIAL_MUL multiplies two polynomials P1(X): + 2.0 * x^(0,0,0) + 3.0 * x^(0,1,0) + 4.0 * x^(1,0,0) + 5.0 * x^(0,1,1). P2(X): + 6.0 * x^(0,0,1) + 7.0 * x^(0,0,2). P(X) = P1(X) * P2(X): + 12.0 * x^(0,0,1) + 14.0 * x^(0,0,2) + 18.0 * x^(0,1,1) + 24.0 * x^(1,0,1) + 51.0 * x^(0,1,2) + 28.0 * x^(1,0,2) + 35.0 * x^(0,1,3). POLYNOMIAL_MUL_TEST: Normal end of execution. POLYNOMIAL_PRINT_TEST Python version: 3.6.5 POLYNOMIAL_PRINT prints a polynomial. P1(X) = + 7.0 * x^(0,0,0) - 5.0 * x^(0,0,1) + 9.0 * x^(1,0,0) + 11.0 * x^(0,0,2) + 0.0 * x^(0,1,2) - 13.0 * x^(3,0,1). POLYNOMIAL_PRINT_TEST: Normal end of execution. POLYNOMIAL_SCALE_TEST Python version: 3.6.5 POLYNOMIAL_SCALE scales a polynomial by a multiplier S. Original P(X): + 7.0 * x^(0,0,0) - 5.0 * x^(0,0,1) + 9.0 * x^(1,0,0) + 11.0 * x^(0,0,2) + 0.0 * x^(0,1,2) - 13.0 * x^(3,0,1). Apply scale factor S = -0.5 S * P(X): - 3.5 * x^(0,0,0) + 2.5 * x^(0,0,1) - 4.5 * x^(1,0,0) - 5.5 * x^(0,0,2) + 0.0 * x^(0,1,2) + 6.5 * x^(3,0,1). POLYNOMIAL_SCALE_TEST: Normal end of execution. POLYNOMIAL_SORT_TEST Python version: 3.6.5 POLYNOMIAL_SORT sorts a polynomial by exponent index. Unsorted polynomial: + 0.0 * x^(0,1,2) + 9.0 * x^(1,0,0) - 5.0 * x^(0,0,1) - 13.0 * x^(3,0,1) + 7.0 * x^(0,0,0) + 11.0 * x^(0,0,2). Sorted polynomial: + 7.0 * x^(0,0,0) - 5.0 * x^(0,0,1) + 9.0 * x^(1,0,0) + 11.0 * x^(0,0,2) + 0.0 * x^(0,1,2) - 13.0 * x^(3,0,1). POLYNOMIAL_SORT_TEST: Normal end of execution. POLYNOMIAL_VALUE_TEST Python version: 3.6.5 POLYNOMIAL_VALUE evaluates a polynomial. P(X) = + 7.0 * x^(0,0,0) - 5.0 * x^(0,0,1) + 9.0 * x^(1,0,0) + 11.0 * x^(0,0,2) + 0.0 * x^(0,1,2) - 13.0 * x^(3,0,1). P(1.000000,2.000000,3.000000) = 61 P(-2.000000,4.000000,1.000000) = 99 POLYNOMIAL_VALUE_TEST: Normal end of execution. POLYNOMIAL_TEST: Normal end of execution. Thu Sep 13 12:59:33 2018