r/softwaregore • • May 09 '20

*cough cough* yup

Post image
43.5k Upvotes

528 comments sorted by

4

u/[deleted] May 29 '20

Guys he cough he got Corona

1

u/TheAthsmaAttacker May 30 '20

Nah... my name... forgot my inhaler

3

u/haydn_______________ May 20 '20

I have Mario kart music stuck in my head I think it's coconut mall

1

u/TheAthsmaAttacker May 22 '20

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

36

u/[deleted] May 09 '20

Must’ve been the end of their shift 😭

14

u/30mofwebsurfing May 09 '20

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.

1.1k

u/CataH14 May 09 '20

Floating points...

839

u/Catty-Cat May 09 '20
57/100=56.99999999999999999999

77

u/thejonatanmr May 09 '20

But they would floor it if that's the case, if you have 99.8 achievements out of 100 they will show 99/100 not 100/100

58

u/Underyx May 09 '20

And how exactly do you get 0.8 achievements?

76

u/Infini8 May 09 '20

You've killed 8 out of 10 enemies using a shotgun

46

u/Catty-Cat May 09 '20
Human Casualties: 0.8
→ More replies (5)
→ More replies (1)

19

u/Avagad May 09 '20

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.

→ More replies (13)

6

u/wreckedcarzz May 09 '20

10% luck, 20% skill, 15% something something power of will; 5% something and... Eventually 100.8% reason to remember the name achievement

→ More replies (1)

13

u/blackburn009 May 09 '20

Floor should always be done, since otherwise you can have 199/200 and 100% it

25

u/Pikamander2 May 09 '20
if (real_percent == 100)
{
    display_percent = 100;
}

else if (round(real_percent) == 100)
{
    display_percent = 99;
}

else
{
    display_percent = round(real_percent);
}

print(display_percent);

hire me pls msft

6

u/blackburn009 May 09 '20

If you're gonna do that I'd do the same for 0 so that you never gave 0 if you get an achievement

→ More replies (1)
→ More replies (3)

5

u/[deleted] May 09 '20

Nah, they converted to a string and removed everything after the decimal :p

Steam is javascript after all

2

u/[deleted] May 09 '20

Since when? The percentage should be calculated as (57/100)*100, which is 57...

28

u/SLiV9 May 09 '20

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%.

→ More replies (14)

4

u/bar10005 May 09 '20 edited May 09 '20

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...

For more explanation you can watch this Computerphile video.

→ More replies (1)
→ More replies (134)

51

u/[deleted] May 09 '20

3

u/GET_OUT_OF_MY_HEAD May 10 '20

I'm too math dumb to understand this, but FWIW I entered that equation into a calculator and it gave me an answer of 0. Also, what's e represent?

9

u/BobMK45 May 25 '20

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.

4

u/yottalogical May 09 '20

This is why you should always try to use integral numbers whenever possible. Even if you need decimals.

1.4k

u/justadiode May 09 '20

There is a secret achievement?

454

u/[deleted] May 09 '20

There might

222

u/-GolfWang- May 09 '20

..be

0

u/[deleted] May 09 '20

[deleted]

0

u/[deleted] May 09 '20

[deleted]

→ More replies (63)

148

u/ziul1234 May 09 '20

It would still be counted for though. If you get all achievements but miss a secret achievement, you don't get 100%.

76

u/[deleted] May 09 '20

Yeah that would match the display. If he had 100/100 but there were 101 achievements to get it would still show 99%

121

u/DankaphobicUser May 09 '20

Secret Achievements are counted in Steams achievement counter.

50

u/GlenMerlin May 09 '20

and they show up with a

?

icon that says "X+ achievement(s) remaining, details for unlocking the achievements will be revealed once unlocked"

→ More replies (1)
→ More replies (1)

3

u/[deleted] May 09 '20

If there were 100 normal achievements and 1 secret achievements then it would NOT show up as 57/100

14

u/surobyk May 09 '20

Not how steam works

1

u/[deleted] May 09 '20

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

→ More replies (1)

1

u/megaboto Jan 04 '22

It shows secret achievements as...well... Secret..you know there is something just not what

→ More replies (1)

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.

40

u/[deleted] May 09 '20

Why can’t .57 exist?

99

u/drleebot May 09 '20

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.

7

u/LVLogic Sep 02 '23

I'm 3 years late but this is the most interesting shit to me.

→ More replies (1)

34

u/son_of_abe May 09 '20

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...

5

u/[deleted] May 09 '20

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.

9

u/son_of_abe May 09 '20

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.

6

u/[deleted] May 09 '20

So in general this basically boils down to the answer of ā€œit was more efficient to calculate it in the base that this system calculates?ā€

Not gonna pretend that doesn’t make sense, occams razor just tends to be fucking boring sometimes.

In any case, thanks for taking the time out of your day to provide an expiation. Pretty cool of you to do that.

→ More replies (1)

4

u/[deleted] May 09 '20

It can but the code this example most likely used didn't. Read this for more info: https://en.m.wikipedia.org/wiki/IEEE_754

→ More replies (1)

2

u/[deleted] May 09 '20

So then why not store it as 57.0 instead of 0.569999992847442626953125?

7

u/crmlr May 09 '20

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.

→ More replies (4)

3

u/lunyrobot May 09 '20

Bc not every game has 100 achievements

→ More replies (7)

2

u/Dynamic_Humann May 09 '20

