blob: 8f075653fe4ef8508d67f39e9d635c154de0ed59 (
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%016lx\n", *(unsigned *)&f, *(unsigned long long*)&d);
return 0;
}
|