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

Bug#286659: libc6-dev: strtof does not work, strtod works



Package: libc6-dev
Version: 2.3.2.ds1-19
Severity: normal



-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (800, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.4.24
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages libc6-dev depends on:
ii  libc6                2.3.2.ds1-19        GNU C Library: Shared libraries an
ii  linux-kernel-headers 2.5.999-test7-bk-17 Linux Kernel Headers for developme

-- no debconf information

Try to run

#include <stdio.h>

#include <stdlib.h>


/**********************************************************************/

int main(){
 float S0;
 double S1;
 char *s="12.3";
 char *endp;

  S0=strtof(s,&endp);
  if( s == endp ) {
  printf("NO conversion\n");
  }
  printf("S0=%f\n",(double) S0);

  S1=strtod(s,&endp);
  if( s == endp ) {
    printf("NO conversion\n");
  }
  printf("S1=%f\n",S1);

  return 0;
  }


  the output is
  S0=4508877.000000
  S1=12.300000



Reply to: