diff options
author | David Robillard <d@drobilla.net> | 2019-10-06 23:34:36 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-10-27 13:13:59 +0100 |
commit | 03e3b6c156f2b5809bfe0d65c52a1ad1df1da4fd (patch) | |
tree | 4c94c182d026bc91ba9d0ef4001d59df66c56591 /tests/soft_float_test.c | |
parent | 78c87ccdda887a4b49373cd2dfb20936e704a44a (diff) | |
download | serd-03e3b6c156f2b5809bfe0d65c52a1ad1df1da4fd.tar.gz serd-03e3b6c156f2b5809bfe0d65c52a1ad1df1da4fd.tar.bz2 serd-03e3b6c156f2b5809bfe0d65c52a1ad1df1da4fd.zip |
Add precise floating point parsing
Diffstat (limited to 'tests/soft_float_test.c')
-rw-r--r-- | tests/soft_float_test.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/tests/soft_float_test.c b/tests/soft_float_test.c index 85e9e4b6..d81f9308 100644 --- a/tests/soft_float_test.c +++ b/tests/soft_float_test.c @@ -18,7 +18,6 @@ #include "test_data.h" -#include "../src/ieee_float.h" #include "../src/soft_float.h" #include <assert.h> @@ -26,26 +25,6 @@ #include <stdbool.h> #include <stdint.h> -static uint64_t -ulp_distance(const double a, const double b) -{ - assert(a >= 0.0); - assert(b >= 0.0); - - if (a == b) { - return 0; - } else if (isnan(a) || isnan(b)) { - return UINT64_MAX; - } else if (isinf(a) || isinf(b)) { - return UINT64_MAX; - } - - const uint64_t ia = double_to_rep(a); - const uint64_t ib = double_to_rep(b); - - return ia > ib ? ia - ib : ib - ia; -} - static bool check_multiply(const double lhs, const double rhs) { |