539
Java (lemmy.world)
you are viewing a single comment's thread
view the rest of the comments
[-] Akagigahara@lemmy.world 1 points 1 year ago

I would need to look into the exact difference of double vs integer to know, but a partially educated guess is that they are referring to Int32 vs double and not Int64, aka long. I did a small search and saw that double uses 32 bits for the whole numbers and the others for the decimal.

[-] karlthemailman@sh.itjust.works 1 points 1 year ago

Yeah, that was my guess too. But that just means they could return a long (or whatever the 64 bit int equivalent in java is) instead of an int.

[-] Akagigahara@lemmy.world 1 points 1 year ago

Okay, so I dug in a bit deeper. Doubles are standardized as a 64 bit bundle that is divided into 1 signed bit, 11 exponetioal bits and 52 bits for decimal. It's quite interesting. As to how it works indepth, I probably will try to analyze a bit conversion if I can try something

this post was submitted on 05 Aug 2023
539 points (92.4% liked)

Programmer Humor

19488 readers
191 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS