Mathematic Equation solving app/website
Guys I am working on a simple project and it's about a website that can solve many kinds of mathematical problems. Generally the user will be able to choose 1 or 2 variables and then they need to make an equation or expression using symbols (+,-,/,*,mod etc) and the program will return the solution pair for the given equation/expression by testing out some numbers within a range. The user will also be able to modify the number range. If anyone is interested about this project then let me know
18 Replies
Adding modular arithmetic it is going to be quite harder than just basic arithmetic operations
Not really. Solving an equation is much harder
I was able to code the core part but there's many things left
The equation is limited to linear equations?
Nope
I'm guessing you're using Newton's method for it
No I am just using brute force method
usually the computer will test the numbers from 1 to 10000 to check whether the number satiesfies the equation. Then when the solution is found the program wil return the values which will pass the test and show it in the html page
Bro
That's probably the least efficient mrghkd existing
And what if a solution is -3 or ⅔
it will only work with integer solutions at the first stage.
after that I will try to work with non-integer numbers also
And that is the problem
Trying out every number from 0 to 10000 is very, very, very slow
I'd strongly suggest you to use Newton's method or the bisection one to help you find the roots easily
I have done an equation solver before and those were by far the best methods
Yep I faced the problem I reduced the default limit. Thanks for the suggestion though
That's not what I'm saying you should attempt
And you'll probably discover (if you haven't already) the precision errors of 64-bit doubles
Yep I am getting some kind of error even though I don't know what is it
Can you tell me about it?
It's a bit complicated to explain in simple terms but basically doubles lose precision due to their internal representation
this is the core logic of this program
does this include the fault you are taking about?
yeah
I solved the problem 👍
its just working fine now. except it can seek values which are only integer and numbers from 1 to 500
Have you looked up any numerical method for solving equations
nope just the brute force.