Problem with strictfp

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #1

    Problem with strictfp

    When I run the following I get the same results whether I put strictfp or not.

    Code:
    public strictfp class FpDemo3 {
            public static void main(String[] args) {
                double d = 8e+307;
                System.out.println(4.0 * d * 0.5);
                System.out.println(2.0 * d);
            }
        }
    I thought without strictfp, it would not give infinity. Am I wrong?
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Guys, Anyone?

    Is there an argument I have to specify when running so that the difference is observed? I am using jdk 1.5

    Comment

    Working...