Uploaded image for project: 'Terrier Core'
  1. Terrier Core
  2. TR-53

Rounding.toString() doesnt work for 10dp.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 3.0
    • Fix Version/s: 3.0
    • Component/s: .utility
    • Labels:
      None

      Description


      junit.framework.ComparisonFailure: testIntegerWithDP failed for 10 decimal places expected:<0.[0000000000]> but was:<0.[147483647]>
      at junit.framework.Assert.assertEquals(Assert.java:81)
      at uk.ac.gla.terrier.utility.Rounding$RoundingTests.testIntegerWithDP(Rounding.java:76)
      at uk.ac.gla.terrier.utility.Rounding$RoundingTests.testIntegersVariableRangeDP(Rounding.java:60)

      This affected query expansion with Rounding.toString() for 10 decimal places.

        Attachments

          Activity

          Hide
          craigm Craig Macdonald added a comment -
          Show
          craigm Craig Macdonald added a comment - I dont really follow our implementation. Alternatives: see http://www.rgagnon.com/javadetails/java-0016.html and http://java.sun.com/j2se/1.5.0/docs/api/java/math/BigDecimal.html
          Hide
          craigm Craig Macdonald added a comment -

          I have decided to limit our Rounding implementation to 9dp max, by means of argument checking.

          Show
          craigm Craig Macdonald added a comment - I have decided to limit our Rounding implementation to 9dp max, by means of argument checking.

            People

            • Assignee:
              craigm Craig Macdonald
              Reporter:
              craigm Craig Macdonald
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: