Over the past week or so, I've been posting different versions of my polynomial solver program on the PC Scripts Forums. Now, I have finished it and I probably won't make any changes to it anymore. The program is object oriented and has three files. For convenience, I have packaged the source into a downloadable tarball. It can be downloaded here. The current version of this program is 1.5.
Compiling in an IDE
To compile this program in your favorite IDE, follow these instructions:
- Create a new C++ project
-
Add a new C++ source file and call it
polynomialsolver.cpp -
Copy and paste the contents of
polynomialsolver.cppinto the project source file -
Add a new C++ source file and call it
Polynomial.cpp -
Copy and paste the contents of
Polynomial.cppinto the corresponding source file in the project -
Add a new C++ header file and call it
Polynomial.h -
Copy and paste the contents of
Polynomial.hinto the Polynomial header file in the project - Compile and run the program how you would any other program in your IDE
Compiling From the Terminal
I have not been able to compile this program from the Linux terminal using GCC. If anyone knows how to compile multi-file object oriented programs using GCC, please leave a comment.
Bugs
There are a few bugs in my program.
-
I can't get the private function
PrintPoly()to correctly output the polynomial. This does not affect the answer it gives but it cannot correctly display polynomials likex4-500x2+1000. If anyone knows how to fix this bug, please leave a comment. -
Outputs errors when the sensitivity of
GetValues(). Again, if anyone knows how to fix this, please leave a comment.
No comments:
Post a Comment