Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Sep 25th, 2005, 9:45 AM   #1
Lesliect6
Programmer
 
Join Date: Aug 2005
Posts: 68
Rep Power: 4 Lesliect6 is on a distinguished road
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
Lesliect6 is offline   Reply With Quote
Old Sep 25th, 2005, 9:59 AM   #2
tempest
Programming Guru
 
tempest's Avatar
 
Join Date: Oct 2004
Posts: 1,041
Rep Power: 6 tempest is on a distinguished road
Send a message via ICQ to tempest Send a message via AIM to tempest Send a message via Yahoo to tempest
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".
__________________

tempest is offline   Reply With Quote
Old Sep 25th, 2005, 12:37 PM   #3
BinaryStorm
Programmer
 
BinaryStorm's Avatar
 
Join Date: Sep 2005
Location: Požega, Croatia
Posts: 93
Rep Power: 4 BinaryStorm is on a distinguished road
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.
BinaryStorm is offline   Reply With Quote
Old Sep 25th, 2005, 2:03 PM   #4
xavier
Professional Programmer
 
xavier's Avatar
 
Join Date: Oct 2004
Location: .ro
Posts: 406
Rep Power: 5 xavier is on a distinguished road
Send a message via Yahoo to xavier
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 !
xavier is offline   Reply With Quote
Old Sep 25th, 2005, 2:06 PM   #5
tempest
Programming Guru
 
tempest's Avatar
 
Join Date: Oct 2004
Posts: 1,041
Rep Power: 6 tempest is on a distinguished road
Send a message via ICQ to tempest Send a message via AIM to tempest Send a message via Yahoo to tempest
Calculation really should be processor demanding. It's just the quadratic formula...
__________________

tempest is offline   Reply With Quote
Old Sep 26th, 2005, 8:24 AM   #6
Lesliect6
Programmer
 
Join Date: Aug 2005
Posts: 68
Rep Power: 4 Lesliect6 is on a distinguished road
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
Lesliect6 is offline   Reply With Quote
Old Sep 26th, 2005, 8:34 AM   #7
xavier
Professional Programmer
 
xavier's Avatar
 
Join Date: Oct 2004
Location: .ro
Posts: 406
Rep Power: 5 xavier is on a distinguished road
Send a message via Yahoo to xavier
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 !
xavier is offline   Reply With Quote
Old Sep 26th, 2005, 8:41 AM   #8
BinaryStorm
Programmer
 
BinaryStorm's Avatar
 
Join Date: Sep 2005
Location: Požega, Croatia
Posts: 93
Rep Power: 4 BinaryStorm is on a distinguished road
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.
BinaryStorm is offline   Reply With Quote
Old Sep 26th, 2005, 8:43 AM   #9
BinaryStorm
Programmer
 
BinaryStorm's Avatar
 
Join Date: Sep 2005
Location: Požega, Croatia
Posts: 93
Rep Power: 4 BinaryStorm is on a distinguished road
...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.
BinaryStorm is offline   Reply With Quote
Old Sep 26th, 2005, 8:56 AM   #10
Dameon
Troll
 
Dameon's Avatar
 
Join Date: Apr 2005
Location: Texas
Posts: 732
Rep Power: 4 Dameon is on a distinguished road
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
Dameon is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 5:21 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC