Functions, floats and doubles

2009-11-13 Thread Grant Ingersoll
Implementing my first function (distance stuff) and notices that functions seem to have a float bent to them. Not even sure what would be involved, but there are cases for distance that I could see wanting double precision. Thoughts? -Grant

Re: Functions, floats and doubles

2009-11-13 Thread Yonik Seeley
On Fri, Nov 13, 2009 at 12:52 PM, Grant Ingersoll gsing...@apache.org wrote: Implementing my first function (distance stuff) and notices that functions seem to have a float bent to them.  Not even sure what would be involved, but there are cases for distance that I could see wanting double

Re: Functions, floats and doubles

2009-11-13 Thread Walter Underwood
Float is almost never good enough. The loss of precision is horrific. wunder On Nov 13, 2009, at 9:58 AM, Yonik Seeley wrote: On Fri, Nov 13, 2009 at 12:52 PM, Grant Ingersoll gsing...@apache.org wrote: Implementing my first function (distance stuff) and notices that functions seem to have

Re: Functions, floats and doubles

2009-11-13 Thread Grant Ingersoll
On Nov 13, 2009, at 12:58 PM, Yonik Seeley wrote: On Fri, Nov 13, 2009 at 12:52 PM, Grant Ingersoll gsing...@apache.org wrote: Implementing my first function (distance stuff) and notices that functions seem to have a float bent to them. Not even sure what would be involved, but there are

Re: Functions, floats and doubles

2009-11-13 Thread Yonik Seeley
On Fri, Nov 13, 2009 at 1:01 PM, Walter Underwood wun...@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

Re: Functions, floats and doubles

2009-11-13 Thread Yonik Seeley
On Fri, Nov 13, 2009 at 1:31 PM, Grant Ingersoll gsing...@apache.org wrote: Yeah, in the end, Lucene Scorer returns a float...  However, if we allow for pseudo fields and other capabilities, it would be nice to have doubles. We have doubles already... It's just that our general purpose

Re: Functions, floats and doubles

2009-11-13 Thread Walter Underwood
Float is often OK until you try and use it for further calculation. Maybe it is good enough for printing out distance, but maybe not for further use. wunder On Nov 13, 2009, at 10:32 AM, Yonik Seeley wrote: On Fri, Nov 13, 2009 at 1:01 PM, Walter Underwood wun...@wunderwood.org wrote:

Re: Functions, floats and doubles

2009-11-13 Thread Grant Ingersoll
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. On Nov 13, 2009, at 1:32 PM,

Re: Functions, floats and doubles

2009-11-13 Thread Grant Ingersoll
On Nov 13, 2009, at 1:35 PM, Yonik Seeley wrote: On Fri, Nov 13, 2009 at 1:31 PM, Grant Ingersoll gsing...@apache.org wrote: Yeah, in the end, Lucene Scorer returns a float... However, if we allow for pseudo fields and other capabilities, it would be nice to have doubles. We have doubles

Re: Functions, floats and doubles

2009-11-13 Thread Mattmann, Chris A (388J)
On 11/13/09 11:38 AM, Grant Ingersoll gsing...@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

Re: Functions, floats and doubles

2009-11-13 Thread Grant Ingersoll
On Nov 13, 2009, at 1:48 PM, Mattmann, Chris A (388J) wrote: Still, I think we should put it on our roadmap. SOLR-1562.