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

Programmer Humor

19154 readers
2012 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
 
you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 3 points 1 year ago* (last edited 1 year ago) (1 children)

It doesn't store more values bit for bit, but it can store larger values.

[โ€“] [email protected] 1 points 1 year ago* (last edited 1 year ago)

I don't think that's possible. Representing more exact ints means representing larger ints and vice versa. I'm ignoring signed vs. unsigned here as in theory both the double and int/long can be signed or unsigned.

Edit: ok, I take this back. I guess you can represent larger values as long as you are ok that they will be estimates. Ie, double of N (for some very large N) will equal double of N + 1.