Uploaded image for project: 'Commons Math'
  1. Commons Math
  2. MATH-307

BigReal/Fieldelement divide without setting a proper scale -> exception: no exact representable decimal result

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0
    • 2.1
    • None
    • independent

    Description

      BigReal implements the methode divide of Fieldelement. The problem is that there is no scale defined for the BigDecimal so the class will throw an error when the outcome is not a representable decimal result.
      (Exception: no exact representable decimal result)

      The workaround for me was to copy the BigReal and set the scale and roundingMode the same as version 1.2.

      Maybe is it possible to set the scale in FieldMatrix and implements it also a divide(BigReal b, int scale, int roundMode) ??

      Attachments

        Activity

          People

            Unassigned Unassigned
            joan Joan Schipper
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 4h
                4h
                Remaining:
                Remaining Estimate - 4h
                4h
                Logged:
                Time Spent - Not Specified
                Not Specified