(41C) Exponentiation of Large Numbers - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Software Libraries (/forum-10.html) +--- Forum: HP-41C Software Library (/forum-11.html) +--- Thread: (41C) Exponentiation of Large Numbers (/thread-13477.html) |
(41C) Exponentiation of Large Numbers - Eddie W. Shore - 08-19-2019 12:28 PM But Why a Program when we have Button? This is true. What this program does is allow for calculation of y^x when results in answers greater than 9.999999999 * 10^9. The number is broken up into the form: mantissa * 10^exponent Let n = y^x. Then: n = y^x Taking the logarithm of both sides: log n = log (y^x) log n = x log y A number can be split into its fractional and integer part: log n = frac(x log y) + int(x log y) Take the antilog of both sides: n = 10^( frac(x log y) + int(x log y) ) n = 10^( frac(x log y) ) * 10^( int(x log y) ) where mantissa = 10^( frac(x log y) ) exponent = int(x log y) HP 41/DM 41L Program BIGPOW Input: Y stack: y X stack: x Output: Y: mantissa (shown first) X: exponent Code:
Examples Example 1: 25^76. y = 25, x = 76 Result: Mantissa = 1.75162308 Exponent = 106 25^76 ≈ 1.75162308 * 10^106 Example 2: 78^55.25, y = 78, x = 55.25 Result: Mantissa = 3.453240284 Exponent = 104 78^55.25 ≈ 3.543240284 * 10^104 Eddie Blog post: http://edspi31415.blogspot.com/2019/08/hp-41dm41l-and-ti-60x-exponentiation-of.html |