lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mattmann, Chris A (388J)" <chris.a.mattm...@jpl.nasa.gov>
Subject Re: Functions, floats and doubles
Date Fri, 13 Nov 2009 18:48:57 GMT
On 11/13/09 11:38 AM, "Grant Ingersoll" <gsingers@apache.org> wrote:

> If I implement Vincenty's formula for distance between two points on an
> ellipsoid that can be accurate down to the 0.5mm.  Not doing that yet and not
> planning on implementing, so this is not a huge issue right now.
> 
> Still, I think we should put it on our roadmap.

+1

Cheers,
Chris

> 
> 
> On Nov 13, 2009, at 1:32 PM, Yonik Seeley wrote:
> 
>> On Fri, Nov 13, 2009 at 1:01 PM, Walter Underwood <wunder@wunderwood.org>
>> wrote:
>>> Float is almost never good enough. The loss of precision is horrific.
>> 
>> Are you saying it's not good enough for this case (the final answer of
>> a relative distance calculation)?
>> 7 digits of precision is enough to represent a distance across the US
>> down to the meter... and points closer together would have higher
>> precision of course.
>> 
>> For storage of the points themselves, 32 bit floats may also often be
>> enough (~2.4 meter resolution at the equator).  Allowing doubles as an
>> option would be nice too - but I expect that doubling the fieldcache
>> may not be worth it for many.
>> Actually, a 32 bit fixed point representation would have a lot more
>> accuracy for this (256 times the resolution at the cost of on-the-fly
>> conversion to a double for calculations).
>> 
>> -Yonik
>> http://www.lucidimagination.com
> 
> 
> 

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Chris Mattmann, Ph.D.
Senior Computer Scientist
NASA Jet Propulsion Laboratory Pasadena, CA 91109 USA
Office: 171-266B, Mailstop: 171-246
Email: Chris.Mattmann@jpl.nasa.gov
WWW:   http://sunset.usc.edu/~mattmann/
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adjunct Assistant Professor, Computer Science Department
University of Southern California, Los Angeles, CA 90089 USA
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++




Mime
View raw message