Re: Strange behavior with polygon and NaN

Kyotaro Horiguchi <horikyota.ntt@gmail.com>

From: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
To: tgl@sss.pgh.pa.us
Cc: gkokolatos@pm.me, pgsql-hackers@lists.postgresql.org
Date: 2020-11-24T02:39:33Z
Lists: pgsql-hackers
At Sat, 21 Nov 2020 17:33:53 -0500, Tom Lane <tgl@sss.pgh.pa.us> wrote in 
> I went ahead and pushed 0001 and 0003 (the latter in two parts), since
> they didn't seem particularly controversial to me.  Just to keep the
> cfbot from whining, here's a rebased version of 0002.

I didn't noticed that inf == inf sould be true (in IEEE754).

# (inf - inf == 0) => false but (inf == inf + 0) == false is somewhat
# uneasy but, yes, it's the standare we are basing on.

So, I agree that the changes of line_construct() and line_(inv)sl()
looks good to me.

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



Commits

  1. In geo_ops.c, represent infinite slope as Infinity, not DBL_MAX.

  2. Fix FPeq() and friends to get the right answers for infinities.

  3. Extend the geometric regression test cases a little.

  4. Remove underflow error in float division with infinite divisor.