RFE: add an exponent range limit to BigInteger.pow() similar to the limit for BigDecimal.pow()

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Not an Issue
    • Priority: P4
    • None
    • Affects Version/s: 5.0
    • Component/s: core-libs
    • None
    • sparc
    • solaris_10

      If you accidently pass too large of an exponent value to BigInteger.pow(), the jvm will essentially appear to hang to the end user. Although in reality, the jvm is just busy calculating a really huge number. An exponent range is provided with BigDecimal.pow() and an Arithmetic Exception is thrown if the exponent is too large. A similar limit should be included for BigIngeger.pow().

      At minimum, we should at least introduce a user defined upper limit. I have included a proposal for a source code modification in the comments section of this RFE.

            Assignee:
            Joe Darcy
            Reporter:
            Mary Mccarthy
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: