[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math


View post   

File: 73 KB, 581x678, FCB6A6A4-6E76-4BF9-9771-E1F6490977A8.png [View same] [iqdb] [saucenao] [google]
9918485 No.9918485 [Reply] [Original]

Does he have a point?

>> No.9918491

>>9918485
It's a neat trick but not particularly relevant to technical work in the computer era

>> No.9918492

Vitalik is smarter than /sci/ with a 170 IQ, you think they can help you? Just take his word for it. The man used his brain to create a hundred billion dollar companies.

>> No.9918495

>>9918485
Yeah, it's true but what >>9918491 said is also correct in most cases.

>> No.9918500

>>9918485
That's how I've always averaged numbers (at the very least since middle school). You can also generalise it to any finite number of terms to be averaged (by moving around "excess" quantities until all numbers are equal).

>> No.9918514

>>9918492
A hundred companies? Each worth a billion dollars? Incredible

>> No.9918529

>>9918485
Why the fuck would you average two numbers by dividing only one of them by 2

>> No.9918540

>>9918529
take half the difference, add it to the smaller number.

>> No.9918545

>>9918485
>>9918485
>>9918485
How much faster is a + (b-a)/a than (a+b)/2?
At what numbers is (a+b)/2 faster?

>> No.9918547

>>9918485
>An algorithm that calls on variables three times is more efficient than one that calls twice.
Is there something I'm missing?

>> No.9918549

>>9918547
it's more memory efficient, just work through the example he gives

>> No.9918551

>>9918485
We need someone to bully him. Fucking nerds.

>> No.9918553

>>9918485
imagine thinking that this needs to be taught in public schools because there's no way people could just come up with that by themselves

>> No.9918555

>>9918553
kids are retarded

>> No.9918556

>>9918514
90 % of these were built over Ethereum. Without Vitalik they wouldnt exist:

http://coinmarketcap.com/

>> No.9918580

>>9918555
tiny brain: giving kids the intuition that the average of two numbers is the midpoint between them on the number line, so that such formulas become immediately obvious

galaxy brain: instead of having them mindlessly memorize <formula> have them mindlessly memorize <more complicated formula> instead

>> No.9918607

>>9918549
How is it more memory efficient? It's easier to do in your mind since you divide a smaller number by 2, but there are no computational benefits to this

More memory efficient? Please explain how, I don't see how at all. Both methods read both inputs, both methods use 2 registers, both methods write the output

>> No.9918610

>>9918607
I believe that poster meant that in terms of mental math

>> No.9918617

>>9918549
No it isn't. He just picked numbers where it appears to be so. It also doesn't scale remotely efficiently.


Think about it. How do we average n numbers. I now realize popmath is worse than popsci

>> No.9918618

>>9918607
there are direct computational benefits to this approach though
the biggest one is it's faster to divide the smaller number by 2

>> No.9918625

>>9918607
The computer takes the number. It then reduces the number until the difference is obtained. This is (effectively) the same speed as just adding the two numbers together.
So you then have to divide either A or B. A is obtained from the subtraction process. B is obtained by addition. A is most typically smaller than B.
Getting a computer to divide a smaller number is faster (takes fewer cycles) than doing the same with a larger number.

Yeah, I know that is not the exact process as described, but that is the premise behind the claim.

>> No.9918627

>>9918618
For you.

>> No.9918629

>>9918617
he said the average of two numbers
I'm sure it's possible to scale this approach for typical datasets but I don't know what algorithm you'd use
I mean just think about it, adding 1000000 long numbers together and then dividing by 1000000is ridiculously inefficient if you can shave off most of their digits

>> No.9918640
File: 69 KB, 431x767, ICO.jpg [View same] [iqdb] [saucenao] [google]
9918640

>>9918607
Averaging a=99999999995 and b=99999999997 via a+(b-a)/2 gives 99999999996 without doing 10 carry over operations when computing a+b.

In any case, buy Constellation (DAG) while it's cheap.

>> No.9918643

Why not multiply by .5 instead of dividing by 2, it's also more efficient.

>> No.9918652

>>9918580
He is a retard. The only reason he knows about this trick is because it is the prefered way of finding the average of two numbers in cs.
The sum a+b may overflow for big a and b, while his version can't.

>> No.9918653

I guess if you are trying to program a toaster with 10B of memory... sure.... Otherwise it's a extra step that depending on language may add a significant amount of time to the computation

>> No.9918665

>>9918643
>floating point
... that's not how this works anon.

>> No.9918666

>>9918629
No. It isn't. You also can't shave off digits without comparisons. It is inefficient with the overwhelming majority of possible averaging operations, but it's scaling is obviously terrible for nearly all n.

Try it with 3 numbers and you will see how retarded it is.

>> No.9918682

>>9918666
How often do you run into an if-then involving three numbers? less often than one involving two numbers.
You're right that it is a meme for most applications, but it is undeniably the best for the niche applications where it is viable.

>> No.9918690

>>9918545
Someone answer this

>> No.9918693

>>9918485
If a and b are really big but close to each other so b-a is small you can lose accuracy by adding a to (b-a)/2.

>> No.9918698

>>9918485
If you care about the exact average (or maybe not exact but to a high degree of accuracy) then you have to care about the "error term" (b-a)/2. But then using his formula is actually more computation, not less.

On the other hand, if you are assuming that (b-a)/2 is so small we don't even care about it, then you should literally just take a (or b) and say that's close enough to the average.

>> No.9918706

>>9918666
>you can't shave off digits without comparisons
these operations can be very simple. if you have a dataset clustered around 10000000000 and you have 10000010010, 10000000101, 10000001100, you have
(10000010010 + 10000000101 + 10000001100)/3
vs
(10010 + 101 + 1100)/3
I don't know how this is actually implemented but on large datasets these kinds of optimizations are important.

>> No.9918744

>>9918706
Many times it is simply wasteful to go about ordering a dataset, but not in all cases. Like someone said, this shit is valuable to a niche group of clueless toon fuckers.

>> No.9918755

>>9918744
you don't need to order the dataset for this, you could e.g. sample a few points at random and take a guess as to the average

>> No.9918765

>>9918706
>101
That requires an operation to obtain that more than nullifies the efficiency.

>> No.9918777

>>9918693
given the post is by Vitalik, it's probably cryptocurrency related and on those machines, for consensus reasons, you don't actually have any floats or doubles. You have at best a fake comma placed at the 8'th or 16'th position, but crypto coinds fundamentally only come as integers. There's no rational fraction 1/3 of a bitcoin in the protocol.

>> No.9918778

>>9918777
You mean satoshi.

>> No.9918797

>>9918778
0/10 bait

>> No.9918808

>>9918627
fucking made me spit all over my screen

>> No.9918810

>>9918808
Cringe

>> No.9918824

>>9918797
Nothing prohibits you from having a third of a coin. Satoshi are the only things with integer values.

>> No.9918838

>>9918485
yeah you can separate averages by representing a number as multiple additions
[math] x number = a\cdot 10^n + b \cdot 10^{n-1}... + c \cdot 10^{n-n} (c) + d \cdot 10^{-n-n-1} +... + e10^{-n} [/math]

>> No.9918860
File: 51 KB, 498x383, 1422713008192.jpg [View same] [iqdb] [saucenao] [google]
9918860

>>9918618
>>9918625
>>9918640
>Not realizing division by two takes exactly 1 cycle because it's equivalent to a right shift by 1 bit
The absolute state of /sci/

>> No.9918863

>>9918860
do you convert to whatever base your sample number is, mr spaghetti?

>> No.9918869

>>9918860
>programming in something more low level than basic
Calm down grandad. It's not worth the effort. We even have processors in the kilohertz range nowadays. We use them in things like refrigerators (that's what we call a mechanized icebox).

>> No.9918873

>>9918863
>>9918869
Every modern language worth using supports bit shifts, from C to C++ to Javashit

>> No.9918878

>>9918869
Most compilers automatically optimizes division by 2 to bit shift

>> No.9918950

The only use I see is for when a+b would overflow

>> No.9919033

>>9918485
Really asking here
how is a+(b-a)/2 better than just (a+b)/2? I mean, I just can think it takes more time for a computer and they are equivalent

>> No.9919050

>less computation
>one addition and one subtraction
>versus one addition

>> No.9919072

>>9918869
you do know WHY we have compilers, right?

and if you're working in an interpreted language why do you care about efficiency anyway?

>> No.9919089

>>9919033
Based on the discussion in this thread, there are no speed benefits, but there is an accuracy benefit in that there is less of a risk of overflow. If you're trying to average two numbers near the maximum of the datatype you are averaging, Vitalik's method is superior and will result in overflow happening less often, approximately half as often on a random sampling of all values in the datatype's range

>> No.9919098

>>9919089
Could be smart and use this method only when the signs match and use (a+b)/2 when the signs are different. I'm pretty sure that guarantees no overflow.

>> No.9919099

>>9919089
i dont know that i'd call that an accuracy benefit - from what i can tell it's mathematically equivalent so you really don't gain anything on accuracy. i'd call that more a robustness benefit.

>> No.9919109

>>9919098
Internally doesn't it just consider them both positive and do the opposite operation though?

>> No.9919115

>>9919099
Good point yes robustness is better

>> No.9919120

>>9919089
I see, thanks

>> No.9919300

>>9918485
The average of 3 and 7 is 3.5 or 1.5.

Hmm, really makes me think.

>> No.9919319

>>9919300
retard. Next!

>> No.9919322

>>9919319
sorry your memecoin memer got dunked on

>> No.9919364

>>9918485
>that 24 yo boomer who thinks ++i is faster than i++

Seriously, given the computational advances, microoptimization like these are useless and might even be counterproductive because you waste your time doing this, rather than something that's actually useful. As other anons have said, the only problem is there might be a overflow. Fucking lol if you trust this retard with your money.

>> No.9919373

>>9919300
What are you talking about? The average of 3 and 7 is neither 3.5 nor 1. 5

>> No.9919383

>>9919364
++i is faster than i++ because you can't assume you're working on raw pointers, you may be working on more expensive abstract container iterators which have different requirements

>> No.9919395

>>9918545
its slower, you are doing 1 addition, 1 subtraction, and 1 shift (assuming, the numbers are represented in base 2)
if these are integers, then I guess their size could be an issue, so adding two big integers together might require extra cycles, and extra storage (assuming the sum of the two integers overflows), in which case, the difference would not overflow, so it would only take the standard number of cycles
if the numbers are floating point values, then overflow is not an issue
in fact, vitalik is retarded, because subtracting two floating point numbers that are close to each other in value is a terrible thing to do, because it causes catastrophic cancellation (in this particular instance, catastrophic cancellation isn't really an issue, but he is still wasting an additional operation for no reason).

>> No.9919595

>>9918485
>"Most of the time you want"
speak for yourself. that might work for a bitcoin ASIC, but most modern CPUs are going to take the same number of cycles to perform division (actually a multiplication by .5) regardless of what numbers they are operating on (with some exceptions like 1 and 0). it's just shifting the fucking numbers over by one. therefore, it will be slower due to an extra addition. i'm assuming integers here, not sure how this might change with floating point. only plebs don't specify their data types

>> No.9920002

>>9918485
>>9919033
No, this is the better way but it actually is slower. Computers aren't human, they take same amount of time to calculate same formulas, no matter the value it holds(except variable precision numbers/big ints).
It's better because it avoids overflowing. If a+b is larger than max value you can use, results are meaningless.

>>9918618
Dividing any number by 2 is just bit shift(exponent decrementation). It's one of the most basic operation and it always take same amount of time.

>>9918643
It's not. See above.

>> No.9920003
File: 15 KB, 360x152, paul.jpg [View same] [iqdb] [saucenao] [google]
9920003

>>9918485
HEY PAUL

>> No.9920009

>>9918485
>Not using geometric mean
>Using the goddamn arithmetic mean

Is he a fucking retard?

>> No.9920038

>>9918485
In most programming languages for computers there's just a 'average' command and you don't have to worry about this

However for humans the main problem is that we don't have a lot of space in our heads to remember what we are working with right now

So the a+b = c then c/2 is easier than a-b = c while remembering a then c / 2 = d then c + d

This might only be useful for people coding on ancient computers, like 20 years ago

>> No.9920107
File: 180 KB, 460x157, de.png [View same] [iqdb] [saucenao] [google]
9920107

>>9919383
Please don't meme to the ++n degree.

>> No.9920116

Can't we just talk about the psychologic state of your anus right now?

>> No.9920337

>>9918556
I hope you understand the difference between a billion dollar company and a random shitcoin with a billion dollar market cap

>> No.9920389

>>9920002
>It's better because it avoids overflowing
when a and b are the same sign, consider a := -1 and b := INT_MAX

>> No.9920406

>>9920389
You are right.
You would have to do a/2+b/2, but this might decrease precision.

>> No.9920439

imagine being so pathetic that basic algebra makes you sperg out on twitter

it's not even particularly smart or anything

>> No.9920557

>>9918529
write (A+B)/2 and try to get from it A + (B-A)/2. Think you fucking retard.

>> No.9920562

>>9918485
I timed it and (a+b)/2 was faster. Sorry, preminelik.

>> No.9920571

>>9918545
it's objectively slower. the only case in which a + (b-a)/2 is preferred to (a+b)/2 is if you're worried about overflow because a and b are too large.

>> No.9920578

>>9918485
I've always done that subconsciously for large numbers, but never thought about the algebra behind it.
It's quite obvious if you're not a brainlet tbqh.

>> No.9920658

>>9918485
Off topic: How many female posters do you think visit /sci/ or any other real discussion board and why is it that women constantly complain about being left out while they put no effort into thinking

>> No.9920667

>>9920562
We're talking about computers, not your hand math.

>> No.9920673

>>9920658
you are right, that was off-topic.

gb2pol, dumbfuck.

>> No.9920705

>>9920667
no shit, retard

>> No.9921082

>>9918485
Then you have to handle possible negative numbers.

>> No.9921102

>>9918529
>Objecting to the method on technical grounds
/sci/ is for people who can do algebra. His formula is obviously correct.

>> No.9921233

>>9918547
>Is there something I'm missing?

Yes, you and many other imbeciles in this thread.

HE IS NOT TALKING ABOUT PROGRAMMING. He is talking about mathematics and how people compute those things in their heads.

>> No.9921261

>>9921233
This. He is just sharing a nice little math trick because most of the time is easier for a human to do it that way, that's all.

He is not saying that should go with that algorithm in your computer programs or anything like that, it doesn't make any sense. All this talk about algorithms, compilers, optimization, overflows, etc. Just shows how bad /sci/ reading comprehension is. Read some books, nerds.

>> No.9921316

Yes, absolutely. If you want to average 10,000,000,000,000,010 and 10,000,000,000,000,000 and you add those two numbers, you're frankly low IQ and will never make it.

Should this method be taught? No. It's extra information that will only confuse brainlets.

>> No.9921318
File: 139 KB, 971x565, 1512335946502.jpg [View same] [iqdb] [saucenao] [google]
9921318

"computing"
"suboptimal algorithm"
"requires less computation"
>>9921233
>>9921261
>HE IS NOT TALKING ABOUT PROGRAMMING
>Just shows how bad /sci/ reading comprehension is.

>> No.9921327

My numerical analysis prof said that the first rule of numerical analysis was "don't substraction similarly sized numbers", as it can induce catastrophic backpropagating floating point errors in some algorithms. So what gives op? Adding numbers isn't particularly expensive computationally, so isn't (a+b)/2 the better algorithm numerically speaking?

>> No.9921328

>>9921327
*don't substract, fucking autocorrect.

>> No.9921338

>>9921318
>this retard thinks that 'computing' and 'algorithms' are things exclusive to computers.

Don't you have a brain you that can also... oh wait.

I guess, if you never used your brain to computer something or thought about an algorithm, then I would understand why is such an alien concept to you when someone talks about those two things in a context that doesn't involve your PC.

>> No.9921344

>>9920337
The answer is, no, no he doesn't.

>> No.9921353
File: 100 KB, 892x517, sci_in_charge_of_reading_comprehension.png [View same] [iqdb] [saucenao] [google]
9921353

>>9921338
Oh and by the way. In case you >>9921318 decide to reply me again with one of your retarded wojaks, here is Vitalik confirming what I just said in my previous posts. Seriously if you garbage at reading or so ignorant that you think only computers can compute then at least take the trouble of reading the thread of discussion on tweeter.

>> No.9921358
File: 61 KB, 249x182, BR.png [View same] [iqdb] [saucenao] [google]
9921358

>>9921316
>separates binary into octets

>> No.9921359

>>9918485
What if you took thw average of the natural log of both numbers? Would it be the same as the mean?

>> No.9921360
File: 41 KB, 800x450, brainlettttt.jpg [View same] [iqdb] [saucenao] [google]
9921360

>>9921338
gee. I wonder why everyone thought he was talking about computers?

Do you blame everyone else's reading comprehension when YOU post shit with misleading language?

>> No.9921373

>>9918485
Why not (x&y)+((x^y)>>1)

>> No.9921375

>>9921360
>everyone
Only brainlets.

If you didn't at least consider the possibility that he was talking about something else, and you instantly jumped to the wrong conclusion without evaluating other possibilities and even then you were too mentally inflexible to reassess, you're quite frankly low IQ and will never make it.

>> No.9921378

>>9921359
467 262.511 vs 467,262.5
It's pretty darn close

>> No.9921394

Yeah, sure. If I'm averaging two numbers in my head, that is exactly what I do. You can even do kind of the same thing with more than two numbers to average.
Like if there are three numbers, think of how much the numbers on the end move the mean from the middle number.

>> No.9921397
File: 110 KB, 657x539, 1507181736552.png [View same] [iqdb] [saucenao] [google]
9921397

>>9921375
>The language of the tweet inadvertently points to a context other than what was intended
>The statement actually makes sense in that context also (see the posts about how it avoids overflow), so everyone naturally comes to the conclusion that it was that context
>You feel the need to stroke your dick all over the thread.

You might have had an argument if the tweet didn't make sense for computers or if computer vocabulary wasn't used, but you're just displaying how freezing point IQ you are and how you'll never make it with each post.

>> No.9921401

>>9921397
>computer vocabulary
If you think the words he used are exclusive to computers your verbal IQ is too low to be measured

>> No.9921410

>>9920658
>/sci/
>real discussion board

>> No.9921434

>>9921401
>Sure they're used predominantly for computers, but not EXCLUSIVELY. You're low IQ if you thought it was about computers.
Melting point of Helium IQ

>> No.9921439

>>9921327
Well, apparently the guy was talking about mental math and not about algorithms.
Even then, if you had read the thread you would have seen that your questions have been answered already. The datatype isn't specified, so if we are working with integers there is no need to worry about floating point errors obviously. The method in OP's pic is slower but it always prevents overflow if a and b have the same sign. See >>9919089 >>9920389
I didn't know about that numerical analysis principle though because I am an underage fag and haven't taken that course yet, so thanks for that one.

>> No.9921443
File: 108 KB, 353x400, 1516493205794.png [View same] [iqdb] [saucenao] [google]
9921443

>>9921434
>Grug only thinks about words in one way because two is too much for Grug

>> No.9921479 [DELETED] 

>>9921233
>>9921261
>"requires less computation"
>not talking about programming

>> No.9921500
File: 559 KB, 1080x1920, Screenshot_20180806-181743.png [View same] [iqdb] [saucenao] [google]
9921500

>>9921439
Floating point arithmetic is both interesting and infuriating. Basically, substracting similarly sized numbers brings out the low level noise first and forfront, which if you then follow up with a large multiplication can totally destroy your results.

It's called catastrophic cancellation, see pic related. It's the reason numerical differentiation can't be done with the standard derivative formula, because f(x+h)-f(x) destroys your precision.

If you use op's retarded formula, and then multiply it by a large number (to calculate an area for an integral for eg), it will likely induce catastrophic cancellation.

>> No.9921504

>>9918485
Why should we care how many mental arithmetic tricks are taught in classrooms? Unless you are in a garbage math education system, the focus of mathematical education shouldn't even be on arithmetic anyway, rendering Vitalik's point completely irrelevant

>> No.9921507
File: 1.46 MB, 3840x2160, legal tender.jpg [View same] [iqdb] [saucenao] [google]
9921507

>>9921443
I already explained why it's not as simple as that, but do go on

>> No.9921525
File: 164 KB, 645x729, 1521305420060.png [View same] [iqdb] [saucenao] [google]
9921525

>>9921507
"I was pouring a glass of milk when it started to overflow"
>That's wrong, only computers can overflow

>> No.9921530
File: 290 KB, 684x796, 1529262518495.png [View same] [iqdb] [saucenao] [google]
9921530

>>9918485
this am sad kek
/biz/ had better more scientific answers than you guys
they even presented a few equations that computed faster than Vitfaggot

>> No.9921531

>>9921530
go back to /smg/ knees

>> No.9921538

>>9921530
link to thread?

>> No.9921552
File: 35 KB, 400x600, th.jpg [View same] [iqdb] [saucenao] [google]
9921552

>don't average 2 numbers
>average their difference instead

>> No.9921559
File: 94 KB, 680x521, 1530991338510.png [View same] [iqdb] [saucenao] [google]
9921559

>>9918485
(a+b)/2
add
shift

a+(b-a)/2
subtract
shift
add


why would i ever do the latter?

>> No.9921569

>>9918485
>(a + b)/2, an add and a divide
>a + (b - a) / 2, an add, a subtraction and a divide
>Not using fused multiply adds instead
NIGGER

>> No.9921676

>>9918485

Fuck that shit, sum is always faster than substraction, plus you have to do 3 operations instead of just 2. This guy is a brainlet

>> No.9922813

>>9918485
On paper, its correct.
In a computer, the operations have a speed precedence. Fastest to slowest:
+, -, x, /
And +,- are almost the same. In a computer, your goal is to minimize number of operations. Introducing an operation will (almost) always slow things down. I'm not going to say always because i wouldn't be surprised by edge case counter examples

>> No.9923306

>>9918485
That's far closer to how I naturally average numbers in my head.

The average of 3 and 4 is half the distance between them.

They don't teach it in school because it's pretty obvious once they tell you "the average of two numbers is the number between them."
Additionally, it's not impulsively easy to naturally expand on when you have more than two numbers. (Given, it can be done, but it requires thought, while sum of a, b, c divided by 3 does not.)

>> No.9923318

>>9918485
>three calls is faster than two calls
nope
>>9918492
lol'd

>> No.9923346

>>9921434
>not telling how many megapascals of pressure the helium is under
Given sufficient MPa, you could have a 180 K melting point for helium.

>> No.9924060
File: 477 KB, 792x995, asds.png [View same] [iqdb] [saucenao] [google]
9924060

>>9918485
High IQ meme so high it makes your CPU overflow

>> No.9924250

>>9918485
it's a valuable method and useful depending on the numbers you use. I dont really think there is much need to teach 50 ways to do something as basic as averaging 2 numbers.

>> No.9924416

>>9918485
>Not computing the integral and dividing by the length
wew lad

>> No.9924515

>>9919395
>>9920571
He is obviously talking about doing it by hand, not letting a computer do it

>> No.9926022

>>9918485
...wait, do people not know this? This is how I've been doing mental math for decades now

>> No.9926024

>>9926022
Yeah, this is how I average together test grades quickly

>> No.9926029

>>9918485
What he says works, but anyone out of middle-school should just pop (a+b)/2 into a calculator and regurgitate the answer.

There is no reason for some kid in middle-school to learn this as they are learning the idea and purpose of averages and this doesn't help.

Completely useless in the modern era.

>> No.9926034

>>9918485
how about a/2 + b/2

>> No.9926179

>>9921500
>for eg
For the love of God, leave /sci/ and never come back.

>> No.9926289

>>9926179
Fuck off Pearson, I'll give give examples however I want. Be glad you learned something.

>> No.9926323

>>9918491
Knowing the numerical stability of formulas is pretty relevant unless you're using algebra packages or computable reals.

>> No.9926326
File: 1.98 MB, 500x208, tumblr_nip8nssbCq1u3uc1ao7_500.gif [View same] [iqdb] [saucenao] [google]
9926326

>>9918485
There are different uses for different averages Mean, Median, Mode, Range etc.

>> No.9926345

>>9918556
That doesn't mean he built those companies.

>> No.9926351

>>9919373
He means a multiple choice i.e
Is the answer:
3) 5
or
1) 5?

He just wrote it as:
3. 5
(n)or
1. 5?

>> No.9926357

>>9918485
Yeah but only if it's easy to calculate a-b.

Like ok let's average 4526780 and 4526782. You just look at it and you can tell. But it might not always be so obvious what the difference is between the two.

>> No.9926373

>>9921327
>>9921500
Are you unable to think for yourself? Firstly, the guy in the OP was talking about mental math, which should be obvious for anyone with an IQ over 100 just from his comments, especially the second one. Secondly, even if you applied OP's algorithm to computers, there wouldn't be ANY catastrophic cancellation, since the most significant digits of "a + (b - a) / 2" are the most significant digits of "a". Thirdly, "a + (b - a) / 2" is a standard way of computing averages of two integers in computers, because calculating a+b could lead to an overflow if a and b are sufficiently high, giving a wrong negative result for (a+b) / 2 - but again, that's not what Vitalik was talking about, he was talking about mental math

>> No.9926375

>>9926326
Only the (arithmetic) mean is called average, retard. Median, mode and range are not in any sense "averages"

>> No.9926463

How are there so many brainlets in this thread?
There's an example right there. Unless you expect me to believe you can look at those two numbers and immediately know what they add up to when you just add and divide it's more like 6 different additions because of carrying.

>> No.9926466

>>9918693
Holy crap. Somebody here actually knows something.

>> No.9926477

>>9921500
https://en.wikipedia.org/wiki/Unum_(number_format)

Unums and Posits guarantee rigorous bounds as well as associativity