31,28 → 31,10 |
void test(void) |
{ |
__u64 u64const = 0x0123456789ABCDEFLL; |
double d; |
printf(" Printf test \n"); |
printf(" Q %Q %q \n",u64const, u64const); |
printf(" L %L %l \n",0x01234567 ,0x01234567); |
printf(" W %W %w \n",0x0123 ,0x0123); |
printf(" B %B %b \n",0x01 ,0x01); |
printf(" F %F %f (123456789.987654321)\n",123456789.987654321,123456789.987654321); |
printf(" F %F %f (-123456789.987654321e-10)\n",-123456789.987654321e-10,-123456789.987654321e-10); |
printf(" E %E %e (123456789.987654321)\n",123456789.987654321,123456789.987654321); |
printf(" E %.10E %.8e (-123456789.987654321e-12 for precision 10 & 8)\n",-123456789.987654321e-12,-123456789.987654321e-12); |
printf(" E %.10E %.8e (-987654321.123456789e-12 for precision 10 & 8)\n",-987654321.123456789e-12,-987654321.123456789e-12); |
printf(" E %.10E %.8e (123456789.987654321e-12 for precision 10 & 8)\n",123456789.987654321e-12,123456789.987654321e-12); |
printf(" E %.10E %.8e (987654321.123456789e-12 for precision 10 & 8)\n",987654321.123456789e-12,987654321.123456789e-12); |
printf(" E %.10E %.8e (-123456789.987654321e12 for precision 10 & 8)\n",-123456789.987654321e12,-123456789.987654321e12); |
printf(" E %.10E %.8e (-987654321.123456789e12 for precision 10 & 8)\n",-987654321.123456789e12,-987654321.123456789e12); |
printf(" E %.10E %.8e (123456789.987654321e12 for precision 10 & 8)\n",123456789.987654321e12,123456789.987654321e12); |
printf(" E %.10E %.8e (987654321.123456789e12 for precision 10 & 8)\n",987654321.123456789e12,987654321.123456789e12); |
u64const =0x7fffffffffffffffLL; |
d =*((double *)((void *)(&u64const))); |
printf(" E %.10E (NaN)\n",d); |
u64const =(0xfff0000000000000LL); |
d =*(double *)(void *)(&u64const); |
printf(" E %.10E (-Inf)\n",d); |
return; |
} |