blob: a2bc15508813ac8904749b6c0dffbd417e32fede (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#include <stdio.h>
#include <stdlib.h>
int
main(int ac, char *av[])
{
double d;
float f;
if (ac < 2) {
usage:
fputs("usage: fptox NUMBER\n", stderr);
return 1;
}
f = d = strtod(av[1], 0);
printf("0x%08x 0x%016llx\n", *(unsigned *)&f, *(unsigned long long*)&d);
return 0;
}
|