r/ProgrammerHumor • • 12d ago

Meme sexyPointOverFlow

0 Upvotes

14 comments sorted by

31

u/click-to-reveal 12d ago

Isn't this the case with most languages and not specific to javascript?

6

u/codingTheBugs 11d ago

Yes but putting it on JavaScript gets more upvotes

1

u/asato977424 3d ago

At least this rounding error rounds up.

1

u/redditRezzr 12d ago

I think everyone deals with it, but, this one time, I was doing math, and all I had was JavaScript.

1

u/ruiz_julie_728 8d ago

BigInt keeps integer addition and multiplication exact; decimal fractions still need another representation.

3

u/rosuav 11d ago

It's the definition of IEEE 754. People seem to accept that computers work in binary, but then act surprised when computers work in binary.

6

u/BananaSupremeMaster 12d ago

Well that's the correct answer

-3

u/redditRezzr 12d ago

When being right feels so wrong.

18

u/malexj93 12d ago

JavaScript has its issues, but I don't think it's fair to blame it for floating-point arithmetic.

21

u/the_poope 12d ago

With JavaScript I would have expected "0.10.2"

5

u/Mondoke 12d ago

This is art. Thank you.

3

u/Random_-account 12d ago

Desmos: I am a being of pure energy and no weakness!

2

u/AgVargr 12d ago

Actual skill issue. Go ask Claude why

2

u/failedsatan 12d ago

not a Javascript issue sire