Strange results for MOD in CAS
|
03-03-2024, 07:32 PM
Post: #6
|
|||
|
|||
RE: Strange results for MOD in CAS
MOD is not a synonym of mod in CAS.
If xcas_mode()==0, mod will build an element of Z/nZ, like 27 mod 5 -> 2 %% 5. If xcas_mode()>0, mod will call irem and return an element of Z; 27 mod 5 -> 2 The difference will become clear if you make further operations on the result, e.g. multiply by 3. It's unclear for me how xcas_mode can be modified on the Prime... MOD in CAS will call _MODULO in rpn.cc, it's not the same code as irem, I don't remember the difference, probably _MODULO behaves more like MOD in HOME. |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Strange results for MOD in CAS - Joe Horn - 02-25-2024, 08:15 AM
RE: Strange results for MOD in CAS - Albert Chan - 02-25-2024, 02:30 PM
RE: Strange results for MOD in CAS - parisse - 02-27-2024, 12:22 PM
RE: Strange results for MOD in CAS - komame - 03-03-2024, 08:54 AM
RE: Strange results for MOD in CAS - Albert Chan - 03-03-2024, 11:10 AM
RE: Strange results for MOD in CAS - parisse - 03-03-2024 07:32 PM
|
User(s) browsing this thread: 1 Guest(s)