Subject: Amendment to post: atof() bug in b17.1 & b18?
From: [email-masked] ("E. Dennis")

13 Jun 1997 15:54:17 -0700
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Reply-To: [email-masked]
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 4.0 [en] (WinNT; I)
Original-To: gnu-win32 mailing list <[email-masked]>
X-Priority: 3 (Normal)
Original-Sender: [email-masked]

Hi.  Yes, more info.  Sorry.

Example code follows:

main()
{
 float tst1, tst2, tst3, tst4, tst5;
 char ctst1[] = "0.5",
      ctst2[] = "0.0",
      ctst3[] = "60.00",
      ctst4[] = "60.50",
      ctst5[] = "1.011";

 tst1 = atof(ctst1);
 tst2 = atof(ctst2);
 tst3 = atof(ctst3);
 tst4 = atof(ctst4);
 tst5 = atof(ctst5);

 printf("%s = %f\n", ctst1, tst1);
 printf("%s = %f\n", ctst2, tst2);
 printf("%s = %f\n", ctst3, tst3);
 printf("%s = %f\n", ctst4, tst4);
 printf("%s = %f\n", ctst5, tst5);

return 1;
}

Output from my beta-18-compiled binary:

0.5 = 1.000000
0.0 = -49.000000
60.00 = 60.000000
60.50 = 1.000000
1.011 = 3.000000

Help?

Ewan Dennis,
Integrated Media Services,
Glasgow.
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".