Re: Strange behavior with polygon and NaN

From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
To: tgl(at)sss(dot)pgh(dot)pa(dot)us
Cc: gkokolatos(at)pm(dot)me, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Strange behavior with polygon and NaN
Date: 2020-11-13 06:39:23
Message-ID: 20201113.153923.412026669493650380.horikyota.ntt@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At Fri, 13 Nov 2020 15:35:58 +0900 (JST), Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> wrote in
> Thank you for the review, Georgios and Tom.
>
> At Tue, 10 Nov 2020 14:30:08 -0500, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote in
> > I spent some time looking this over, and have a few thoughts:
> >
> > 1. I think it's useful to split the test changes into two patches,
> > as I've done below: first, just add the additional row in point_tbl
> > and let the fallout from that happen, and then in the second patch
> > make the code changes. This way, it's much clearer what the actual
> > behavioral changes are. Some of them don't look right, either.
> > For instance, in the very first hunk in geometry.out, we have
> > this:
> >
> > - (Infinity,1e+300) | {1,0,5} | NaN | NaN
> > + (Infinity,1e+300) | {1,0,5} | Infinity | Infinity
> >
> > which seems right, and also this:
>
> For example, ('Infinity', 1e300) <-> {1,0,5}, that is:
>
> line "x = -5" <-> point(1e300, Inf)
>
> So sqrt((1e300 - 5)^2 + Inf^2) = Inf, which looks right.

??! Correction:

It's sqrt((1e300 - 5)^2 + 0^2) = Inf, which looks right.

reagrds.

--
Kyotaro Horiguchi
NTT Open Source Software Center

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message tsunakawa.takay@fujitsu.com 2020-11-13 06:43:13 RE: In-placre persistance change of a relation
Previous Message Kyotaro Horiguchi 2020-11-13 06:35:58 Re: Strange behavior with polygon and NaN