Calculate 200^300 with SOLVE
02-28-2016, 05:25 PM (This post was last modified: 02-29-2016 04:42 PM by Gerson W. Barbosa.)
Post: #2 Gerson W. Barbosa Senior Member Posts: 1,452 Joined: Dec 2013
RE: Calculate 200^300 with SOLVE
(02-28-2016 12:01 PM)tomisan Wrote:  I use this short program on my 42S to get an approximate answer for exponentiation of large arguments, e.g. 200^300 = 2.037x10^690

00 {15-Byte Prgm}
01 LBL "~Y↑X"
02 X<>Y
03 LOG
04 x
05 IP
06 LASTX
07 FP
08 10↑X
09 END

200 <ENTER> 300 <XEQ> ~Y↑X gives
X:2.03703597073 Y:690

Quite acceptable result for this exponent when compared to the HP-42S full-accuracy answer:

$\frac{200^{300}}{2 ^{300}}=\left ( \frac{200}{2} \right )^{300}=100^{300}= \left ( 10^{2} \right )^{300}=10^{600}$

$200^{300}=2^{300}\cdot 10^{600}=2.03703597633\cdot 10^{90}\cdot 10^{600}=2.03703597633\cdot 10^{690}$

The following allows for large exponents on the wp34S (DBLOFF, SSIZE4) while keeping full accuracy. Somewhat limited, however.

Code:
 LBL A <> YXXY MANT x<> Y y^x MANT RCL L EXPT R^ LOG10 IP RCL* T + x<> Y END

200 ENTER 300 A --> 2.037035976334486 x<>y --> 690

450 ENTER 550 A --> 1.848768685494735 x<>y --> 1459

550 ENTER 650 A --> +∞ Error

(02-28-2016 12:01 PM)tomisan Wrote:  Playing with my newly acquired 17BII I came up with the following SOLVE equation (works also on the 17BII+):

~Y'X:
0xL(E:IP(L(M1:LOG(Y)xX)))+
0xL(M:ALOG(FP(G(M1))))+
IF(S(MANT):MANT-G(M):EXP-G(E))=0

SOLVE is fun to use and amazingly powerful.

Indeed! As long as the equations remain short, of course :-)

Gerson.

Edited to replace a dot with an = above.
 « Next Oldest | Next Newest »

 Messages In This Thread Calculate 200^300 with SOLVE - tomisan - 02-28-2016, 12:01 PM RE: Calculate 200^300 with SOLVE - Gerson W. Barbosa - 02-28-2016 05:25 PM RE: Calculate 200^300 with SOLVE - Gerald H - 02-28-2016, 06:59 PM RE: Calculate 200^300 with SOLVE - Tugdual - 03-01-2016, 02:57 AM RE: Calculate 200^300 with SOLVE - Steve Simpkin - 03-01-2016, 06:18 AM RE: Calculate 200^300 with SOLVE - Gerson W. Barbosa - 03-01-2016, 02:25 PM RE: Calculate 200^300 with SOLVE - John Keith - 03-02-2016, 02:22 AM RE: Calculate 200^300 with SOLVE - Gerson W. Barbosa - 03-02-2016, 03:29 AM RE: Calculate 200^300 with SOLVE - DavidM - 03-02-2016, 06:09 PM RE: Calculate 200^300 with SOLVE - Claudio L. - 03-03-2016, 09:19 PM RE: Calculate 200^300 with SOLVE - Tugdual - 03-01-2016, 08:49 PM RE: Calculate 200^300 with SOLVE - Arno K - 03-01-2016, 09:18 PM RE: Calculate 200^300 with SOLVE - Tugdual - 03-01-2016, 09:24 PM

User(s) browsing this thread: 1 Guest(s)