[liba] Clean warnings: overflows due to INFINITY constant

Change-Id: I8a454e673afa7e4190f3d2ed74006622597b275b
This commit is contained in:
Émilie Feral
2017-01-30 13:45:20 +01:00
parent 93d272486f
commit 9c3384e86b
2 changed files with 3 additions and 1 deletions

View File

@@ -6,7 +6,7 @@
LIBA_BEGIN_DECLS
#define NAN (0.0f/0.0f)
#define INFINITY 1e50f
#define INFINITY __builtin_inff()
#define M_E 2.71828182845904523536028747135266250
#define M_PI 3.14159265358979323846264338327950288

View File

@@ -1,5 +1,6 @@
#include <quiz.h>
#include <assert.h>
#include <math.h>
#include <private/ieee754.h>
QUIZ_CASE(liba_ieee754) {
@@ -9,4 +10,5 @@ QUIZ_CASE(liba_ieee754) {
assert(ieee754exp(555.555f) == 136);
assert(ieee754man(0.007f) == 6643778);
assert(ieee754exp(0.007f) == 119);
assert(isinf(INFINITY));
}