![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programmer
Join Date: Aug 2005
Posts: 68
Rep Power: 4
![]() |
Second degree equation solver v2.0
I've just finished my second degree equation solver v2.0, which doesn't stick any more to integer numbers, and there are no more bugs in it! Download it from my website :
www.freewebs.com/lesliect6 |
|
|
|
|
|
#2 |
|
Programming Guru
![]() |
Really cool program! I had one on my TI-83+ that i wrote for my math class a while back that was able to solve any problem with the calculators built-in support for imaginary numbers, which computers don't have. I've never heard the name for it, "Second degree equation" i normally just call it a "quadratic equation".
__________________
|
|
|
|
|
|
#3 |
|
Programmer
Join Date: Sep 2005
Location: Požega, Croatia
Posts: 93
Rep Power: 4
![]() |
I like the interface...
What technologies you used to make it? ... and one thing... Your application uses 98-99% of my CPU power, while other programs use cca 1-30% while running. CPU temperature constantly raises, and cools off when I quit the program. ![]()
__________________
1001 1101 1001 1110 0101 1102 ?! AAAAARRGGHHH _____________________ Free&Premium Web hosting reviews. Click here! Money making oasis. Run your own home based biz. |
|
|
|
|
|
#4 |
|
Professional Programmer
|
hmm .. if delta < 0 , it sais no solution, you could have shown the complex solution and BinaryStorm is right - my proc went to 50 % when i started the app and when it calculated the results 100%
__________________
Don't take life too seriously, it's not permanent ! |
|
|
|
|
|
#5 |
|
Programming Guru
![]() |
Calculation really should be processor demanding. It's just the quadratic formula...
__________________
|
|
|
|
|
|
#6 |
|
Programmer
Join Date: Aug 2005
Posts: 68
Rep Power: 4
![]() |
Thank you very much! I didn't know it uses so much processor...how can you slow it down so that it uses 1-30 percent, like BinaryStorm said?
Leslie CT |
|
|
|
|
|
#7 |
|
Professional Programmer
|
Probabily you need to show us the code. That way, maybe somebody will spot what you'r doing wrong
__________________
Don't take life too seriously, it's not permanent ! |
|
|
|
|
|
#8 |
|
Programmer
Join Date: Sep 2005
Location: Požega, Croatia
Posts: 93
Rep Power: 4
![]() |
You need to optimize your code. There are few ways of doing that :
1. (inline) Assembly 2. optimize your calculation algorithms/etc... -------- You probably don't want to try first way , so the second one will be best for you.Try searching on Google for "program CPU optimization" or something similar. And you have some basic things covered here -> http://www.azillionmonkeys.com/qed/optimize.html Here's what Wikipedia has about software optimization : http://en.wikipedia.org/wiki/Software_optimization
__________________
1001 1101 1001 1110 0101 1102 ?! AAAAARRGGHHH _____________________ Free&Premium Web hosting reviews. Click here! Money making oasis. Run your own home based biz. |
|
|
|
|
|
#9 |
|
Programmer
Join Date: Sep 2005
Location: Požega, Croatia
Posts: 93
Rep Power: 4
![]() |
...or you could describe us your calculation algorithm or post pseudo-code if you don't want to post source code.
__________________
1001 1101 1001 1110 0101 1102 ?! AAAAARRGGHHH _____________________ Free&Premium Web hosting reviews. Click here! Money making oasis. Run your own home based biz. |
|
|
|
|
|
#10 |
|
Troll
Join Date: Apr 2005
Location: Texas
Posts: 732
Rep Power: 4
![]() |
You should only be seeing CPU usage when the actual calculation is taking place. Check your code for any unnecessary looping...I noticed that the window does not appear to be using the standard widgets, are you using GDI? It seems like the window is repainting like crazy...notice the wildly flickering cursor...I advise that you only repaint when asked via WM_PAINT and, if you are intentionally triggering a repaint to get a flashing cursor, use a timer.
__________________
MD5(sig) = bcef75433db02e9ad9bf81d6f7c5c270 |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|