Andrew Haley wrote: > Try this: > > public class trial > { > static public void main (String[] argv) > { > System.out.println(Math.sin(Math.pow(2.0, 90.0))); > } > } > > zapata:~ $ gcj trial.java --main=trial -ffast-math -O > zapata:~ $ ./a.out > 1.2379400392853803E27 > zapata:~ $ gcj trial.java --main=trial -ffast-math > zapata:~ $ ./a.out > -0.9044312486086016
You're comparing apples and oranges, since C (my code) and Java differ in their definitions and implementations of floating-point. I don't build gcj these days; however, when I have a moment later, I'll build the latest GCC mainline from CVS -- with Java -- and see how it reacts to my Java version of my benchmark. I also have a Fortran 95 version as well, so I guess I might as well try several languages, and see what we get. ..Scott