Numerical accuracy on the HP Prime (in Python, Home, and CAS)
|
07-25-2024, 10:17 PM
(This post was last modified: 07-26-2024 10:13 PM by ftneek.)
Post: #3
|
|||
|
|||
RE: Numerical accuracy on the HP Prime (in Python, Home, and CAS)
Thank you, that result makes sense now. Maybe it is not a parentheses 'bug' after all. Likely, it is just another instance where the lack of parentheses makes the problem ambiguous or up for interpretation depending on operator precedence.
If I wanted the result of the MOD operation to multiplied by pi I would have written it as (13 MOD 2)*pi, however at the same time you can probably say that if I wanted it the way I was expecting, I should have written it as 13 MOD (2*pi). Is one interpretation generally followed in different programming languages? And you are right I did not think to increase the precision in Xcas, now I see a much more accurate result. Perhaps I'll try to add the precision used later, though in all my tests I believe I just used the default settings. My other concern is why the G2's Python results seem to be (very) different sometimes and why they're sometimes different by 1 digit. edit: if I were to make a suggestion regarding the MOD operator, it would be to add a Textbook Display template, so that it is displayed as ([] MOD []) and you simply need to fill in the boxes, that should make the order of operation more clear. - neek |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Numerical accuracy on the HP Prime (in Python, Home, and CAS) - ftneek - 07-25-2024, 06:40 PM
RE: Numerical accuracy on the HP Prime (in Python, Home, and CAS) - Nigel (UK) - 07-25-2024, 08:52 PM
RE: Numerical accuracy on the HP Prime (in Python, Home, and CAS) - ftneek - 07-25-2024 10:17 PM
RE: Numerical accuracy on the HP Prime (in Python, Home, and CAS) - parisse - 07-26-2024, 04:27 PM
RE: Numerical accuracy on the HP Prime (in Python, Home, and CAS) - ftneek - 07-26-2024, 07:01 PM
|
User(s) browsing this thread: 1 Guest(s)