aboutsummaryrefslogtreecommitdiffstats
path: root/test_ieee754.c
diff options
context:
space:
mode:
authorTomasz Kramkowski <tk@the-tk.com>2018-10-27 12:41:58 +0100
committerTomasz Kramkowski <tk@the-tk.com>2018-10-27 12:47:05 +0100
commitd3f47e042aebd5fbf86477abf7058704657e8430 (patch)
tree4996f0c46f7ebf5037ee7fecceb161bbeb4e549e /test_ieee754.c
parentadbc72e159d48e6b1ad091e6ac19fd1cd6d5f798 (diff)
downloadfaqe-d3f47e042aebd5fbf86477abf7058704657e8430.tar.gz
faqe-d3f47e042aebd5fbf86477abf7058704657e8430.tar.xz
faqe-d3f47e042aebd5fbf86477abf7058704657e8430.zip
Cleanup pass
Diffstat (limited to 'test_ieee754.c')
-rw-r--r--test_ieee754.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/test_ieee754.c b/test_ieee754.c
index 85a1c95..65d0aba 100644
--- a/test_ieee754.c
+++ b/test_ieee754.c
@@ -9,6 +9,7 @@
#include "ieee754.h"
+// naiive: return the binary representation of a float (non portable)
static unsigned long naiive(float n)
{
union {
@@ -19,6 +20,7 @@ static unsigned long naiive(float n)
return u.u;
}
+// test: test ieee754f against a certain number
void test(float a)
{
float b = ieee754f(naiive(a));