this post was submitted on 04 Nov 2023
658 points (98.1% liked)

Programmer Humor

19187 readers
1513 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] 15 points 10 months ago (1 children)

That's because this is the maximum integer that can be stored in a double precision floating point number without loss of precision, lol

[โ€“] [email protected] 7 points 10 months ago

That's one thing that really bugs me about Javascript (weirdly enough I'm okay with eg prototypal inheritance and how this works, or at least worked before the bolted on classes that were added because apparently I'm like one of the dozen or so people who had no problems with those concepts). The fact that all numbers are floats can lead to a lot of fun and exciting bugs that people might not even realize are there until they suddenly get a weird decimal where they expected an integer