Skip to main content
10 events
when toggle format what by license comment
Feb 24, 2021 at 4:55 comment added fedja You are most cordially welcome! If you want to use my code on an "industrial scale", I would add a couple of small safeguards to it related to finite machine precision (they won't increase the execution time by more than 1-2% and I'll be happy to discuss them with you). Right now you can safely go to half machine precision in the accuracy (so for the double type in C, which is about 15 decimal digits, you should stop at $10^{-7}$, which is $N=3200$ executed for $10^6$ pairs in 14 minutes or so; after that the rounding errors from division by small numbers may prevail).
Feb 24, 2021 at 4:02 comment added Tom Solberg @fedja well that was absolutely fascinating! Thank you so much for sharing.
Feb 24, 2021 at 4:02 vote accept Tom Solberg
Feb 23, 2021 at 1:00 comment added fedja OK, Tom. I think I've done my best now, so I posted the current version of the code, the description of the algorithm, and the guaranteed precision bound. If you find it useful, feel free to play with it. If not, it was a nice programming exercise, so just accept my thanks for it :-)
Feb 21, 2021 at 19:38 answer added fedja timeline score: 4
Feb 21, 2021 at 17:30 history became hot network question
Feb 21, 2021 at 16:59 answer added Iosif Pinelis timeline score: 2
Feb 21, 2021 at 12:12 comment added fedja The obvious approach would be to project to more than 2 directions and average. Adding two bisectors already reduces the $\sqrt 2=1.41$ Manhattan distance factor span to $1.082$ and 12 directions bring the span to under $1\%$. This means that we have to figure out how to find the average distance from $a\in \mathbb R$ to the sum of $4$ uniformly distributed on intervals $[-a_i,a_i]$ random variables on the line reasonably quickly. It is an analytically tractable problem, but the corresponding splines are no fun to write down, so one has to think a bit more here.
Feb 21, 2021 at 11:22 answer added user44143 timeline score: 2
Feb 21, 2021 at 9:29 history asked Tom Solberg CC BY-SA 4.0