From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <614ead90cdcf809c60ab4ee24ae5b495@plan9.bell-labs.com> From: David Presotto To: 9fans@cse.psu.edu Subject: Re: [9fans] libfmt/libutf and long double In-Reply-To: <3B0EB7C6-3BC1-11D8-906F-000A95C53D8A@suspicious.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="upas-jbnxombklhdmapyvsxjdxjpwzl" Date: Wed, 31 Dec 2003 14:11:05 -0500 Topicbox-Message-UUID: b0d6779a-eacc-11e9-9e20-41e7f4b1d025 This is a multi-part message in MIME format. --upas-jbnxombklhdmapyvsxjdxjpwzl Content-Disposition: inline Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit On plan 9 double and long double are the same. Therefore, the fact that the libfmt library ignores the ll part of the %llE doesn't break anything on plan 9 but does on Unix. --upas-jbnxombklhdmapyvsxjdxjpwzl Content-Type: message/rfc822 Content-Disposition: inline Received: from plan9.cs.bell-labs.com ([135.104.9.2]) by plan9; Wed Dec 31 13:45:38 EST 2003 Received: from mail.cse.psu.edu ([130.203.4.6]) by plan9; Wed Dec 31 13:45:36 EST 2003 Received: by mail.cse.psu.edu (CSE Mail Server, from userid 60001) id 3553319C13; Wed, 31 Dec 2003 13:45:26 -0500 (EST) Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.4.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 0615C19C1E; Wed, 31 Dec 2003 13:45:12 -0500 (EST) X-Original-To: 9fans@cse.psu.edu Delivered-To: 9fans@cse.psu.edu Received: by mail.cse.psu.edu (CSE Mail Server, from userid 60001) id 231F819BAE; Wed, 31 Dec 2003 13:44:12 -0500 (EST) Received: from bache.ece.cmu.edu (BACHE.ECE.CMU.EDU [128.2.129.23]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 92FFF19C00 for <9fans@cse.psu.edu>; Wed, 31 Dec 2003 13:44:01 -0500 (EST) Received: by bache.ece.cmu.edu (Postfix, from userid 953) id 62C9EAA; Wed, 31 Dec 2003 13:44:01 -0500 (EST) Received: from [128.2.68.245] (MUNG.WV.CC.cmu.edu [128.2.68.245]) by bache.ece.cmu.edu (Postfix) with ESMTP id 359A886 for <9fans@cse.psu.edu>; Wed, 31 Dec 2003 13:43:32 -0500 (EST) Mime-Version: 1.0 (Apple Message framework v609) In-Reply-To: References: Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <3B0EB7C6-3BC1-11D8-906F-000A95C53D8A@suspicious.org> Content-Transfer-Encoding: 7bit From: suspect@suspicious.org Subject: Re: [9fans] libfmt/libutf and long double To: 9fans@cse.psu.edu X-Mailer: Apple Mail (2.609) Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Wed, 31 Dec 2003 13:43:31 -0500 X-Spam-Status: No, hits=-1.7 required=5.0 tests=EMAIL_ATTRIBUTION,IN_REP_TO,NO_REAL_NAME,QUOTED_EMAIL_TEXT, REFERENCES,REPLY_WITH_QUOTES,USER_AGENT_APPLEMAIL version=2.55 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) Hello, Actually, my curiosity was about why it worked on my Plan 9 machine but gave the strange behavior when using libfmt on a UNIX system. From http://www.cs.bell-labs.com/magic/man2html/2/fprintf: "... or an optional L specifying that a following e, E, f, g, or G conversion specifier applies to a long double argument." The above made it make sense to me that it worked on my Plan 9 machine. I'm therefore a bit confused by your response. Thanks. cheers, On Dec 31, 2003, at 11:17 AM, Russ Cox wrote: > > yes, plan 9 doesn't implement long double and your unix does. > >> Hello, >> >> I've run into a behavior with libfmt/libutf on UNIX system >> that does not seem intuitive: >> >> long double ldv = 3.3; >> print("long double var = %llE\n", ldv); >> >> gives: >> long double var = -6.257775E+92 >> >> Identical code under Plan 9 gives the expected output of: >> >> long double var = 3.300000E+00 >> >> Is there any particular reason why the behaviors should >> differ in this manner ? --upas-jbnxombklhdmapyvsxjdxjpwzl--