-
Enhancement
-
Resolution: Unresolved
-
Low
-
Code Generation Tools
-
CODEGEN-8176
-
ARM_20.2.2.LTS
-
default
-
No plans to address at this time.
The attached try1.c has these lines ...
printf("2 strtof tests\n"); fval = strtof("15.000", NULL); printf("expect 15.000, get %f\n", (double) fval); fval = strtof("15.000000000000000", NULL); printf("expect 15.000000000000000, get %f\n", (double) fval); printf("\n1 snprintf test\n"); snprintf(buffer, LENGTH, "%.6f", 123456790519087104.0f); printf("expect 123456790519087104, get %s\n", buffer);
Build it ...
% armcl -@options.txt try1.c -z -o try1.out -l lnk.cmd <Linking>
Execute it to see this output ...
2 strtof tests expect 15.000, get 15.000000 expect 15.000000000000000, get 15.000003 1 snprintf test expect 123456790519087104, get 123456790519087076.187
The first strof test is good. The second is bad. The snprintf test is bad.
Please see the related forum thread for more context.