From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | David Rowley <dgrowleyml(at)gmail(dot)com> |
Cc: | Daniel Gustafsson <daniel(at)yesql(dot)se>, jian he <jian(dot)universality(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: src/include/utils/float.h comment one link stable |
Date: | 2025-10-06 15:24:39 |
Message-ID: | 1952095.1759764279@sss.pgh.pa.us |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
David Rowley <dgrowleyml(at)gmail(dot)com> writes:
> Going by the draft C11 standard in [3], on page 230 it looks like
> INFINITY is always defined now, so maybe we can get rid of the other
> code and just always "return (float4) INFINITY;"? I did try that with
> VS2022 just to make sure and I don't get a warning.
+1, let's give that a try. However, INFINITY has been required since
C99, so please don't change that comment.
I wonder if we couldn't also remove the NAN hacks in the same file.
NAN's been required since C99 as well, and it's equally hard to
believe that we still need to support compilers that don't conform.
(Strictly speaking, NAN is required only if the underlying float
implementation has it. But we desupported non-IEEE float arithmetic
years ago.)
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2025-10-06 15:45:15 | Re: Patch for migration of the pg_commit_ts directory |
Previous Message | Andres Freund | 2025-10-06 15:14:13 | Re: Should we update the random_page_cost default value? |