Tester for exploring the mapping of a float to a real
[ipdf/code.git] / src / tests / repr.cpp
diff --git a/src/tests/repr.cpp b/src/tests/repr.cpp
deleted file mode 100644 (file)
index 26ed668..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-#include "main.h"
-
-#include <bitset>
-
-using namespace std;
-
-
-
-int main(int argc, char ** argv)
-{
-       char buffer[BUFSIZ];
-       double input;
-       printf("Enter a double: ");
-       fgets(buffer, BUFSIZ, stdin);
-       sscanf(buffer, "%lf", &input);
-
-
-       float f = (float)(input);
-
-       unsigned long long i;
-       memcpy(&i, &f, 4);
-       bitset<32> b32(i);
-       memcpy(&i, &input, 8);
-       bitset<64> b64(i);
-
-       printf("\nAs float: %s\n", b32.to_string().c_str());
-       printf("\nAs double: %s\n", b64.to_string().c_str());
-       #ifdef REAL_BITSET
-               Real r(input);
-               printf("\nAs real: %s\n", r.repr.to_string().c_str());
-       #endif //REAL_BITSET
-       
-}

UCC git Repository :: git.ucc.asn.au