Ya know, I wouldn't be surprised in the slightest if you were right. Sometimes after working 7 days a week due to corona, at 11:56pm... I'm really not trying to do my job properly.. and I just lock up and fucking leave. Can you blame me? Yea I'm lucky to have a job, and it's fucked that I do this, and that I'm working 7 days a week because they let go of other staff and cut my hours down to 5 hour shifts.. but fuck'em, I get paid more on unemployment and I'm just trying to do just enough not to go insane right now.
It's a rounding error. You get to choose one though: it says 100% when it isn't actually 100% or it says the wrong percentage sometimes and that's more obvious in cases like this where there's exactly 100 achievements. Choose one.
Using standard IEEE floating point math, the closest floating point value to 0.57 is 0.569999992847442626953125. When converting to a percentage you get 56.999... rounded down, which is 56%.
When you are using base 10 or simplifying the equation, but computers store numbers in base 2 or in a floating point number (basically scientific notation, but in base 2), so if the computer does it as two separate equations 0.57 is stored as 0.569999992847442626953125 in 32 bit (also called single precision), so you end up with 56.99...
e in math represents Euler’s (pronounced “Oiler”) number, which is a mathematical constant equal to around 2.7. It’s used frequently to describe exponential growth and change.
Secrect achievements show in the counter so that isnt the reason. Its because of floating point values (which is one of the ways computers store numbers), and you can read about how on the other comments on this thread
Software engineer here, 0.57 (57/100) cannot actually be store in computers as 0.57, but as 0.569999992847442626953125 (if stored as a 32 bit float). This value was then most probably casted to a whole number. In most programming languages, like C, casting to a whole number is not the same as rounding and will only use the whole part of the number and ditch the fractional part.
There are many ways of doing this differently and different programming languages behave differently, and this is just an example.
The short answer is, numbers are stored in a base 2 system (which has a ton of efficiency advantages), and 0.57 can't be perfectly represented in base 2 with a finite number of digits. Think of how 1/3 in base 10 is represented as 0.3333333... You'd need an infinite number of digits to represent it perfectly. It's the same for 0.57. Since computers don't have an infinite number of digits, they represent it as the closest thing they can instead.
Most of the time this is perfectly fine (as long as programmers know never to test floating-point numbers for equality except to zero). This is one of the rare occasions where it noticeably fails.
The other answers are good, but here's an ELI5 version:
Imagine you're a teller at a bank that only deals in coins worth $0.37 each (I just chose that number randomly). You've been learning multiples of 37 your whole life, so it's actually the easiest number for you to work with.
You might think the lack of precision would be an issue for customers (e.g. "I asked to withdraw $10, why'd you give me $9.99?"), but your only customers are millionaires, and they only withdraw in the millions of dollars. A few cents off is a completely reasonable trade-off for how fast you, the teller, are able to deal out money in $0.37 coins.
It's not quite mathematically accurate, but I think it's a decent enough analogy? Anyone else feel free to correct or amend...
So I guess my best question here would be this. Clearly it’s a system that can understand the concept of 57, right? So why is there an issue when we move the decimal? I get that a big problem if it is that even thinking about decimals means we’re counting on base ten, but a decimal point in an imagined thing in the first place. Couldn’t you feasibly bypass this issue by just starting your counting in the ten thousandth place or something? Instead of 1 being 1, it’s .0001. Now you can calculate smaller numbers, right? Though I guess that’d really fuck with how your system handles multiplication. I think I answered my own question lol, changing what 1 is is gonna probably have disastrous effects on math.
Well you're asking the right questions! Your example is a good one, and is basically how precise math can be done with whole numbers (whole numbers and decimal numbers are represented differently) and then "converted" to a decimal value...
But speed matters. There are lots of ways to represent numbers at a system level, but only so many are efficient.
57.0 can be indeed stored as 57.0 if stored as IEEE-754 floating point.
Not so clear on my first comment, but when calculating the percentage (57/100*100), the first arithmetic operation could result in 0.5699... instead of 0.57. Then, when multiplied by 100 it would result in 56.99... . When casted to a whole number it would be 56 instead of 57.
Again, this entirely depends on the programming language, compiler and the way the code is written.
I used to teach myself programming for software along with Java for modding minecraft and I also taught myself a php, html, and css for making website before website building services were big. This was all for fun to me and I should mention I'm only 25 so this wasnt like way back in the days
Smh my head this atm teller machine still won't accept my pin identification number even though they said they'll fix it asap soon as possible. This bank is such a pita in the ass I'm just gonna say rip in peace to my account and go awol without leave.
Look in the Steam overlay. In the overlay the floating points get rounded up and in the client they get rounded down. Dunno why, but had this a lot of times already :)
I mean the devs could have easily avoided this. Just make it round to the nearest number rather than floor it, then if it equates to 100% if you havent gotten all the achievements, subtract 1.
Pseudocode:
Percentage = round ( (unlockedachivements / totalacheivments)*100 )
If percentage == 100 and unlockedachievements != totalachievements:
Percentage = 99
This reminds me of Spider-Man on the PS4. I got all the achievements before they added New Game +, so I have the platinum trophy even though I'm missing a trophy
I don't think New Game + was in the plans to begin with, it was a last minute thing and it came with a trophy. I distinctly remember having the platinum and 100% completion, and when they added New Game + it went down to like 97%
Its because of the way computers store numbers. In base 2, the way computers count, 0.57 (57%) is a reoccurring decimal (kind of like how in base 10, 1/3 is 0.33333... with no end. 0.57 is the same in base 2). This mean that the computer ends up thinking that 57/100 is 0.569999.... and after turning it into a percentage, it rounds that down to 56.
The only explanation I can think of when I see things like this is that the developers gave some trophies more weight that others in the % bar. Maybe a bunch of easy trophies are 0.5% each one and the hardest trophie is like 4 % or so. Seems like the only logic for this outside math errors.
Steam doesnt do that, and thats not the reason at all. Its because of floating point values (which is one of the ways computers store numbers), and you can read about why it happens in the other comments on this post.
Its because of floating point values (which is one of the ways computers store numbers), and you can read about why it happens in the other comments on this post.
Its actually because of floating point values (which is one of the ways computers store numbers) not being able to store 0.57 (57%) properly, and thinking its 0.56 (56%). you can read more about why it happens in the other comments on this post.
4
u/[deleted] May 29 '20
Guys he cough he got Corona
3
u/haydn_______________ May 20 '20
I have Mario kart music stuck in my head I think it's coconut mall
464
u/Gamecraft2525 R Tape loading error, 0:1 May 09 '20
You just wait until you end up with 101 achievements, the bar begins changing colours and it displays as -11/12 percent
1.1k
u/CataH14 May 09 '20
Floating points...
1.4k
u/justadiode May 09 '20
There is a secret achievement?
142
u/crmlr May 09 '20
Software engineer here, 0.57 (57/100) cannot actually be store in computers as 0.57, but as 0.569999992847442626953125 (if stored as a 32 bit float). This value was then most probably casted to a whole number. In most programming languages, like C, casting to a whole number is not the same as rounding and will only use the whole part of the number and ditch the fractional part.
There are many ways of doing this differently and different programming languages behave differently, and this is just an example.
2
u/Dynamic_Humann May 09 '20
The fact that you said *cough cough*, i hope you are safe dude.
2
u/BlueSheepPlays May 09 '20
Hmm
2
u/ScootDooter May 10 '20
Nice going, OP - you got the math nerds all worked up.
2
u/zacadieux May 21 '20
I found myself reading comments on this post for 10 minutes
2
u/TheodorePlaiz May 22 '20
Someone didn't pass the math class...
286
u/DangerNoodle7131 May 09 '20
My dumbass really calculated 57÷100 just to see how off it was. Smh my head man.
49
u/TECHNOFAB May 09 '20
Look in the Steam overlay. In the overlay the floating points get rounded up and in the client they get rounded down. Dunno why, but had this a lot of times already :)
51
u/TheseVirginEars May 09 '20
Everyone knows 57 / 100 = .56
22
u/Lebanese_Trees May 09 '20
Also /r/mildlyinfuriating
23
u/srvb45 R Tape loading error, 0:1 May 09 '20
That's why some download stuck at 99%
7
u/sirmonko May 09 '20
my opinion as a developer: close enough and it's nothing game breaking. won't fix. // TODO for later: check 0 and 100
6
u/wtmh May 09 '20
I can always spot non-developers by those who think off-by-one or floating point errors are software gore.
6
u/mr_tofucow Jun 10 '20
What game is this
13
u/xSupreme_Courtx May 09 '20
This reminds me of Spider-Man on the PS4. I got all the achievements before they added New Game +, so I have the platinum trophy even though I'm missing a trophy
1
u/[deleted] May 09 '20
u/THEATHSMAATTACKER
username checks out with title
1
u/ELIT1ST May 13 '20
I wouldn’t be coughing in public
1
u/HeresFBI Jun 02 '20
Maft
3
u/Clamb3 May 09 '20
r/offbyone
3
u/lliH-knaH May 09 '20
Lol
3
u/TheSpudGunGamer May 09 '20
You’ve unlocked an achievement that doesn’t exist.
2
u/[deleted] May 09 '20
maff :)
2
u/CriminalMacabre May 09 '20
That's what happen when you do integer division
2
u/Qwampa May 09 '20
I mean, it's approximately correct.
2
u/JustGingerStuff May 09 '20
Yes. Maybe it's 56.99% but ur device is a dumb fuck.
2
u/private_static_int May 09 '20
Them floats
2
u/kaminuke May 09 '20
get’im bois he’s coughfing
2
u/beewyka819 May 09 '20
Fucking floating point arithmetic
2
u/cbelt3 May 09 '20
Round() vs Int(). Oops.
2
u/[deleted] May 09 '20
Off by 1 error
2
u/shmoobalizer May 09 '20
Decimal type ftw?
2
u/Xevode May 09 '20
I'm not alone
2
u/Error_Hacker May 09 '20
Steam is kind of old tho
2
u/saichampa May 09 '20
The percentage might be related to points from the awards. If there's one award that's with more points 57 awards could easily equal 56% of the points
2
u/Blindfire27 May 09 '20
cough cough you sick brufh
2
u/nebulaxox May 09 '20
mafs
2
u/The_whistling_maniac May 09 '20
okay steam, you had your fun. Now tell me how many achievements I actually have.
2
u/JTuckerosef May 10 '20
It probably just that you have a achievement that you haven’t fully done
2
u/CWL900 May 10 '20
Interesting!
2
u/Zack_9091 May 11 '20
I fear all the people who took the time to convert the numbers into it actually making sense
3
u/LuminousOcean May 09 '20
57 / 100 = 0.56999999999
0.56999999999 * 100 = 56.999999999
floor(56.999999999) = 56
Truncation to an integer by casting usually also results in the same, and is a common approach to flooring a number.
Better approach would have been to use the round() function, but it appears they did not do that.
Limited-precision floating point mathematics. Isn't it GREAT?
3
u/fancyfruit May 09 '20
You've unlocked 100/100 (99%)
2
u/[deleted] May 09 '20
Lmao what do you mean, he did cough.
1
u/TacobellSauce1 May 09 '20
"I didn't know about that personally cough)
1
u/admin-eat-my-shit14 May 09 '20
using reverse murica math..
1
u/MrNickyDubbs May 09 '20
Floor!
1
u/indianPerceptron May 09 '20
Ceil vs floor
1
u/devilsadvocate3001 May 09 '20
Its a feature: predictive algorithm
2
u/Jetron07 May 09 '20
For fuck's sake cover your mouth!
1
u/Mrmathmonkey May 09 '20
When are we ever gonna use math in real life.
1
u/bertrand200 May 09 '20
Is there a achevement when u get all of the 100 ?
1
u/Delano7 May 09 '20
Secret one, maybe
1
u/[deleted] May 09 '20
Interview question: Provide a plausible explanation for how this happened
1
u/Mehakx May 09 '20
Meth
1
u/Neluv93 May 09 '20
The only explanation I can think of when I see things like this is that the developers gave some trophies more weight that others in the % bar. Maybe a bunch of easy trophies are 0.5% each one and the hardest trophie is like 4 % or so. Seems like the only logic for this outside math errors.
1
u/[deleted] May 09 '20
56,8%
1
u/freenarative May 09 '20
Yeah. The last one is "unlock all achievements" hence there are only 56 achi... Hold on.
(does maths)
Yeah... That be messed up.
But 56/99 is weird. Add on that "finished". Trophy to round to 100 and...
I...
1
u/[deleted] May 09 '20
r/mildlyinfuriating
1
u/[deleted] May 09 '20
When you don't know about that personally cough)
1
u/ghsatpute May 09 '20 edited May 09 '20
1
u/[deleted] May 09 '20
yup. I was born there funnily lol
1
u/KingstonGamin2 May 09 '20
now wait a minute there buddy
1
u/saik_98 May 09 '20
I feel uncomfortable
1
u/NotSoGreatGonzo May 09 '20
That is an unique error. A one-off.
1
u/lorematt May 09 '20
This hurrs me in the soul
1
u/[deleted] May 09 '20
I guess it is just a rounding error.
But I was thinking maybe each achievement got a different weight to the score.
Easy achievements = less
Rare or more difficult achievements = more.
Sort of how Playstation has Bronze, Silver, Gold, and Plat ratings.
1
u/-The-Someone- May 09 '20
Somethings wrong I can feel it
1
u/[deleted] May 09 '20
Floating-point arithmetic is real fun.
1
u/demonicexecutioner May 09 '20
What game is that
1
u/[deleted] May 09 '20
Steam how can you do this to us lol.
1
u/marshmello100 May 09 '20
Ok then
1
u/[deleted] May 09 '20
Such math
1
u/Shiya_meal May 09 '20
R kelly maths
1
u/1991VolkswagenGolf May 09 '20
The Mathman
1
u/[deleted] May 09 '20
Quik Mafs
1
u/404_Invalid_Username May 09 '20
*heavy breathing
1
u/_mynameisjeffjeff May 09 '20
99% achievement oriented
1
u/masterfunk18 May 09 '20
*my life fyuztfy g_
1
u/[deleted] May 09 '20
One rounds and one cuts off the decimal
1
u/DJcat456 May 09 '20
. . . wow
1
u/pikabart May 10 '20
You might not wanna cough around this time
1
u/BS_BlackScout Jun 21 '20
floor()
1
u/ChannelEMex_YT Jul 23 '20
Poor choice of words
1
u/bigtonybruiser Aug 13 '20
What game tho
1
u/ifthisistakeniwill Jan 11 '22
Send me a picture of when it says 101℅
1
u/Grimothle R Tape loading error, 0:1 Apr 18 '22
Wow just 43 more achievements to get to 99!
1
u/YeetermanAxe Jul 19 '22
Hidden achievement
1
u/TheRealNathanVo R Tape loading error, 0:1 Dec 11 '22
Why did you cough? Are you okay?
1
u/TECKERZ101 R Tape loading error, 0:1 Dec 14 '22
Hmm checks username checks title that checks out.
1
u/[deleted] Dec 18 '22
OP’s username checks out
1
u/OkStatement9823 R Tape loading error, 0:1 Mar 29 '23
I think 56% out of 100 isn’t 57
1
u/E_but_cool Apr 16 '23
This hurts
1
u/the_skrolller Apr 22 '23
Staem
1
u/[deleted] May 24 '23
this isnt software gore this is software papercut
1
u/_xLoRiaNnRBMGO Nov 05 '23
there's one secret achievement u can't unlock
1
u/Teddy_Dies May 09 '20
57/101 rounds down to 56% so there’s definitely a secret reward
1
u/I_Like_Trains_XD May 09 '20
I was like there is nothing wrong then i realise i was a idiot
1
u/Level-M May 09 '20
It's actually 56.999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999...%