it gets better:
THE STATE OF COMPUTER """SCIENTISTS"""
It's just shitposting you autists.
Between ints, floats, longs and doubles, there are 64 ways to write c=(a+b)/2 and only 3 ways to get a correct result. If you're a dummie and dont know how to properly compose the question, you have a 61/64 chance of failing to get the desired result.
So again, only a math brainlet without any functional knowledge of coding as the practical application of math, would make this Veeky Forums thread.
>"At least I didn't waste my time with CS like that retard"
damage control isn't going to work now, pal
...
...
Memes aside, how do you do this without overflows / floating-point inaccuracies?
>overflows
low + (difference / 2) guarantees no overflow
>floating-point inaccuracies
you don't because decimal numbers can't always be represented in non-repeating binary so you just repeat it as much as possible
nice