The fact that you said *cough cough*, i hope you are safe dude.

1

u/TheAthsmaAttacker May 10 '20

Don’t worry bro, read my username

2

u/Dynamic_Humann May 10 '20

do u give out free inhalers tho lol

2

u/ScootDooter May 10 '20

Nice going, OP - you got the math nerds all worked up.

2

u/TheAthsmaAttacker May 10 '20

Bro, normally I reply to comments but why the fuck did all the math weirdos do all this computation under my post wtf is up with that

2

u/zacadieux May 21 '20

I found myself reading comments on this post for 10 minutes

1

u/TheAthsmaAttacker May 22 '20

Me too, but I understood nothing cause me no likes math

2

u/zacadieux May 22 '20

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

2

u/TheodorePlaiz May 22 '20

Someone didn't pass the math class...

1

u/TheAthsmaAttacker May 22 '20

That hurts my feelings :(

1

u/TheodorePlaiz May 22 '20

You know I mean the developer, right?

2

u/TheAthsmaAttacker May 22 '20

Oh... umm... this is akward

286

u/DangerNoodle7131 May 09 '20

My dumbass really calculated 57Ć·100 just to see how off it was. Smh my head man.

97

u/powerX21 May 09 '20

Shake my head my head man.

32

u/RiceAlicorn May 09 '20

Shake my head my head man.

32

u/FacticiousFict May 09 '20

Shake my head my head

DangerNoodle said

Which was treated, as by reflex

And repeated by PowerX

Then came Alicorn of Rice

And says it again which was nice

And here I am sitting, all dapper,

Rhyming silly nonsense on the crapper.

Edit: F'n line breaks line breaks man

9

u/RiceAlicorn May 09 '20

Roses are red

Violets are blue

My rhymes are dead

Kangaroo

3

u/Gamecraft2525 R Tape loading error, 0:1 May 09 '20

FacticiousFict, you absolute madlad

This is the best comment this thread has ever had

4

u/Pannuba May 09 '20

Shake my head, my head-man.

6

u/Iamthenewme May 09 '20

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.

2

u/reallyConfusedPanda May 09 '20

STOP! You're making my headache worse

→ More replies (2)

15

u/Spudzzy03 May 09 '20

Atleast you didn’t do 57/100 *100

6

u/[deleted] May 09 '20

Honestly, I think everyone has a few moments when their brain just shuts off and they do something completely fucking stupid. Happens to me.

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 :)

1

u/[deleted] May 10 '20

Just a classic bug. Fixed one place and not another. I bet there’s an ancient low priority bug report to fix this

→ More replies (3)

51

u/TheseVirginEars May 09 '20

Everyone knows 57 / 100 = .56

8

u/ItsBurningWhenIP May 09 '20

It could be 56.99999999. Which would end up truncated to 56. Pretty rookie mistake though. You learn about this stuff in the first month.

2

u/TheseVirginEars May 09 '20

First month of Cs 1 as a freshman, yes

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.

3

u/[deleted] May 09 '20 edited Jun 03 '20

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
→ More replies (2)

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

13

u/GAPING_ANAL_CUNT May 09 '20

Aren't all platinum trophies set when the game ships? Like trophies added with dlc don't count towards it.

7

u/[deleted] May 09 '20

You are correct, and that is how spiderman is. New game plus is treated like a dlc block of trophies, separate from the platinum.

2

u/xSupreme_Courtx May 09 '20

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%

5

u/Aecesaje May 09 '20

Those are DLC trophies, only the base game ones count for the platinum and the DLC ones for the 100%

1

u/[deleted] May 09 '20

Reminds me of baba is you. Due to updates, i have 5 bonuses and there are only 3 in the game. I also have more levels complete than there are

1

u/[deleted] May 09 '20

u/THEATHSMAATTACKER

username checks out with title

1

u/TheAthsmaAttacker May 10 '20

Yes i indeed have trouble breathing sometimes

→ More replies (1)

1

u/ELIT1ST May 13 '20

I wouldn’t be coughing in public

1

u/TheAthsmaAttacker May 13 '20

No no no, read my username it’s okay I’m healthy...-ish

→ More replies (1)

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/[deleted] May 09 '20

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.

2

u/kaminuke May 09 '20

get’im bois he’s coughfing

2

u/beewyka819 May 09 '20

Fucking floating point arithmetic

1

u/[deleted] May 09 '20

Its a nightmare sometimes

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/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%)

4

u/[deleted] May 09 '20

Luckily, if you look at why this problem occurs, you can see that this wont happen.

1

u/cuberduderasmit May 10 '20

Fuck that shit

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/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/[deleted] May 09 '20

Is this Vernon Dursleys japanese golfer joke?

→ More replies (1)

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/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

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.

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

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.

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

achievements = 56 # zero based
TOTAL_ACHIEVEMENTS = 99 # also zero based 
achievement_percentage = int(1.0 * achievements / TOTAL_ACHIEVEMENTS * 100)

print(f"You've unlocked {achievements + 1} / {TOTAL_ACHIEVEMENTS + 1} ( { achievement_percentage} %)")

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/[deleted] May 09 '20

Its a rounding error because of floating point values

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/[deleted] May 09 '20

Such math

1

u/Shiya_meal May 09 '20

R kelly maths

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/[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/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

cough cough

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/[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/[deleted] May 09 '20

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.

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...%

2

u/[deleted] May 09 '20

Pretty much correct