23 lines
431 B
C
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;
|
|
}
|