Terrier Core

Rounding.toString() doesnt work for 10dp.

Details

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

    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.
    Show
    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.

Activity

Hide
Craig Macdonald added a comment - 27/Aug/09 6:25 PM
Show
Craig Macdonald added a comment - 27/Aug/09 6:25 PM 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
Craig Macdonald added a comment - 31/Aug/09 2:48 PM

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

Show
Craig Macdonald added a comment - 31/Aug/09 2:48 PM I have decided to limit our Rounding implementation to 9dp max, by means of argument checking.

People

Dates

  • Created:
    27/Aug/09 6:11 PM
    Updated:
    05/Mar/10 5:01 PM
    Resolved:
    31/Aug/09 2:48 PM