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

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

XMLWordPrintable

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

      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.

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

              Created:
              Updated: