#define _CRT_SECURE_NO_WARNINGS
#include <float.h>
#include <math.h>
#include <stdio.h>
#define max(a,b) (((a)>(b))?(a):(b))
void dispf(float f)
{
char str[32];
char* pc;
unsigned char* pf;
int i, b;
pf = (unsigned char*)&f;
pc = str;
for (i = 0; i < 4; i++) {
for (b = 0; b < 8; b++) {
*pc++ = '0'+((pf[3-i]>>(7-b))&1);
}
}
printf("%.1s %.8s %.23s\n", str
, str
+ 1, str
+ 9); }
int main()
{
float a, b;
a = (float)1970.199707;
dispf(a);
b = (float)1970.2;
dispf(b);
return 0;
}
I2RlZmluZSBfQ1JUX1NFQ1VSRV9OT19XQVJOSU5HUwojaW5jbHVkZSA8ZmxvYXQuaD4KI2luY2x1ZGUgPG1hdGguaD4KI2luY2x1ZGUgPHN0ZGlvLmg+CgojZGVmaW5lIG1heChhLGIpICgoKGEpPihiKSk/KGEpOihiKSkKCnZvaWQgZGlzcGYoZmxvYXQgZikKewoJY2hhcgkJc3RyWzMyXTsKCWNoYXIqCQlwYzsKCXVuc2lnbmVkIGNoYXIqCXBmOwoJaW50CQlpLCBiOwoKCXBmID0gKHVuc2lnbmVkIGNoYXIqKSZmOwoJcGMgPSBzdHI7Cglmb3IgKGkgPSAwOyBpIDwgNDsgaSsrKSB7CgkJZm9yIChiID0gMDsgYiA8IDg7IGIrKykgewoJCQkqcGMrKyA9ICcwJysoKHBmWzMtaV0+Pig3LWIpKSYxKTsKCQl9Cgl9CglwcmludGYoIiUuMXMgJS44cyAlLjIzc1xuIiwgc3RyLCBzdHIgKyAxLCBzdHIgKyA5KTsKCXByaW50ZigiJS44RVxuIiwgZik7CglwcmludGYoIiVmXG4iLCBmKTsKfQoKaW50IG1haW4oKQp7CglmbG9hdAlhLCBiOwoKCXByaW50ZigiYSA9IDE5NzAuMTk5NzA3XG4iKTsKCWEgPSAoZmxvYXQpMTk3MC4xOTk3MDc7CglkaXNwZihhKTsKCXByaW50ZigiYiA9IDE5NzAuMlxuIik7CgliID0gKGZsb2F0KTE5NzAuMjsKCWRpc3BmKGIpOwoJcmV0dXJuIDA7Cn0K