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

BigDecimalScore throws ArithmeticException: Non-terminating decimal expansion; no exact representable decimal result.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 6.1.0.Beta1
    • 6.0.1.Final
    • optaplanner-core
    • None

      See http://stackoverflow.com/questions/22028358/scoreattained-condition-throws-arithmatic-exception-optaplanner

      Due to the context where divide is used (calculateTimeGradient()), we might want to forgo typical rounding (HALF_UP or HALF_EVEN) and go for conservative rounding (FLOOR).

      In any case, follow the behavior of Double/Long/Int calculations (which is floor IIRC)

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

                Created:
                Updated:
                Resolved: