Uploaded image for project: 'OptaPlanner'
  1. OptaPlanner
  2. PLANNER-155

HardSoftBigDecimalScore and SimpleBigDecimalScore must properly implement power(double)

    XMLWordPrintable

Details

    Description

      Currently their code looks like this:

              // TODO FIXME remove .intValue() so non-integer exponents produce correct results
              // None of the normal Java libraries support BigDecima.pow(BigDecimal)
              return new HardSoftBigDecimalScore(
                      hardScore.pow(exponentBigDecimal.intValue()).setScale(hardScore.scale()),
                      softScore.pow(exponentBigDecimal.intValue()).setScale(softScore.scale()));
      

      I 've asked a question on stackoverflow:
      http://stackoverflow.com/questions/16441769/javas-bigdecimal-powerbigdecimal-exponent-is-there-java-library-that-does-it

      Attachments

        Activity

          People

            Unassigned Unassigned
            gdesmet@redhat.com Geoffrey De Smet (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: