Uploaded image for project: 'JDO'
  1. JDO
  2. JDO-50

Add +/-0.1 to double test values

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • tck, tck11
    • None

    Description

      Niclas Hedman suggest using the values 0.1 and -0.1 as test values for double to test for rounding problems:

      On Wednesday 18 May 2005 06:01, Craig Russell wrote:

      >> We decided to use these values for double in the AllTypes class:
      >> public static final double DOUBLE_SMALLEST = -9999999999999.9;
      >> public static final double DOUBLE_LARGEST = 9999999999999.9;
      >> public static final double[] double_values =
      >>

      { DOUBLE_SMALLEST, DOUBLE_LARGEST, 0.0, 100.0, 100.0, >> 50000000.0, -234234.234, 1000000000.0, 350.5, -25.5 }

      ;
      >>
      >> I'd be happy to use DOUBLE_LARGEST and DOUBLE_SMALLEST from AllTypes.
      >>
      >> What do you all think?

      May I suggest that 0.1 and -0.1 are included in the suite of numbers??
      Over the years, they have been involved in a lot of rounding issues (granted;
      because people errenously use floats and doubles for monetary and other
      fixed-point decimal numbers) and I would be happy if the expected behaviour
      is "documented" in tests.

      Cheers
      Niclas

      Attachments

        Activity

          People

            mwa Michael Watzek
            mcaisse Michelle Caisse
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: