Uploaded image for project: 'Commons Math'
  1. Commons Math
  2. MATH-375

Elementary functions in JDK are slower than necessary and not as accurate as they could be.

Rank to TopRank to BottomBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersConvert to sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.2
    • None
    • None
    • JDK 1.4 - 1.6

    Description

      I would like to contribute improved versions on exp(), log(), pow(), etc. to the project. Please refer to this discussion thread http://markmail.org/message/zyeoguw6gwtofm62.

      I have developed over the past year a set of elementary functions similar to those in java.lang.Math, but with the following characteristics:

      • Higher performance.
      • Better accuracy. Results are accurate to slightly more that +/- 0.5 ULP.
      • Pure Java. The standard Math class is impleneted via JNI, and thus takes a performance hit.

      Note that some functions such as exp are nearly twice as fast in my implementation.   I've seen it 3 times faster on different processors.   The preformance varies by the relative speed of calculation vs memory lookups.

      The functions are implemented as tables of values in extra precision (approx 70 bits), and then interpolated with a minimax polynomial.

      Attachments

        1. test_fastmath_wr.zip
          13 kB
          Jeff Tapper
        2. FastMath.tar.gz
          44 kB
          William Rossi
        3. cosh-patch.txt.gz
          2 kB
          William Rossi
        4. cbrt-patch.txt.gz
          2 kB
          William Rossi
        5. atanpatch.txt.gz
          0.6 kB
          William Rossi
        6. asinacos-patch.txt.gz
          3 kB
          William Rossi

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            wrossi William Rossi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment