Open maska989 opened 1 year ago
*Problem occurs when hex input float is used
Tested between ia32-generic and host-generic
#include <stdio.h> #include <stdlib.h> #include <limits.h> int main(void) { float f = 3.40282347e+38F; printf("printf =>\n%f || %a || %e || %g\n", f, f, f, f); printf("\nstrtod %%a=>\n%f ||", strtod("0x1.fffffe0000000p+127", NULL)); printf(" %a ||", strtod("0x1.fffffe0000000p+127", NULL)); printf(" %e ||", strtod("0x1.fffffe0000000p+127", NULL)); printf(" %g\n", strtod("0x1.fffffe0000000p+127", NULL)); printf("\nstrtod %%e=>\n%f ||", strtod("3.402823e+38", NULL)); printf(" %a ||", strtod("3.402823e+38", NULL)); printf(" %e ||", strtod("3.402823e+38", NULL)); printf(" %g\n", strtod("3.402823e+38", NULL)); printf("\nstrtod %%g=>\n%f ||", strtod("3.40282e+38", NULL)); printf(" %a ||", strtod("3.40282e+38", NULL)); printf(" %e ||", strtod("3.40282e+38", NULL)); printf(" %g\n", strtod("3.40282e+38", NULL)); }
Applies to strtod(), strtof(), strtold()
strtod()
strtof()
strtold()
*Problem occurs when hex input float is used
Tested between ia32-generic and host-generic