formatting floating point problem

Andrew Haley aph@redhat.com
Mon May 10 08:10:00 GMT 2010


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.



More information about the Java mailing list