Post Reply 
Can this be solved with any HP CAS?
09-27-2017, 03:55 PM
Post: #1
Can this be solved with any HP CAS?
I saw a post in comp.lang.fortan where somebody said:

"2**1000 / 13 what is the remainder? A calculator won't help with discovering the correct answer."

is this solveable on HP calcs with CAS?

It ain't OVER 'till it's 2 PICK
Find all posts by this user
Quote this message in a reply
09-27-2017, 04:25 PM
Post: #2
RE: Can this be solved with any HP CAS?
On the Prime, two ways:
  • irem(2^1000,13) where irem is the integer remainder function;
  • powmod(2, 1000, 13) which is more efficient, because it finds the remainder without first working out the power of two.
It doesn't take long with pencil and paper either!

Nigel (UK)
Find all posts by this user
Quote this message in a reply
09-27-2017, 04:58 PM
Post: #3
RE: Can this be solved with any HP CAS?
Thanks. Somebody in the thread pointed out how to do it by hand also.

I didn't get it to work with the CAS on the HP 48 but I'm the world's worst when it comes to math. Would like to see what I missed when somebody posts an example for the 48/50.

It ain't OVER 'till it's 2 PICK
Find all posts by this user
Quote this message in a reply
09-27-2017, 06:01 PM (This post was last modified: 09-27-2017 06:08 PM by Arno K.)
Post: #4
RE: Can this be solved with any HP CAS?
One way for the 50g is IREMAINDER(2^1000,13).
Arno
P.S.: there also is POWMOD(2,1000) which works with the cas-variable MODULO where the 13 has to be stored first
Find all posts by this user
Quote this message in a reply
09-27-2017, 06:05 PM
Post: #5
RE: Can this be solved with any HP CAS?
Thanks, I'll update the thread with all the replies from you guys.

It ain't OVER 'till it's 2 PICK
Find all posts by this user
Quote this message in a reply
09-27-2017, 07:37 PM
Post: #6
RE: Can this be solved with any HP CAS?
(09-27-2017 03:55 PM)HP67 Wrote:  ... is this solveable on HP calcs with CAS?

And this one?!

\(3x+\frac{1}{x-5}=15+\frac{1}{x-5}\)

Csaba
Find all posts by this user
Quote this message in a reply
09-27-2017, 07:50 PM
Post: #7
RE: Can this be solved with any HP CAS?
Why should they, the "solution" x=5 is not in the domain of the equation.
Arno
Find all posts by this user
Quote this message in a reply
09-27-2017, 08:23 PM
Post: #8
RE: Can this be solved with any HP CAS?
On the 50g in exact RPN mode, you can also do the following to get the answer (3):

2 1000 ^ 13 MOD
Visit this user's website Find all posts by this user
Quote this message in a reply
09-27-2017, 08:56 PM (This post was last modified: 09-27-2017 08:59 PM by Gilles59.)
Post: #9
RE: Can this be solved with any HP CAS?
(09-27-2017 07:37 PM)Csaba Tizedes Wrote:  
(09-27-2017 03:55 PM)HP67 Wrote:  ... is this solveable on HP calcs with CAS?

And this one?!

\(3x+\frac{1}{x-5}=15+\frac{1}{x-5}\)

Csaba

By the way the HP50 CAS returns x=5 :O
And DOMAIN returns {-oo +oo}

I suppose that the CAS simplify too much ;D
Find all posts by this user
Quote this message in a reply
09-27-2017, 10:01 PM
Post: #10
RE: Can this be solved with any HP CAS?
He who must not be named suggests that the WP 34S handles the problem perfectly:

Code:
2 ENTER 1000 ENTER 13 ^MOD

I'm glad we exposed the exp-mod function.


Pauli
Find all posts by this user
Quote this message in a reply
09-28-2017, 12:24 AM
Post: #11
RE: Can this be solved with any HP CAS?
(09-27-2017 10:01 PM)Paul Dale Wrote:  He who must not be named suggests that the WP 34S handles the problem perfectly:

Code:
2 ENTER 1000 ENTER 13 ^MOD

I'm glad we exposed the exp-mod function.


Pauli

Pauli: When I first attempted to try this, I hadn't read the footnote on the manual page for the ^MOD function and did not realize that it is ONLY available in the menus when you have the calculator in INTEGER MODE. Once I put the calculator into INTEGER mode, then the ^MOD function showed up in the menus. Thanks for exposing the exp-mod function.
Find all posts by this user
Quote this message in a reply
09-28-2017, 01:50 AM
Post: #12
RE: Can this be solved with any HP CAS?
It should also be there in programme mode.


Pauli
Find all posts by this user
Quote this message in a reply
09-28-2017, 03:18 AM
Post: #13
RE: Can this be solved with any HP CAS?
(09-27-2017 04:25 PM)Nigel (UK) Wrote:  It doesn't take long with pencil and paper either!
In case anyone is interested in such a calculator-less solution:

2^6 = 64 = -1 (because 65 = 5 * 13)
Squaring that gives 2^12 = 1
This means 2^1000 = 2^(1000 mod 12) = 2^4 = 3

(all calculations are "mod 13" of course)
Find all posts by this user
Quote this message in a reply
09-28-2017, 07:43 PM
Post: #14
RE: Can this be solved with any HP CAS?
(09-27-2017 08:56 PM)Gilles59 Wrote:  I suppose that the CAS simplify too much ;D

