// true value of an ultimate_int is least_significant_value + [upper limit of long long + 1] * most_significant_value
class ultimate_int {
public:
long long most_significant_value
long long least_significant_value
private:
operator+ [etc...]
}
it's going to take some work, have to do ostream/istream overrides for cout/cin, etc. but it can be done
I asked that because I'm primarily a graphics programmer, and I didn't want to have to learn an entirely new language just to work with large #'s.
Heheheh xbox sized number.
Name:
Anonymous2006-09-06 20:00
Uh, Direct3D and OpenGL both use floats. A better question is why you need integers to represent these large numbers.
Also, if you're having trouble with something as basic as arbitrary-length integers, there's no way you're a graphics programmer. Did you go to Devry or what?
I don't think this guy even knows the difference between floats and ints.
Name:
Anonymous2006-09-07 0:14
>>15
Like >>16 said, don't call yourself a graphics programmer if you don't even understand the basics, like that the pipeline uses floats and is optimized to do so, so you should use floats too. If you are stupid enough to think using huge integers is okay, you have no understanding whatsoever of how the hardware works either.
Name:
Anonymous2006-09-07 4:09
Did any of you people think that maybe he's doing a large, complex mathematical simulator that simply had an OpenGL frontend?
Name:
Anonymous2006-09-07 4:57
>>19
Why would someone clueless do a large, complex mathematical simulator?
Arbitrary-length integer math is basic. Someone who doesn't know how to do that has no business with a complicated field like numerics.
Again, I didn't ask about the OpenGL and DirectX implementations because I'm working on a project that requires massive integers as graphics, I asked because I wouldn't want to learn a language with out them.
Name:
Anonymous2006-09-09 8:18
>>22
Well if you really are a "graphics programmer", why the hell would you care, since there is no place for huge integers in graphics?
Yes. I'm a C programmer. So? I don't see a problem. I embraced my UNIX soul long ago and I am happy together with my compiler (who is a cute layered front/backend design!). We have a fucking lot of functions in and outside of the kernel and I am pretty compact and resource conserving.
But thanks anyway asshole. Go and beat off to your stupid garbage collection shit while I #INCLUDE <stdio.h> with my preprocessor.
To be honest, I've just recently become very interested in number theory, and I thought that being able to work with retardedly large integers would benefit me. OK? Does that answer your question?
Name:
Anonymous2006-09-10 23:21
If all you want to do is crunch numbers, use OCaml.
Name:
Replying to an ancient thread2010-09-21 23:35
One word: linked list. Size limit is defined by available memory. Navigating to an arbitrary digit that is not near either end will be hell regardless of what method is used since, at some point, the problem will repeat itself in the index method chosen. With this simple procedure, however, it would theoretically be possible to allow a computer with sufficient memory to incrementally count to a number that is larger thatthe number of atoms in the visible universe with perfect precision every digit of the way, eventually. It's a simple yet absurd concept with no application (yet).
Bringing /prog/ back to its people
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy