this post was submitted on 22 Dec 2023
164 points (95.6% liked)

STOP DOING SCIENCE

433 readers
1 users here now

A community for memes like this.

Not at all affiliated with the subreddit, I just shamelessly stole the name.

Rules:

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] morrowind@lemmy.ml 11 points 2 years ago (3 children)

Ok but actually though, can someone explain why we can't use integers to emulate floats. Why is there a dedicated fpu

[–] anton@lemmy.blahaj.zone 6 points 2 years ago (1 children)

Let's say our integers are 64 bit, say we put half before the point. Now our largest value is just below 4 294 967 296, a 32 bit float goes to 3.4*10^38. The representation also enables some operations to be faster (multiplication, division iirc).

[–] TheChurn@kbin.social 6 points 2 years ago

Floats have a wider range, at the cost of not having full coverage over that range. Even the integers in that range cannot be exactly represented

load more comments (1 replies)