If in this simple case the CAS cannot decide the right domain and do not gives the right solution, how we can decide about the solution in any complicated case? How can I trust in CAS if it cannot solve this simple example?!?

If 3×X+1/(X-5)=15+1/(X-5) is the unbreakable code for Skynet newer gains to self-awareness and X=5 is the password and John Connor believe that, Skynet never will wake up, because the CAS of Skynet never find x=5 (because it is out of the domain and Skynet's CAS is really intelligent), one simple HP50 with its CAS can be destroy the whole mankind on the Earth...

So, this is a REALLY serious problem - please solve it... Big Grin Wink

Csaba

PS.: No any CAS which can solve this problem correctly... This is too simple to handle it correctly. Of course the triple integrals in negative dimensions on a hyperboloid surface can do without problem, but I'm an engineer and I want RELIABLE solutions.

If you have a friend who is one time did not says the truth - he is a LIAR.
Find all posts by this user
Quote this message in a reply
09-28-2017, 09:05 PM
Post: #15
RE: Can this be solved with any HP CAS?
Ok, I'll ask what surely some other folks must be wondering....

How can the solution be x=5, since that would imply division by zero, defined as undefined? I presume even the almighty CAS must follow the same rules regarding division by zero?

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
09-28-2017, 10:09 PM
Post: #16
RE: Can this be solved with any HP CAS?
Yes, domains matter: in the compactified complex plane, i.e. on the Riemann sphere, 5 is a (the) valid solution for the equation. No ifs or buts.

Arguably the Riemann sphere is the nicest and most natural domain to do calculations in (and to do function theory on), so in that sense I applaud Skynet's choice of domain :-)

Asking ambiguous questions and expecting unambiguous answers is just another case of GiGo. Blame your expectations, not the tool.
Find all posts by this user
Quote this message in a reply
09-29-2017, 12:00 AM
Post: #17
RE: Can this be solved with any HP CAS?
(09-28-2017 10:09 PM)AlexFekken Wrote:  Yes, domains matter: in the compactified complex plane, i.e. on the Riemann sphere, 5 is a (the) valid solution for the equation. No ifs or buts.

Arguably the Riemann sphere is the nicest and most natural domain to do calculations in (and to do function theory on), so in that sense I applaud Skynet's choice of domain :-)

Asking ambiguous questions and expecting unambiguous answers is just another case of GiGo. Blame your expectations, not the tool.

If your comments are a reply to my question (I honestly can't tell), I can say, with absolutely no offence meant at all, that it doesn't help (me) one bit.

What is a Riemann sphere? Compactified complex plane?

Maybe it's best for us non-math genius folks playing along at home to simply move along, lol.

Other than number theory, in what context or application does this stuff apply?

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
09-29-2017, 12:08 AM
Post: #18
RE: Can this be solved with any HP CAS?
(09-28-2017 01:50 AM)Paul Dale Wrote:  It should also be there in programme mode.


Pauli

This is true, but if one were to RUN a program including the ^MOD command while NOT in INTEGER mode, then you would get a "BAD MODE ERROR", because that
instruction step would not be appropriate in non-integer modes.
Find all posts by this user
Quote this message in a reply
09-29-2017, 12:46 AM
Post: #19
RE: Can this be solved with any HP CAS?
(09-29-2017 12:00 AM)rprosperi Wrote:  If your comments are a reply to my question (I honestly can't tell), I can say, with absolutely no offence meant at all, that it doesn't help (me) one bit.
Yes, that was aimed partly at you (for calling division by zero undefined) but also in repsonse to the "cannot decide the right domain" statement because the same response addresses both: in the "right" domain division by zero can be defined.

I think there is a very wide mix of people on this forum, which is probably part of the reason why we are having these discussions (with different expectations). :-)

To "answer" your question: the extended or compactified complex plane is very useful in complex function theory because it turns out that you can treat "infinity" as just another point in the "plane" for many purposes, thereby simplifying a lot of the theory.

To "misdirect" from your question: it does not matter. We are talking about well-established mathematics that is over 150 years old. A lot of it has found is way into applications and much more will no doubt follow. It is interesting that you mention number theory because that is one of the success stories of "useless" abstract mathematics finding its way into applications (think encryption).

The point that I am trying to make is that even within mathematics there is always a context in which you are working and that context will justify defining (or undefining) things that require a different approach elsewhere. Whoever created the algorithms for your tool would have done so in some context that may not be yours. This doesn't affect most calculations but it might affect borderline situations. Unless there is a clear bug I would just accept and (try to) understand what the tools does and hopefully when to expect the unexpected...
Find all posts by this user
Quote this message in a reply
09-29-2017, 02:26 AM
Post: #20
RE: Can this be solved with any HP CAS?
(09-27-2017 07:37 PM)Csaba Tizedes Wrote:  ... is this solveable ... (3x+\frac{1}{x-5}=15+\frac{1}{x-5}\)
Csaba

Csaba, the referenced equation is easily simplified to 3x=15. Consider a substitution such that the expression a+b = c+b represents the original equation, which reduces to the expression a+b-b=c which further reduces to a=c. Simplifying equations is a standard practice in math and a necessity for some computational algorithms deployed on diverse devices, machines, programs, etc..

BEST!
SlideRule
Find all posts by this user
Quote this message in a reply
Post Reply 




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