Different results of floating point multiplication for lambda code block

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 8u40
    • Affects Version/s: 9
    • Component/s: tools
    • Environment:

      JDK 9 b15 x86

    • b01
    • x86
    • windows_7

        The result of execution of floating point expression invoked in the lambda code block is different:

        2.1552676198089365E-308
        2.155267619808936E-308

        strictfp
        public class type04404 {

            public static void main(String args[]) {
                clone(() -> {
                    double x = Double.longBitsToDouble(0x1e7ee00000000000L);
                    double y = Double.longBitsToDouble(0x2180101010101010L);

                    double z = x * y;
                    System.out.println(z);
                });
                {
                    double x = Double.longBitsToDouble(0x1e7ee00000000000L);
                    double y = Double.longBitsToDouble(0x2180101010101010L);

                    double z = x * y;
                    System.out.println(z);
                }
            }
         
            private static void clone(Face arg) {
                arg.run();
            }

            private interface Face {
                void run();
            }
        }

              Assignee:
              Robert Field (Inactive)
              Reporter:
              Oleg Barbashov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: