Commit Graph

2 Commits

Author SHA1 Message Date
Michael Niedermayer 27b4d154ca Merge remote-tracking branch 'qatar/master'
* qatar/master:
  Work around broken floating point limits on some systems.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-10 12:05:02 +01:00
Anton Khirnov e854b8f9f4 Work around broken floating point limits on some systems.
The values of {FLT,DBL}_{MAX,MIN} macros on some systems (older musl
libc, some BSD flavours) are not exactly representable, i.e.
(double)DBL_MAX == DBL_MAX is false
This violates (at least some interpretations of) the C99 standard and
breaks code (e.g. in vf_fps) like
double f = DBL_MAX;
[...]
if (f == DBL_MAX) { // f has not been changed yet
    [....]
}
2014-03-10 10:27:17 +01:00