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

Change in behavior of Math.log() with intrinsified version

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 6
    • Fix Version/s: 6
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b20
    • CPU:
      x86
    • OS:
      generic

      Description

      Rob Nugent on the javagaming.org forums has posted a small test case illustrating a change in behavior with the intrinsified version of Math.log() on x86 CPUs. Test case:

      public class Test {
        public static void main(String[] args) {
          int w = 64;
          int levels = (int)(Math.log(w) / Math.log(2.0)) + 1;
          System.out.println("Width " + w + " gives " +
            levels + " mipmap levels");
        }
      }

      This produces an answer of 7 on JDK releases 1.5 and earlier and an answer of 6 on the current x86 builds of 1.6 with most configurations (-client -Xcomp seems to work, but -client -Xint and -server -Xint do not). It is not clear whether this change in behavior should be considered a bug due to the specification guarantees of Math.log(), but it should be investigated.

      Relevant thread:
      http://www.javagaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=jogl;action=display;num=1103796449;start=30#30

      ###@###.### 2005-1-04 22:35:29 GMT

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              azeemj Azeem Jiva
              Reporter:
              kbr Kenneth Russell (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: