jscience
  1. jscience
  2. JSCIENCE-151

valueOf(LargeInteger > significand, int exponent) class Decimal does not copy significand

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Critical Critical
    • Resolution: Unresolved
    • Affects Version/s: Version 5.0
    • Fix Version/s: None
    • Component/s: Mathematics
    • Labels:
      None

      Description

      in line 239 of the class Decimal in the method valueOf(LargeInteger
      significand, int exponent) there is a critical bug, which results in
      incorrect results, e.g. when using the times method of the matrix class.

      instead fp._significand = significand;

      it must be

      fp._significand = significand.copy();

      otherwise a reference is only used and in class DenseMatrixImpl line 171
      in method times(Matrix<F> that) overwrites results from the previous
      iteration. So all results are wrong.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            widerstand
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: