[gsl/temp_odecrash] temporary diagnostic
Frantisek Kluknavsky
fkluknav at fedoraproject.org
Mon Jan 21 12:56:51 UTC 2013
commit 1a266ff40b08625d68ca6ab146f465a2becaab6a
Author: root <root at unused-4-206.brq.redhat.com>
Date: Mon Jan 21 13:55:53 2013 +0100
temporary diagnostic
repro.c | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
---
diff --git a/repro.c b/repro.c
new file mode 100644
index 0000000..577dd83
--- /dev/null
+++ b/repro.c
@@ -0,0 +1,22 @@
+#include <math.h>
+#include <stdio.h>
+
+int main()
+{
+ unsigned long bl = 4610251488984446864;
+ //ulong el = 0;
+ double p;
+ double bd = *((double *)(&bl));
+ double ed = 0.2; //*((double *)(&el));
+
+ if (sizeof(unsigned long) != sizeof(double)) {
+ printf("ulong not the right type!\n");
+ return -1;
+ }
+
+ p=pow(bd, ed);
+
+ printf("bd %g\nel %lu\np\n%g\n%lu\n", bd, *((unsigned long *)(&ed)), p, *((unsigned long *)(&p)));
+
+ return 0;
+}
More information about the scm-commits
mailing list