Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java math power


Method:  Let x =  2   * (1+f)
      1. Compute and return log2(x) in two pieces:
              log2(x) = w1 + w2,
         where w1 has 53-24 = 29 bit trailing zeros.
      2. Perform y*log2(x) = n+y' by simulating muti-precision
         arithmetic, where |y'|<=0.5.
      3. Return x**y = 2**n*exp(y'*log2)

Source by nullorempty.org #
 
PREVIOUS NEXT
Tagged: #java #math #power
ADD COMMENT
Topic
Name
1+1 =