Post Reply 
Numerical accuracy on the HP Prime (in Python, Home, and CAS)
07-25-2024, 08:52 PM
Post: #2
RE: Numerical accuracy on the HP Prime (in Python, Home, and CAS)
One comment: on the Prime, 1e50 is taken by the CAS to be an approximate number. It would be better to ask for cos(10^50), and then use approx() to get a decimal result.

Xcas gives the correct answer for approx(cos(10^50)) (if DIGITS is set to a large enough value) but the Prime gives the wrong answer still. I don’t think you can avoid this on the Prime, where CAS precision is 15 or 16 digits at most. You would surely need more than 50 digits of PI to get any correct digits for 10^50 MOD (2*PI).

An unrelated point: I think that 13 MOD 2*PI = 3.14159… is fine; the calculator is working from left to right, so it’s doing (13 MOD 2) * PI.

Nigel (UK)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Numerical accuracy on the HP Prime (in Python, Home, and CAS) - Nigel (UK) - 07-25-2024 08:52 PM



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