« first day (3737 days earlier)      last day (1436 days later) » 

08:57
Anyone knows how to transfer sms from an android on to an iphone?
An android with an almost no existing screen.
It's Android there's not even a guaranteed SMS message app, so depends on which app is configured as default
I am talking about galaxy S8
I backed everything onto smart switch
But it does not allow me to restore it onto an iphone
 
1 hour later…
nwp
nwp
10:22
@Mgetz From registry
 
2 hours later…
nwp
nwp
12:58
"Oh hey, they made a visual indicator for empty lines."
"Actually it's a bit buggy, line 106 is not empty. But it mostly works!"
nwp
nwp
13:11
Do people sum arrays of floats by additively combining adjacent pairs repeatedly to reduce rounding errors? Or is that silly?
sure, people that have concerns about numeric stability do that.
@nwp that would fit with the haddps instructions on x86 platforms
nwp
nwp
13:25
Actually I don't actually have that array, I have a stream of numbers that get generated. I can imagine a class storing numbers in magnitude buckets, adding numbers of the same magnitude and moving numbers to the next bucket if they exceed their bucket limit. But that seems rather involved.
13:51
there is also the kahan summation that can reduce rounding errors
nwp
nwp
Oh nice, and that work with a stream. Cool!
nwp
nwp
14:42
Great persona, found the right stack too.
though it only effectively doubles the accuracy, so there's is a limit to it
nwp
nwp
Hmm, that's not what Wikipedia said.
> In particular, simply summing n numbers in sequence has a worst-case error that grows proportional to n, and a root mean square error that grows as √n for random inputs (the roundoff errors form a random walk).[2] With compensated summation, the worst-case error bound is effectively independent of n, so a large number of values can be summed with an error that only depends on the floating-point precision.[2]
there are only 2 variables that are kept between iterations, so by simple pigeon holing the accuracy cannot exceed the double the accuracy of a single number
nwp
nwp
It's not simply switching from 64 bit to 128 bit accumulator, it's more clever than that.
At least I think it is.
sure but scenarios exist where bits fall off anyway
nwp
nwp
14:48
Sure. That'll probably happen on the first addition already. That cannot be helped.
if your numbers are within an few orders of magnitude of each other (and no bits ever fall off the error accumulator) then yeah this will be precise
nwp
nwp
Yeah, they are all pretty close to each other. The issue is that the accumulator eventually drifts so far away from the values that error accumulation becomes really bad.
and you have to ensure your compiler doesn't do associative float addition optimization (IOW disable -fastmath)
> A careful analysis of the errors in compensated summation is needed to appreciate its accuracy characteristics. While it is more accurate than naive summation, it can still give large relative errors for ill-conditioned sums.
 
1 hour later…
16:14
Hey, I just learned that C++17 fixed the exception safety issue caused by unspecified evaluation order of function parameters.
This makes me really happy.
Even though I know the issue could be prevented by always using make_unique.
But it's such a very subtle bug, I'm glad it's fixed.
16:32
@StackedCrooked not just function parameters, but statement evaluation order
hence the old min(x, y) (x) < (y) ? (x) : (y) macro
 
3 hours later…
19:13
@ratchetfreak Yeah--Kahan summation handles like 99% of cases, with only minimal (like 2:1) loss of speed. But yes, there are still a few truly horrendous cases that benefit from other (slower) methods. For a truly terrible case, another possibility is to start by separating the numbers into positive and negative. Put all of the numbers of the same sign into a priority queue sorted by smallest magnitude. Grab two numbers from the PQ, sum them, push the result. Repeat until only one number remains.
Do the same with the numbers of the other sign.When you're done, add the two sums together.
I'm not sure though--it may be better to leave the positives and negatives together, so you're working with both when they're as close as possible to the same magnitude.
 
3 hours later…
22:41
TIL about base64
Would be more fun if there was something like base128 because I suspect that the number of characters a terminal can't print without issues is like 10
@Mikhail There was once something that used something like base 80, if memory serves. As I recall, at least at the time they did some testing and concluded there were only a few more characters they could potentially use, and base 84 (or whatever) didn't make enough difference to be worth the trouble.

« first day (3737 days earlier)      last day (1436 days later) »