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

Missing ideal transforms for trigonometric identities

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 25
    • hotspot
    • x86_64
    • generic

      The following micro incurs redundant call overhead for a trigonometric identity involving sin and inverse sin (arcsin) APIs for angles known at compile time.

      public static double micro() {
          return Math.sin(Math.asin(1.0)); // angle can be a constant b/w -1.0 and 1.0
      }

      arcsin(sin(x)) => x
      arccos(cos(x)) => x
      sin(arcsin(x) => x
      cos(arccos(x) => x

      Problem:
      - Transcendental stubs calls are agnostic to idealizations.
      Solution:
      - Creation of idealizable macro nodes, which can be lowered to calls during macro expansion will save redundant call overheads.

        1. asm.png
          asm.png
          105 kB
        2. identities.png
          identities.png
          5 kB

            jbhateja Jatin Bhateja
            jbhateja Jatin Bhateja
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: