jscience
  1. jscience
  2. JSCIENCE-65

Amount.root(n) for odd roots (n) does not work for negative values

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Blocker Blocker
    • Resolution: Unresolved
    • Affects Version/s: current
    • Fix Version/s: Version 6.0
    • Component/s: www
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      65

      Description

      The Amount.root(int n) method for odd roots does not work for negative values.

      For example Amount.valueOf( -8, SI.METRE.pow(3) ).root( 3 ) should result in an
      Amount of "-2 m". However, it actually returns an amount with a value of NaN.

      I will attach a small JUnit test for a few odd root cases.

        Activity

        shanmann created issue -
        Hide
        shanmann added a comment -

        Created an attachment (id=8)
        JUnit test for some odd roots of negative values.

        Show
        shanmann added a comment - Created an attachment (id=8) JUnit test for some odd roots of negative values.
        kenaiadmin made changes -
        Field Original Value New Value
        issue.field.bugzillaimportkey 65 63224
        dautelle made changes -
        Fix Version/s Version 6.0 [ 14597 ]
        Fix Version/s milestone 1 [ 12327 ]

          People

          • Assignee:
            jscience-issues
            Reporter:
            shanmann
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: