Both run forever and we rate them in MIPS-years because we expect them to never end.
In fact I know several maths departments have had them running for years with prime
numbers slowly being added to a file list as it finds them.
This one has been going 9 years, and hasn't output a number in over a year and it may
never put out another number ( Only the PRIME GODS know). Great Internet Mersenne Prime Search - PrimeNet[^]
You will note the weird today stats on right hand side to even know it is still running
and you may get a laugh from the youtube video about the notification failing and the
discovery date being 3 months late.
Wikipedia and everyone I know calls them an algorithm .. except they fail your definition
they be finite and terminate
You claim such a thing can't be done and we shouldn't talk about it ... yet it exists .
I keep answering because you keep making out some sort of authoritative answer, you insist on
some definition but you never say by who, what authority?. I have shown you a number of
computer programming fields who don't agree with that definition and things you say are
impossible exist, so I am never going to agree with you. You are wasting time trying to argue
authority in such a situation. I don't doubt your definition may be true in your field and you
really truely believe it, but that doesn't work universally.
No you're just confusing GIMPS with the algorithms they use. Primality testing can trivially be done in finite time even with trial division. The Lucas-Lehmer test that GIMPS spends most its time doing also runs in finite time. Even factoring can be done in finite time with trial division. QS and GNFS do not need infinite sieving, they need an amount of sieving that depends on the smoothness bound B, which (while typically analyzed heuristically) is definitely finite (for example, it doesn't need to be any higher than the number being factored - that's a terrible bound but it makes B definitely finite). GIMPS as a whole doesn't have an end in sight because they can just keep looking for more Mersenne primes, but it's a project, not an algorithm.
You have not shown that anything that I have said does not exist actually does, you have called various things infinite that aren't, and named an example of an infinite process that isn't an algorithm. The one thing you could have mentioned that is slightly troubling in the face of the finiteness of algorithms is the class of Las Vegas algorithms, which seems to defy the definition. But they terminate in finite time with probability 1.
As for the definition, it's on wikipedia among other places. See also effective method. Not authoritative enough? Check the sources.
Interesting I need to give that some more thought to see if it works for me.
Most of us mathematicians and programmers are obviously just lazy and call it the Mersenne Primes algorithm,
we know there are a couple of small sub section algorithms running under it. I can honestly say I have never
thought much about it until this question.
The problem I have is if I take it out to computability like you have (and your link), Mersenne Primes is not
an Algorithm, it's not an Effective method (it doesn't terminate) .. it's not anything and you ended up calling
it a project .. which I now understand. A project to me is meaningless and while to you it's just a formal
definition, I lose working meaning and I am not sure I want to go that far just to get a definition
What is common to all the group of things that are causing problems is they all expel intermediate results
and it is the intermediate results that are more important than the "project" terminating (using your terms).
I see where you are going but I need time to think about it because this is tricky with this class of problems,
I am even needing to look carefully at the definition of computability. A couple of the fractal situations are
probably classed as not computabile.
You are calling BeginPaint for every message (not just WM_PAINT), but you only call EndPaint after processing a WM_PAINT message. You need to move all code related the the painting into the block that handles the WM_PAINT message. You also need to select your brushes and pens into the device context before you draw anything. And lastly you need to delete any DC objects that you use in painting.
I would suggest studying the GDI documentation on MSDN for sample code. But be aware that GDI and GDI+ are being deprecated by Microsoft in favour of Direct2D API Reference (Windows)[^]
That is what you wrote in your original question, and removing the unnecessary do ... while() is not going to affect things. The issue is, what value type is SQL returning into your recordset? What you are looking at here is happening long after the data has been sent from the database.
What you have described sounds perfectly correct depending how you set the tables up.
Your nUser will be (look at SQL spec integer value between the range 2^ -31 and 2^31 -1) which is 32 bits or 4 bytes and would be a long in C/C++.
Your decimal (10.2) will be stored as an IEEE-754/-854-compliant bit string which will be 5-17 bytes.
If you stored your decimal(10.2) as singles/doubles you would get issues when you added them etc the small fractions you can't see would roll do you understand lets add 3 digits with 3 decimal places
dVAT has decimal (10.2) SQL data type, and when I test this data with CMyDoc::FormatData, the returning data type are: DBVT_ASTRING ... why ?
Because the best way to pass a floating point value between network devices is as TEXT. The SQL server has no idea what architecture your device is using and how it will interpret the floating point value.
The carpenter manufactures chairs and tables. He can sell them on the market, each table forPt EUR and each chair forPc EUR. He needs A hours and B wooden planks to produce one table and C hours and D planks for one chair. His weekly workload cannot be higher than H hours. His weekly supply for planks isS. The carpenter cannot store the planks. Help the carpenter to prepare his weekly schedule that maximizes his income. Design an algorithm that accepts A, B, C, D, H, S, Pt, Pcas an input and tells how many chairs and how many tables the carpenter should produce weekly, and what is the income assuming this production plan.
I haven't even got a clue... Can anyone please help?
Last Visit: 31-Dec-99 19:00 Last Update: 27-Jan-23 4:30