28-Jul-2021 00:27:50 diophantine_2d_test(): MATLAB/Octave version 9.9.0.1467703 (R2020b) Test diophantine_2d(). diophantine_2d_test01() diophantine_2d_basis finds a basic solution for one Diophantine equation in two variables. 91*x1+21*x2 = 7 Any right hand side must be a multiple of d = 7 A particular solution v: 1 -4 General solution x = v + W*c, where W is: -3 13 The residual for the particular solution with c=0 is 0 diophantine_2d_test02(): diophantine_2d_nonnegative() returns the nonnegative solutions of a Diophantine equation in 2 variables. 91*x1+21*x2 = 7 Any right hand side must be a multiple of d = 7 A particular solution v: 1 -4 General solution x = v + W*c, where W is: -3 13 There are 0 nonnegative solutions: diophantine_2d_test03(): diophantine_2d_nonnegative() returns the nonnegative solutions of a Diophantine equation in 2 variables 2*x1+3*x2 = 18 Any right hand side must be a multiple of d = 1 A particular solution v: -18 18 General solution x = v + W*c, where W is: 3 -2 There are 4 nonnegative solutions: c=6: 2 (0) + 3 (6) = 18 c=7: 2 (3) + 3 (4) = 18 c=8: 2 (6) + 3 (2) = 18 c=9: 2 (9) + 3 (0) = 18 diophantine_2d_test04(): diophantine_2d_positive() returns the positive solutions of a Diophantine equation in two variables 2*x1+3*x2 = 18 Any right hand side must be a multiple of d = 1 A particular solution v: -18 18 General solution x = v + W*c, where W is: 3 -2 There are 2 strictly positive solutions: c=7: 2 (3) + 3 (4) = 18 c=8: 2 (6) + 3 (2) = 18 diophantine_2d_test05(): diophantine_2d_nonnegative returns the nonnegative solutions of a Diophantine equation in two variables 6*x1+10*x2 = 100 Any right hand side must be a multiple of d = 2 A particular solution v: 100 -50 General solution x = v + W*c, where W is: -5 3 There are 4 nonnegative solutions: c=17: 6 (15) + 10 (1) = 100 c=18: 6 (10) + 10 (4) = 100 c=19: 6 (5) + 10 (7) = 100 c=20: 6 (0) + 10 (10) = 100 diophantine_2d_test06(): diophantine_2d_positive returns the positive solutions of a Diophantine equation in two variables 5*x1+9*x2 = 80 Any right hand side must be a multiple of d = 1 A particular solution v: 160 -80 General solution x = v + W*c, where W is: -9 5 There are 1 strictly positive solutions: c=17: 5 (7) + 9 (5) = 80 diophantine_2d_test(): Normal end of execution. 28-Jul-2021 00:27:50