gsl/repro.c
2013-01-21 13:55:53 +01:00

23 lines
431 B
C

#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;
}