E

Equation Parser

A code in c that solves linear, polynomial and arithmetic equations using C programming language.

8

Created on 11th February 2020

E

Equation Parser

A code in c that solves linear, polynomial and arithmetic equations using C programming language.

The problem Equation Parser solves

This program can solve a regular arithmetic equation while consider rules of operator priority, Can also perform polynomial division and find roots of a polynomial equation of degree 'n' using Newton Raphson's Method. There is an option of linear equations as well. We also allow the user to store variables and use them for evaluation providing values for constants

Challenges I ran into

Although we have a check for imaginary roots, there were cases where we were unable to determine whether a given polynomial equation has existing roots or not. We came with a solution of adding a time variable which limits the maximum time required to solve a polynomial equation to a few seconds (More than enough for slower devices to calculate values for a big polynomial equation while not taking too long for faster devices) and printing invalid roots for that case.

Discussion

Builders also viewed

See more projects on Devfolio