summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSzabolcs Nagy <nsz@port70.net>2013-09-27 13:55:29 +0000
committerSzabolcs Nagy <nsz@port70.net>2013-09-27 13:55:29 +0000
commite1f1df9c743af60c0e6271fcd78b59dbfd72d8ad (patch)
tree160b7bc0cdae2d48773f67e55fa0d0c521e729df /include
parent78178542e73e143bf44b3ba32cf0b58ced53f2d5 (diff)
downloadmusl-e1f1df9c743af60c0e6271fcd78b59dbfd72d8ad.tar.gz
musl-e1f1df9c743af60c0e6271fcd78b59dbfd72d8ad.tar.bz2
musl-e1f1df9c743af60c0e6271fcd78b59dbfd72d8ad.tar.xz
musl-e1f1df9c743af60c0e6271fcd78b59dbfd72d8ad.zip
math: fix comparision macros (isless etc) when FLT_EVAL_METHOD!=0
This is a change in ISO C11 annex F (F.10.11p1), comparision macros can't round their arguments to their semantic type when the evaluation format has wider range and precision. (ie. they must be consistent with the builtin relational operators)
Diffstat (limited to 'include')
-rw-r--r--include/math.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/include/math.h b/include/math.h
index c029156a..dc176012 100644
--- a/include/math.h
+++ b/include/math.h
@@ -91,20 +91,20 @@ int __signbitl(long double);
static __inline int __is##rel(type __x, type __y) \
{ return !isunordered(__x,__y) && __x op __y; }
-__ISREL_DEF(lessf, <, float)
-__ISREL_DEF(less, <, double)
+__ISREL_DEF(lessf, <, float_t)
+__ISREL_DEF(less, <, double_t)
__ISREL_DEF(lessl, <, long double)
-__ISREL_DEF(lessequalf, <=, float)
-__ISREL_DEF(lessequal, <=, double)
+__ISREL_DEF(lessequalf, <=, float_t)
+__ISREL_DEF(lessequal, <=, double_t)
__ISREL_DEF(lessequall, <=, long double)
-__ISREL_DEF(lessgreaterf, !=, float)
-__ISREL_DEF(lessgreater, !=, double)
+__ISREL_DEF(lessgreaterf, !=, float_t)
+__ISREL_DEF(lessgreater, !=, double_t)
__ISREL_DEF(lessgreaterl, !=, long double)
-__ISREL_DEF(greaterf, >, float)
-__ISREL_DEF(greater, >, double)
+__ISREL_DEF(greaterf, >, float_t)
+__ISREL_DEF(greater, >, double_t)
__ISREL_DEF(greaterl, >, long double)
-__ISREL_DEF(greaterequalf, >=, float)
-__ISREL_DEF(greaterequal, >=, double)
+__ISREL_DEF(greaterequalf, >=, float_t)
+__ISREL_DEF(greaterequal, >=, double_t)
__ISREL_DEF(greaterequall, >=, long double)
#define __tg_pred_2(x, y, p) ( \