33s Evaluates Some Large Powers 50g Refuses
|
08-18-2022, 05:17 AM
Post: #1
|
|||
|
|||
33s Evaluates Some Large Powers 50g Refuses
On 33s
-1^999999999999 is evaluated correctly while 50 g returns "Integer too large" error. |
|||
08-18-2022, 06:18 AM
Post: #2
|
|||
|
|||
RE: 33s Evaluates Some Large Powers 50g Refuses
Try adding a decimal point (or comma, depending on your radix separator) to the -1. This tells the HP-50g you want a numerical answer instead of a symbolic answer which uses the CAS engine.
For example: -1.^999999999999 Returns -1. |
|||
08-18-2022, 08:43 AM
Post: #3
|
|||
|
|||
RE: 33s Evaluates Some Large Powers 50g Refuses
Thank you, Steve, that solves it for smaller numbers.
I came upon this when writing https://www.hpmuseum.org/forum/thread-18683.html The programme is compact: Code: 1. LBL B Trying this on the 50g I was disappointed at the error report for larger powers of 1 & -1, ie greater than 999999999999. The programme below works for larger numbers, nevertheless it's a disappointment the 50g gives up at some point in powers of the unit. Code: Size: 96. |
|||
08-18-2022, 01:57 PM
(This post was last modified: 08-18-2022 02:04 PM by John Keith.)
Post: #4
|
|||
|
|||
RE: 33s Evaluates Some Large Powers 50g Refuses
Though it doesn't address the issue of integer powers, we can get the result for any number < 2^63 using binary numbers with #3 XOR. this works on any RPL calculator but requires entering the number with a leading #. The 3 can be replaced with any other integer to return values for similar sequences since Nim addition is just XOR.
Going even farther afield, we can make lists of A004444 and similar sequences very rapidly using ListExt commands on the 50g by taking advantage of the structure of the sequence (groups of 4 consecutive numbers reversed). Given a number n on the stack, the following program returns 4n terms of the sequence. If the 4's in the program are replaced with 2's, the program will return 2n terms of A004442. Code:
With the number 250 on the stack, the program returns the first 1000 terms in 1.5 seconds on my 50g. |
|||
08-19-2022, 04:09 AM
Post: #5
|
|||
|
|||
RE: 33s Evaluates Some Large Powers 50g Refuses
Also the HP35S gives the correct answer.
Put a calculator into your life! |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)