don't you linearly combine pointers!
@amiloradovsky@functional.cafe nooo, can't add/scale pointers, not just cause of type system nerdery or lack of meaning, but cause they may overflow. You have no control of them so the usual excuse of "i keep em smol, so they never overflow MA LONG LONG DII..iigit", doesn't work. You can however control the size of memory allocation and have the excuse for differences, so convert the pointers to differences, carry out the equivalent of the weighted sum, then convert back, as long as you can guarantee you'll end up with a pointer in the allocated range, which usually implies a weighted mean, though can do some shenanigans with sub-ranges of a larger valid range. In C/C++ it's illegal to even form (not just dereference) a pointer out of range (sans sentinel end pointer, one past the last element), not that anyone cares.