Re: more C99 cleanup - Mailing list pgsql-hackers
| From | Tom Lane |
|---|---|
| Subject | Re: more C99 cleanup |
| Date | |
| Msg-id | 2204774.1763741447@sss.pgh.pa.us Whole thread Raw |
| In response to | Re: more C99 cleanup (Tom Lane <tgl@sss.pgh.pa.us>) |
| List | pgsql-hackers |
I wrote:
> I have a distinct recollection that this comment exists because we
> found that some platforms had a hypot() that got that edge case wrong.
> I don't object to proceeding on the assumption that they all conform
> to spec by now, but please make sure there's at least one regression
> test that will expose the problem if someplace doesn't. (A quick check
> would be to hot-wire pg_hypot to do the wrong thing and see if any
> existing test falls over. I think there is one, but let's verify.)
Ah, there are several. It's not totally obvious perhaps where the
cause is. I'll attach the diffs just for the archives' sake.
regards, tom lane
diff -U3 /home/postgres/pgsql/src/test/regress/expected/geometry.out
/home/postgres/pgsql/src/test/regress/results/geometry.out
--- /home/postgres/pgsql/src/test/regress/expected/geometry.out 2025-09-16 11:41:22.033540812 -0400
+++ /home/postgres/pgsql/src/test/regress/results/geometry.out 2025-11-21 11:07:33.559382194 -0500
@@ -555,9 +555,9 @@
(1e+300,Infinity) | {0,-1,5} | Infinity | Infinity
(1e+300,Infinity) | {1,0,5} | NaN | NaN
(1e+300,Infinity) | {0,3,0} | Infinity | Infinity
- (1e+300,Infinity) | {1,-1,0} | Infinity | Infinity
- (1e+300,Infinity) | {-0.4,-1,-6} | Infinity | Infinity
- (1e+300,Infinity) | {-0.000184615384615,-1,15.3846153846} | Infinity | Infinity
+ (1e+300,Infinity) | {1,-1,0} | NaN | NaN
+ (1e+300,Infinity) | {-0.4,-1,-6} | NaN | NaN
+ (1e+300,Infinity) | {-0.000184615384615,-1,15.3846153846} | NaN | NaN
(1e+300,Infinity) | {3,NaN,5} | NaN | NaN
(1e+300,Infinity) | {NaN,NaN,NaN} | NaN | NaN
(1e+300,Infinity) | {0,-1,3} | Infinity | Infinity
@@ -653,7 +653,7 @@
(1e+300,Infinity) | [(11,22),(33,44)] | Infinity | Infinity
(1e+300,Infinity) | [(-10,2),(-10,3)] | Infinity | Infinity
(1e+300,Infinity) | [(0,-20),(30,-20)] | Infinity | Infinity
- (1e+300,Infinity) | [(NaN,1),(NaN,90)] | Infinity | Infinity
+ (1e+300,Infinity) | [(NaN,1),(NaN,90)] | NaN | NaN
(Infinity,1e+300) | [(1,2),(3,4)] | Infinity | Infinity
(Infinity,1e+300) | [(0,0),(6,6)] | Infinity | Infinity
(Infinity,1e+300) | [(10,-10),(-3,-4)] | Infinity | Infinity
@@ -1070,9 +1070,9 @@
(1e+300,Infinity) | {0,-1,5} | (1e+300,5)
(1e+300,Infinity) | {1,0,5} |
(1e+300,Infinity) | {0,3,0} | (1e+300,0)
- (1e+300,Infinity) | {1,-1,0} | (Infinity,NaN)
- (1e+300,Infinity) | {-0.4,-1,-6} | (-Infinity,NaN)
- (1e+300,Infinity) | {-0.000184615384615,-1,15.3846153846} | (-Infinity,NaN)
+ (1e+300,Infinity) | {1,-1,0} |
+ (1e+300,Infinity) | {-0.4,-1,-6} |
+ (1e+300,Infinity) | {-0.000184615384615,-1,15.3846153846} |
(1e+300,Infinity) | {3,NaN,5} |
(1e+300,Infinity) | {NaN,NaN,NaN} |
(1e+300,Infinity) | {0,-1,3} | (1e+300,3)
@@ -1168,7 +1168,7 @@
(1e+300,Infinity) | [(11,22),(33,44)] | (33,44)
(1e+300,Infinity) | [(-10,2),(-10,3)] | (-10,3)
(1e+300,Infinity) | [(0,-20),(30,-20)] | (30,-20)
- (1e+300,Infinity) | [(NaN,1),(NaN,90)] | (NaN,90)
+ (1e+300,Infinity) | [(NaN,1),(NaN,90)] |
(Infinity,1e+300) | [(1,2),(3,4)] | (3,4)
(Infinity,1e+300) | [(0,0),(6,6)] | (6,6)
(Infinity,1e+300) | [(10,-10),(-3,-4)] | (-3,-4)
pgsql-hackers by date: