Re: mingw32 floating point diff - Mailing list pgsql-hackers

From Tom Lane
Subject Re: mingw32 floating point diff
Date
Msg-id 2578.1566766178@sss.pgh.pa.us
Whole thread Raw
In response to Re: mingw32 floating point diff  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: mingw32 floating point diff
List pgsql-hackers
I wrote:
> I'm very hesitant to apply a volatile-qualification approach to
> eliminate those issues, for fear of pessimizing performance-critical
> code on more modern platforms.  I wonder whether there is a reasonable
> way to tell at compile time if we have a platform with 80-bit math.

Hmmm ... I find that dromedary's compiler predefines __FLT_EVAL_METHOD__
as 2 not 0 when -mfpmath=387 is given.  This seems to be something
that was standardized in C99 (without the double underscores), so
maybe we could do something like

#if __FLT_EVAL_METHOD__ > 0 || FLT_EVAL_METHOD > 0

to conditionalize whether we try to force the evaluation width in
check_float8_val and check_float4_val.

            regards, tom lane



pgsql-hackers by date:

Previous
From: David Fetter
Date:
Subject: Re: Statement timeout in pg_rewind
Next
From: Tom Lane
Date:
Subject: Re: Building infrastructure for B-Tree deduplication that recognizes when opclass equality is also equivalence