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

Introduce better utilities to manipulate floating point values

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Won't Fix
    • Affects Version/s: hs17
    • Fix Version/s: None
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      It would be nice to have standard methods to manipulate floating point numbers in HotSpot. One concrete example is methods for floating point comparisons, where we're not supposed to compare floating point numbers directly but always check their difference in terms of a small "epsilon" (i.e., if the difference is smaller than epsilon, assume that the two numbers are the same). This is a standard technique and, right now, we implement it in ad-hoc ways (see CR 6886024).

      I'm envisaging that we can start by introducing a new all static class under utils/ with comparison methods. I'm not quite sure what other related methods we can add to that class.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              zgu Zhengyu Gu
              Reporter:
              tonyp Tony Printezis
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: