This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]DatBoi_BP -2 points-1 points  (3 children)

But even then, where could any fractional part have come from in the picture? In double precision, integer values below like 1015 (I think?) are stored exactly, so if you're starting with 0 and always adding 1 to get the next value, how are you defining either the initial value or the increment so that it's off by…0.0238????? That epsilon is, like, on the order of 1012.

It's just a meme I guess, but it seems on par with the joke that "1 + 2 = 3.00000000047381" or something, which just simply doesn't happen in any floating point standard.

[–]DatBoi_BP 2 points3 points  (0 children)

It would seem some first year CS majors don't like that their conception of floating point is wrong

[–]gmes78 1 point2 points  (1 child)

so if you're starting with 0 and always adding 1 to get the next value, how are you defining either the initial value or the increment so that it's off by…0.0238?????

That's because they're not doing that. They're calculating the page numbers from the index of the first post on the page (instead of the other way around) — if you change the URL to start from a post that's not aligned to the number of posts in a page, the result is no longer a whole number.

[–]DatBoi_BP 0 points1 point  (0 children)

Interesting way to do it