Uploaded image for project: 'Commons Numbers'
  1. Commons Numbers
  2. NUMBERS-16

Set tolerances in ComplexTest to zero?

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 1.0-beta1
    • complex
    • None

    Description

      Considering the following JUnit test:

      public void testConstructor()

      { Complex z = new Complex(3.0, 4.0); Assert.assertEquals(3.0, z.getReal(), 1.0e-5); Assert.assertEquals(4.0, z.getImaginary(), 1.0e-5); }

      That tolerance seems pretty high to me – I sure would not want to work with a method that was not stabler than that, nor can I see a reason that the numbers would be exactly the same to the last place.

      Any reason not to set these tolerances to zero?

      Attachments

        Activity

          People

            Unassigned Unassigned
            ericbarnhill Eric Barnhill
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: