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

Faster Math.signum(fp) for positive and negative numbers

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Unresolved
    • P4
    • None
    • None
    • core-libs

    Description

      Math.signum(double d) and Math.signum(float f) are ~1.2-1.5x slower on positive and negative numbers than on zero and NaN. The case for majority of numbers can be improved with reasonable degradation in special cases.

      Attachments

        Issue Links

          Activity

            People

              dchuyko Dmitry Chuyko
              dchuyko Dmitry Chuyko
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: