[meta-freescale] [imx6ulevk] Return "nan" when calling fuction "strtod" of "stdlib.h"
夏星
xiaxing at shyla-tech.com
Tue Jan 19 01:08:27 PST 2016
Deer Enginneer:
I try to get a double number from a const char*, use function "strtod" of "stdlib.h"
Program run well in ubuntu, but return "nan" in imx6ulevk.
My system version is : 2015.04-imx_v2015.04_3.14.38_6ul_ga+g5d63276
It seem like something wrong in stdlib, Could you pls give me some advise?
Looking forwared your kindly reply.
The test demo :
------------------------------------------------------------------------------
/* strtod example */
#include <stdio.h>
#include <stdlib.h>
int main ()
{
float f;
char *str = "12345.67";
f = strtod(str, NULL);
printf("string = %s float = %f\n", str, f);
return 0;
}
-------------------------------------------------------------------------------------------
------------------
BestRegards
夏星(xiaxing)
深圳市雪锐科技有限公司
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/meta-freescale/attachments/20160119/fc29f78a/attachment.html>
More information about the meta-freescale
mailing list