aboutsummaryrefslogtreecommitdiff
path: root/src/port/rint.c
Commit message (Collapse)AuthorAge
* Upgrade src/port/rint.c to be POSIX-compliant.Tom Lane2015-03-25
| | | | | | | | | | | | | | | | | | The POSIX spec says that rint() rounds halfway cases to nearest even. Our substitute implementation failed to do that, rather rounding halfway cases away from zero; and it also got some other cases (such as minus zero) wrong. This led to observable cross-platform differences, as reported in bug #12885 from Rich Schaaf; in particular, casting from float to int didn't honor round-to-nearest-even on builds using rint.c. Implement something that attempts to cover all cases per spec, and add some simple regression tests so that we'll notice if any platforms still get this wrong. Although this is a bug fix, no back-patch, as a behavioral change in the back branches was agreed not to be a good idea. Pedro Gimeno Fortea, reviewed by Michael Paquier and myself
* Remove cvs keywords from all files.Magnus Hagander2010-09-20
|
* Avoid changing the sign of zero. Per buildfarm failures.Tom Lane2010-02-06
|
* Rewrite rint() to enable removal of copyright mention; patch fromBruce Momjian2010-02-05
| | | | | | Nathan Wagner Function is simpler too.
* $Header: -> $PostgreSQL Changes ...PostgreSQL Daemon2003-11-29
|
* Add rint() to /port, remove from qnx/.Bruce Momjian2003-05-09