Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4310299

HS2.0(win32): floating-point multiplication is not associative in Java

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_nt

      Description

      HS 2.0-rc2A (win32) seems to apply associative rule like:
          (x[n]*y)*z --> x[n]*(y*z)
      to optimize cycles like:
          for (int n=0; n<x.length; n++) {
              . . . x[n]*y*z . . .
          }

      Note however, that in general case (x*y)*z is NOT equal to x*(y*z) in Java;
      so that such optimization is illegal.

      There are two tests in JCK 1.2.2 intended to reveal such illegal optimization:
          lang/FP/fpl036/fpl03605m3/fpl03605m3.html
          lang/FP/fpl036/fpl03605m3/fpl03605m4.html
      (fpl03605m3 is for 'float', and fpl03605m4 is for 'double' arguments).

      These tests fail against HS 2.0-rc2A (win32) when executed several times
      in the same JVM.

      To reproduce this bug, please try the scripts 'doit3.bat' and 'doit4.bat'
      in the directory: /net/sqesvr/vsn/GammaBase/Bugs/<this_bug_ID>


      Name: elC94547 Date: 03/16/2000



      I have just observed the failure of these JCK 1.2.2 tests
      against HS 2.0-rc2D (win32) installed over JDK 1.3.0-rc2W.

      It looks like the failure is only reproduced when the tests
      are stressed; in particular - when they are involved by the
      stress-test:
          nsk/stress/jck122/jck122002
      belonging to the testbase:
          /net/sqesvr/vsn/VM/testbase/testbase_nsk

      To reproduce this failure, please try the script DOIT.BAT
      at the directory:
          /net/sqesvr/vsn/GammaBase/Bugs/4310299


      ======================================================================

        Attachments

          Activity

            People

            Assignee:
            mpalecznsunw Michael Paleczny (Inactive)
            Reporter:
            elatkinsunw Eugene Latkin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: