mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
[liba] Clean warnings: overflows due to INFINITY constant
Change-Id: I8a454e673afa7e4190f3d2ed74006622597b275b
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user