From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29740 invoked by alias); 10 May 2010 08:10:40 -0000 Received: (qmail 29727 invoked by uid 22791); 10 May 2010 08:10:38 -0000 X-SWARE-Spam-Status: No, hits=-3.9 required=5.0 tests=AWL,BAYES_50,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,TW_GC,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 10 May 2010 08:10:33 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o4A8AUFC015352 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 10 May 2010 04:10:30 -0400 Received: from zebedee.pink (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4A8AS7m008015; Mon, 10 May 2010 04:10:28 -0400 Message-ID: <4BE7BF73.9070606@redhat.com> Date: Mon, 10 May 2010 08:10:00 -0000 From: Andrew Haley User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091209 Fedora/3.0-4.fc12 Thunderbird/3.0 MIME-Version: 1.0 To: Erwin Kalvelagen CC: java@gcc.gnu.org Subject: Re: formatting floating point problem References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact java-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-owner@gcc.gnu.org X-SW-Source: 2010-05/txt/msg00005.txt.bz2 On 05/10/2010 12:19 AM, Erwin Kalvelagen wrote: > I am wondering what I am doing wrong here. > > erwin@erwin-laptop:~/jtest$ cat tst.java > public class tst { > > public static void main(String[] args) { > double d = 0.8; > System.out.format("[%g]%n",d); > } > } > erwin@erwin-laptop:~/jtest$ gcj --main=tst tst.java > erwin@erwin-laptop:~/jtest$ ./a.out > [] Sorry, it looks like code to do that was never contributed to GNU Classpath. Patches welcome. Andrew.