On 01.03.2013 16:22, Alexander Korotkov wrote:
On Wed, Mar 13, 2013 at 11:10 PM, Heikki Linnakangas<
hlinnakan...@vmware.com>  wrote:

On 01.03.2013 16:22, Alexander Korotkov wrote:

frac = area / (length2 - length1);

you can get NaN result. I've especially adjusted the code to get more of
less correct result in this case.

Hmm, good point. I think I managed to fix those cases in the attached
version. Is there any other corner case that I missed?

Did you try test case by Jeff Davis on this thread?
http://www.postgresql.org/message-id/1355167304.3896.37.camel@jdavis
I try it with attached version of patch and get NaN estimate.

Thanks, fixed that too.

Committed with a little bit more clean up and fixes. Thank you for bearing with this long process :-). And many thanks Jeff for the review, and sorry that I forgot to credit you for that in the commit message.

- Heikki


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to