[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
>2016 >64-bit system >int is still 32 bits
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 48
Thread images: 2
File: 1434027486946.jpg (33 KB, 366x321) Image search: [Google]
1434027486946.jpg
33 KB, 366x321
>2016
>64-bit system
>int is still 32 bits
>>
>current year
>work computer is still 32-bit
>not being replaced anytime soon
>>
>>55554560
>work

see? Nobody got time for your autism
>>
>>55554535
>not using unsigned 64bit ints

what are you? a retard?
>>
>>55555515
>wasting memory
I bet you don't free your malloc's either
>>
>>55555529
i dont even know what malloc is
>>
>>55555555
>>
>>55554535
Shit mane I just had to save that parrot
>>
>2016
>filename character limit is still defined by unsigned 8-bit int
>>
Name a situation (other than addressing memory) where you need an integer larger than 4,294,967,296. The 64-bit thing is all about memory addressing (i.e., pointers), because you might notice that 32-bit limit is about 4 GB, so 32-bit pointers can only address 4 GB of memory.
>>
That feel when my company is swapping to only 64 bit applications. Feels good brah.
>>
>>55554535
>2016
>Op is now in college studying cs
>>
>>55555660
>>>/v/
>>
>>55555878
If you want to store 33 or more booleans in 1 integer. (And boolean type is so retarded it still gets stored as 32 bit int.)
>>
> 2016
> not running on the superior 36-bit mainframe
Don't fall for the microcomputer jew!
>>
>>55556140
what the fuck kind of language you talking?
>>
that's a cute cock.
>>
>>55554535
>2016
>buy new system
>errors when compiling
>>
int64_t
>>
>>55556140
A boolean takes up 1 byte, not 4.
>>
>>55557239
This really isn't that hard to understand if you're not a keyboard monkey, maybe you should reconsider your education if you found what he said to be incomprehensible
>>
>>55558011
padding for alignment may turn it into a 4, anyhow his point still stands.
>>
>>55558104
make a struct with bitwise booleans then
>>
All languages should have named types like this:

int8
int16
int32
int64

or like this:

byte
word
dword
qword.

Any other naming is pure cancer. Only a Pajeet programmer would find this too complicated.
>>
>>55555878
timestamp
>>
>>55558211
That's what I like on C2. Sadly, almost no one knows about that language
>>
>>55558038
>bragging about the bullshit you have to do in C that other languages heavily discourage

Can't wait until Go and Rust completely eliminate the need for C
>>
>>55555660
>>>/v/
>>>/read the fucking book, faggot/
>>
>>55558211
I wish there were standard typedefs like this that everyone used. Or, at the very least, everyone used the standard C type names for their needs.
>>
>>55560016
>automatic memory management
haha, never
>>
>>55556140
If you're doing that, you don't gain anything over using multiple ints. Hell, use a struct of ints, because you're going to want to write accessor macros anyway.

>>55558913
That's a reasonable answer, though it's so isolated that you also don't lose anything using a bigint sort of struct.
>>
>>55555863
yo what
>>
>>55555878
Project Euler's retarded numbers.
>>
>>55560256
I'm pretty sure most of those problems are set up to overflow 64-bit integers as well, but I haven't done them in a while. So yes that is an answer for "why would you need more than 32 bits?" but it fails to address the spirit of the question, which is, "why would you need 64-bit ints over 32-bit, other than pointers?"
So far timestamps are the main good answer, but if push comes to shove they can easily have a specialized type.
>>
>>55560382
Financial applications, if you want to calculate Bill Gates wealth or a big company's revenue or something.
>>
>>55555878
World of Warcraft did a stat squish after the 4th expansion because boss healths were approaching the maximum size of a 32-bit integer. As a workaround they were designing fights with phases where the boss's health would go back up to 100%. We would all be doing xXx_EpIc_xXx 1 million DPS right now if they used 64-bit integers.
>>
>>55560412
Financial applications, ideally, should use high-precision fixed-point rational numbers. Or if you're Pajeet you'll use doubles, which are 64-bit anyway.
>>
>>55560465
At the risk of being ridiculed, gotta ask.
How do you achieve numbers beyond 4 billion using 32 bits? I know that there's struts designed for this purpose, but what mathematical trickery do they use to work? Are the algorithms they use as efficient as having the CPU process 64 bits natively?

t. Basiq college C program nigga
>>
>>55555660
people like you belong to the garbage collector
>>
>>55560591
You can trade accuracy for range, which is how floating-point numbers work. So you can map multiple numbers to a single bit pattern, which means if you have that bit pattern you can't tell which of those numbers you started with. In other words, you can't represent more than four-ish billion numbers with 32 bits, but you can change which four billion numbers are representable.
>>
>2016
>64-bit system
>Address space is actually only 48 bits long
What kind of fuckery is that, I ask you.
>>
>>55555529
most likely gonna be aligned at 64bit word and unpacked anyway
>>
>>55560591
you know that the result of a multiplication will never be longer than the sum of the bit lengths of the two factors, so you can bound them--you know how much memory at most will be needed ahead of time. the sum of two numbers will similarly never be longer than one digit more than the largest of them. summation and multiplication are done the same way you would do them on paper, by divide & conquer treating each machine word part as its own "digit" conceptually, and taking into account carry.
>>
File: jen-hsun-huang.jpg (35 KB, 630x434) Image search: [Google]
jen-hsun-huang.jpg
35 KB, 630x434
>>55555878
>Name a situation where you need an integer larger than 3758096384
>>
>>55561288
What is VRAM even used for? Storing textures?
>>
>>55560639
kek
>>
>>55561488
Yes, and buffering frames, doing multi sampling and storing calculation data for effects and physics.
>>
>2016
>Not using *int_least**_t (uint_least64_t, etc.)
Thread replies: 48
Thread images: 2

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.