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
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/h...on-of.html
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:
01 LBL T^BIGPOW
02 X<>Y
03 LOG
04 *
05 ENTER↑
06 FRC
07 10↑X
08 STOP
09 X<>Y
10 INT
11 RTN
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/h...on-of.html