From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Skip Newsgroups: gmane.emacs.bugs Subject: strtold() function doesn't convert properly. Date: Thu, 18 Nov 2004 12:45:07 -0800 (PST) Message-ID: <20041118204507.86871.qmail@web11327.mail.yahoo.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1100810723 14482 80.91.229.6 (18 Nov 2004 20:45:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 18 Nov 2004 20:45:23 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Nov 18 21:45:16 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CUt9X-0002J9-00 for ; Thu, 18 Nov 2004 21:45:15 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CUtIP-0003CO-BM for geb-bug-gnu-emacs@m.gmane.org; Thu, 18 Nov 2004 15:54:25 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CUtIN-0003CD-TO for bug-gnu-emacs@gnu.org; Thu, 18 Nov 2004 15:54:23 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CUtIN-0003Bo-4P for bug-gnu-emacs@gnu.org; Thu, 18 Nov 2004 15:54:23 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CUtIN-0003Bl-2Y for bug-gnu-emacs@gnu.org; Thu, 18 Nov 2004 15:54:23 -0500 Original-Received: from [216.136.130.43] (helo=web11327.mail.yahoo.com) by monty-python.gnu.org with smtp (Exim 4.34) id 1CUt9Q-0007NS-La for bug-gnu-emacs@gnu.org; Thu, 18 Nov 2004 15:45:08 -0500 Original-Received: (qmail 86873 invoked by uid 60001); 18 Nov 2004 20:45:07 -0000 Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; b=IFDbG2FKFys5Dmln5ugj77p0xhQ3T0dsOXkdcTrmbSUZffzJPwxuW/pCwMQl1cvd4OFqDqauiHfoHZHH8NjsGNao12qMREn7hfa8B/0790soqYDNZK1llbGF7S/+K+dHcSF7zRDGPtKOwQYXi9zeKZEspsuoirl9ZIcco5MD/2c= ; Original-Received: from [12.108.30.41] by web11327.mail.yahoo.com via HTTP; Thu, 18 Nov 2004 12:45:07 PST Original-To: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:9737 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:9737 Strtold() doesn't work properly. Here is a test program and its output. Compile with: gcc progname && a.out //------------------------------------------------------------------------- #include #include int main ( int argc, char *argv[] ) { char s[] = "1234567.987654"; long double ld=0; char *endptr=NULL; ld = strtold( s, &endptr ); printf("s = '%s' ld = %Lf\n", s, ld); printf("s = '%p' endptr = %p\n", s, endptr); return 0; } //------------------------------------------------------------------------- // Here is the output. // s = '1234567.987654' ld = -1766572058.000000 // s = '0xbffff930' endptr = 0xbffff93e //------------------------------------------------------------------------- __________________________________ Do you Yahoo!? Meet the all-new My Yahoo! - Try it today! http://my.yahoo.com