JDK-6894378 : Introduce better utilities to manipulate floating point values
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: hs17
  • Priority: P4
  • Status: Closed
  • Resolution: Won't Fix
  • OS: generic
  • CPU: generic
  • Submitted: 2009-10-22
  • Updated: 2014-03-07
  • Resolved: 2014-03-07
Related Reports
Relates :  
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.

Comments
RT Triage team: its unclear how much general purpose cleanup will be useful in this case for RT. If GC or Compiler group have specific ideas, they can reopen and investigate this issue.
07-03-2014