text[Limit - i + 1]:=tdigit[digit[i]]; % Reversing the order. next i; % Arabic numerals put the low order last. Print text," = ",n,"!"; % Print the result! next n; % On to the next factorial up. END; With the example in view, a number of details can be discussed. The most important is the choice of the representation of the big number. In this case, only integer values are required for digits, so an array of fixed-width integers is adequate. It is convenient to have successive elements of the array represent higher powers of the base. The second most important decision is in the choice of the base of arithmetic, here ten. There are many considerations. The scratchpad variable d must be able to hold the result of a single-digit multiply plus the carry from the prior digit's multiply. In base ten, a sixteen-bit integer is certainly adequate as it allows up to 32767. However, this example cheats, in that the value of n is not itself limited to a single digit. This has the consequence that the method will fail for n > 3200 or so. In a more general implementation, n would also use a multi-digit representation
Chat with our AI personalities
-10
Put the values that you find (as the solution) back into one (or more) of the original equations and evaluate them. If they remain true then the solution checks out. If one equation does not contain all the variables involved in the system, you may have to repeat with another of the original equations.
You find a solution set. Depending on whether the equations are linear or otherwise, consistent or not, the solution set may consist of none, one, several or infinitely many possible solutions to the system.
Parenthesis, exponents, multiplication, division, addition, subtraction. PEMDAS
Linear equations, if they have a solution, can be solved analytically. On the other hand, it may not always be possible to find a solution to nonlinear equations. This is where you use various numerical methods (eg Newton-Raphson) to work from one approximate numerical solution to a better solution. This iterative procedure, if properly applied, gives accurate numerical solutions to nonlinear equations. But as mentioned above, they are not arrived at analytically.