Post Reply 
HP Prime CAS & Large numbers
09-08-2022, 09:14 AM
Post: #8
RE: HP Prime CAS & Large numbers
I tried to find the largest integer number that the Prime can manage in CAS.
I guess CAS integer are internally formatted in binary, so I empirically searched the largest power of 2 before the Prime returns "undefined": it is 2^8598.
I guess that the largest integer is (mathematically) 2^8599-1, but you can't write this expression on Prima without getting "undefined".
I tried this: Σ(2^n,n,0,8598).
It returns an integer with 2588 digits that (I think) is the largest integer before getting "undefined"; you can verify this adding just 1 to it and the result is "undefined".
format(Σ(2^n,n,0,8598),"d10") -> "3.605227827e+2588"
Similarly I searched the smallest (most negative) integer, finding it to be Σ(-2^n,n,0,8597). if you try to subtract just 1 to it, you get "undefined".
The question now is: why such particular number of bits (8599) has been chosen for the binary format of integer in CAS?
Other "odds":
- format(Σ(-2^n,n,0,8597),"d10") -> ""; why?
- format(Σ(2^n,n,0,8598),"a12") -> "3.605227827e+2588"; not in hexadecimal form; why?
- format(Σ(2^n,n,0,29),"a12") -> "0x1.fffffff80000p+29"; OK, but...
- format(Σ(2^n,n,0,29),"h12") -> "1073741823"
Note that "a12 (or "h12") shows the max number of fractional digit in the hexadecimal format; such that from "a13" to "a99" you get the same result.
- format(Σ(2^n,n,0,30),"a12") -> "2147483647"; not formatted; why?
- format(999999999999,"a12") -> "999999999999"
- format(999999999999+1,"h12") -> "1.00000000000e+12"
- format(Σ(2^n,n,0,29)*2+1,"a12") -> "0x1.fffffffc0000p+30"
- format(Σ(2^n,n,0,29)*2+2,"a12") -> "2147483648"
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
HP Prime CAS & Large numbers - Bipman - 08-10-2017, 08:27 AM
RE: HP Prime CAS & Large numbers - Arno K - 08-10-2017, 11:35 AM
RE: HP Prime CAS & Large numbers - Bipman - 08-10-2017, 11:39 AM
RE: HP Prime CAS & Large numbers - Bipman - 08-10-2017, 02:03 PM
RE: HP Prime CAS & Large numbers - Bipman - 08-13-2017, 09:11 AM
RE: HP Prime CAS & Large numbers - Mario Blasone - 09-08-2022 09:14 AM
RE: HP Prime CAS & Large numbers - parisse - 09-27-2023, 06:37 PM
RE: HP Prime CAS & Large numbers - parisse - 09-29-2023, 10:46 AM



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