Last edited by Overworked_PhD; 04-20-2010 at 07:01 PM.
So in other words: "I'm a troll, please ban me, because all I'm going to do is say I can do everything under the sun, but when someone calls me on it, I'm going to act elitist and not actually do what I say I can do."
Great, glad to see you go MisterC. Again.
Quzah.
Hope is the first step on the road to disappointment.
You're missing the point. We're not talking about results that you MIGHT receive. Nor are we talking about the results that you DID receive.
We're talking about what ANYONE with a standard C compiler, can expect to work, for large integral values.
That upper limit is included in limits.h, and is generally defined as ULONG_MAX, or MAX_ULONG, or a similar name. If you have long long's, then look for that limit's definition, of course.
Awhile back, I worked with a poster to find the highest range of several types of numbers, and all the integral types larger than 8 bits, (char's and shorts on my system), could be run up above their limits as listed in the header. In some cases, by quite a bit. But that doesn't mean they're safe to use, on other compilers which are set to that same C standard.
If you go beyond the limits set by the standard, (which will almost always be quite conservative), you can not defend that decision, to a customer, to a court, or anyone else. If it works for you, fine, but that is a long way from being able to say "it's ANSI/standard C".
Personally, I think it's fun to go exploring those unexplored niche's in C, once in awhile, as long as we're clear that it is outside the limits of standard C.
Nah, he's a troll.I don't care what "32 bit PC" he says he has, he's not getting 158-digit numbers using any single standard unit. He's not even getting remotely close to that with 128-bit numbers. And that IS what he started going on about--storing that value in a 32 bit data type.We're talking about what ANYONE with a standard C compiler, can expect to work, for large integral values.
That upper limit is included in limits.h, and is generally defined as ULONG_MAX, or MAX_ULONG, or a similar name. If you have long long's, then look for that limit's definition, of course.
Awhile back, I worked with a poster to find the highest range of several types of numbers, and all the integral types larger than 8 bits, (char's and shorts on my system), could be run up above their limits as listed in the header. In some cases, by quite a bit. But that doesn't mean they're safe to use, on other compilers which are set to that same C standard.
Like I said, he needs to put up (post his "10 lines of C"), or shut up. Looks like he opted for the latter.
Quzah.
Last edited by quzah; 04-20-2010 at 07:20 PM.
Hope is the first step on the road to disappointment.
Adak, can I email you the code? I still think that it will compile and run correctly on any machine that has a standard C compiler. That is, I believe it is fully conforming code. However, getting a second opinion from someone that knows that they are doing doesn't hurt. I'll also have to probably include some notes because I don't think my line of reasoning is that obvious.
Last edited by Overworked_PhD; 04-20-2010 at 09:11 PM.
Overworked_PhD is an idiot
Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.