[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug in strtold()

From: Adrian S. W. TAM
Subject: Bug in strtold()
Date: Thu, 14 Oct 2004 18:25:47 +0800
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041007 Debian/1.7.3-5

Hi glibc gurus,

I tried with this program:

#include <stdio.h>
#include <stdlib.h>

int main() {
char *str = "0.123456789";
printf("%s becomes %.20f\n", str, strtod(str,NULL));
printf("%s becomes %.20Lf\n", str, strtold(str,NULL));
return 0;

I tried in Debian Sarge and RedHat 9, both using glibc 2.3.2 and the
second line do not show what is expected. In Debian, it shows a huge
number but in RedHat, it shows zero. Both are running from an x86 arch.

Is that a bug?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]