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

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

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:

      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

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

                Dates

                Created:
                Updated: