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

Introduce better utilities to manipulate floating point values

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • hs17
    • hotspot
    • None
    • generic
    • generic

      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.

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: