Minimal Solution lost turn numerical solution of equations of FIG computer

I wrote a program DiophantusMin, lost minimal solution turned diagram equations solved by numerical methods.

 

Algorithm is across the approximation, algorithms and principles, see "Binary implicit function numerical solution"    https://www.cnblogs.com/KSongKing/p/12109699.html      .

 

Diophantine equation is uncertain equations, find the integer solutions. DiophantusMin just minimal solution, because a numerical method, so strictly speaking, unknown absolute value as small as possible approximate solution.

 

Program uses many sets of integers to try to match into the equation, each integer substituting equation calculated absolute value of difference equations into the left and right of the equation, the absolute value of the difference is called the diff, an integer indicating the degree of satisfying the set of equations, diff, the higher the satisfaction degree equation, diff, the lower the degree of satisfying equation.

Diff program will set a minimum integer as an output of the final solution.

Because equations, so here is talking about diff diff integrated equations in the equations derived diff, diff rule is to take the equations of the largest as a diff diff equations.

 

As minimal solution "minimum", and there is no solution to seek to obtain a plurality of groups ordered minimum solution, where the approach is very simple, it is to try to match the range of the integer into the equation set at (-100, 100) within the interval , the composition takes the smallest integer within the range of the diff, this is almost the minimum solution, of course, approximate.

To try to match into equation is set within the range of integer (-100, 100) matching by setting the interval setting, the default setting is to match the program interface two match, the first round step 10, 10 the number of steps, the first two steps of 1, the number of steps 10. After running this program, you can see in the program interface.

Matching the initial value is 0, which is hard-coded in the program, coupled with the initial step value * integer number of steps to get every match.

 

Because the distribution of the different solutions of equation (s) are not the same, therefore, necessary to set an appropriate step size, number of steps, for matching the number wheel, in order to obtain a sufficiently accurate solution.

 

Equations expressed in javascript, each equation is represented by a function, separated by commas function, the program interface in the default set up a system of equations, you can try to solve directly.

Guess you like

Origin www.cnblogs.com/KSongKing/p/12168989.html