Re: BUG #12885: The result of casting a double to an integer depends on the database version

From: Pedro Gimeno <pgsql-004(at)personal(dot)formauri(dot)es>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, rschaaf(at)commoninf(dot)com, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #12885: The result of casting a double to an integer depends on the database version
Date: 2015-03-25 11:18:09
Message-ID: 55129971.2070208@personal.formauri.es
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Michael Paquier wrote, On 2015-03-25 04:26:
> copysign is not that portable, at least it is not in the MSVC world.
> So as a patch you would get something like the attached with what you
> wrote.

The only point of using copysign there was to deal with a negative zero
corner case. The attached removes copysign from the test program too,
relying instead on sprintf outputting the sign of minus zero when available.

Attachment Content-Type Size
nearest_or_even_d2.c text/x-csrc 2.0 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2015-03-25 11:46:14 Re: BUG #12885: The result of casting a double to an integer depends on the database version
Previous Message Pedro Gimeno 2015-03-25 10:32:27 Re: BUG #12885: The result of casting a double to an integer depends on the database version