Re: Keep compiler silence (clang 10, implicit conversion from 'long' to 'double' )

From: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Yuya Watari <watari(dot)yuya(at)gmail(dot)com>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Keep compiler silence (clang 10, implicit conversion from 'long' to 'double' )
Date: 2019-11-06 04:08:33
Message-ID: 87h83hlkkj.fsf@news-spur.riddles.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>>>>> "Tom" == Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

>> But PostgreSQL effectively requires IEEE 754 since commit
>> 02ddd499322ab6f2f0d58692955dc9633c2150fc, right?

Tom> That commit presumes that floats follow the IEEE bitwise
Tom> representation, I think;

Correct. (It notably does _not_ make any assumptions about how floating
point arithmetic or comparisons work - all the computation is done in
integers.)

Tom> but it's a long way from there to assuming that float comparisons
Tom> do something that is explicitly *not* promised by C99.

I agree.

--
Andrew (irc:RhodiumToad)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2019-11-06 04:13:12 Re: [PATCH][DOC] Fix for PREPARE TRANSACTION doc and postgres_fdw message.
Previous Message Michael Paquier 2019-11-06 04:06:43 Re: Duplicate entries in pg_depend after REINDEX CONCURRENTLY