JDK-4978242 : Add Number.pow(double)
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.math
  • Affected Version: 1.4.2
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2004-01-14
  • Updated: 2004-01-14
  • Resolved: 2004-01-14
Related Reports
Duplicate :  
Relates :  
Description

Name: jl125535			Date: 01/14/2004


A DESCRIPTION OF THE REQUEST :
I see BigInteger has a pow() method that takes an int argument, but it would be EXTEREMLY helpful, especially in the scientific world, if there was another pow() method that accepted a float or double as a param.

Also BigDecimal doesn't even have a pow() function!


JUSTIFICATION :
One main reason would be to pass .5 to allow for the sqrt() of a BigInteger or BigDecimal. So if the pow() method with a double or float parameter is not possible could a sqrt() function be added to the method list of BigInteger or BigDecimal?

Unfortunately, java.lang.Math.pow() is insufficient for gigantic numbers.
(Incident Review ID: 225220) 
======================================================================

Comments
EVALUATION With JSR13, BigDecimal has a pow method which takes an integer exponent; however, for Tiger there are no BigDecimal methods which directly (pow) or indirectly (sqrt) raise a BigDecimal to a non-integer power. Such methods may be added a follow-on of JSR13. Closing as a dup of 4297957. ###@###.### 2004-01-14
14-01-2004