Yeah.. This will prevent negative squared distances and is probably OK.

On Fri, Oct 26, 2012 at 4:54 PM, Sean Owen <[email protected]> wrote:

> It might matter a little -- given how that particular computation is
> structured, the original vectors aren't available any more and the
> alternative would be a bunch of recalculation anyway. I think the
> speed / elegance benefit probably trumps precision issues.
>
> At least -- stare decisis, that's how it had always been anyway, this
> was just fixing round-off errors. Which is I suppose exactly what you
> mean.
>
> On Fri, Oct 26, 2012 at 9:48 PM, Ted Dunning <[email protected]>
> wrote:
> > I am not sure if this matters in this context, but using this formula
> will
> > lose precision for very near points.  That can affect ordering in the
> limit.
> >
> > By lose precision, I mean it can degrade to 7-8 sig figs instead of 16 or
> > so.  I doubt this matters, but I wouldn't know if it does.
>

Reply via email to