CAS.lcm with decimals
|
06-23-2018, 09:49 AM
Post: #1
|
|||
|
|||
CAS.lcm with decimals
Hello everyone,
I've stumbled upon a strange behaviour of CAS.lcm function in both Home and CAS. lcm(2.5,2) yields 5 while lcm(5/2,4/2) correctly yields 10. Got last firmware installed: 2018 02 12 (13441) Is it a bug or I somehow misconfigured my HP Prime? |
|||
06-23-2018, 03:31 PM
Post: #2
|
|||
|
|||
RE: CAS.lcm with decimals
lcm returns the product of its arguments if one of them is an approx number. 2.5 is not the same as 5/2, it represents any real in a small interval around 2.5.
One should not use floats in exact arithmetic CAS instructions. |
|||
06-23-2018, 05:32 PM
(This post was last modified: 06-23-2018 08:13 PM by proostas.)
Post: #3
|
|||
|
|||
RE: CAS.lcm with decimals
Yep. My bad. I see CAS.lcm expects only integers, polynomials, and rationals. I should have learned how to use online help before posting it. Got spoiled by my Classpad II.
|
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)