HP Forums
Can this be solved with any HP CAS? - Printable Version

+- HP Forums (http://www.hpmuseum.org/forum)
+-- Forum: Not HP Calculators (/forum-7.html)
+--- Forum: Not quite HP Calculators - but related (/forum-8.html)
+--- Thread: Can this be solved with any HP CAS? (/thread-9172.html)

Pages: 1 2


Can this be solved with any HP CAS? - HP67 - 09-27-2017 03:55 PM

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?


RE: Can this be solved with any HP CAS? - Nigel (UK) - 09-27-2017 04:25 PM

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)


RE: Can this be solved with any HP CAS? - HP67 - 09-27-2017 04:58 PM

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.


RE: Can this be solved with any HP CAS? - Arno K - 09-27-2017 06:01 PM

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


RE: Can this be solved with any HP CAS? - HP67 - 09-27-2017 06:05 PM

Thanks, I'll update the thread with all the replies from you guys.


RE: Can this be solved with any HP CAS? - Csaba Tizedes - 09-27-2017 07:37 PM

(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


RE: Can this be solved with any HP CAS? - Arno K - 09-27-2017 07:50 PM

Why should they, the "solution" x=5 is not in the domain of the equation.
Arno


RE: Can this be solved with any HP CAS? - Eric Rechlin - 09-27-2017 08:23 PM

On the 50g in exact RPN mode, you can also do the following to get the answer (3):

2 1000 ^ 13 MOD


RE: Can this be solved with any HP CAS? - Gilles59 - 09-27-2017 08:56 PM

(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


RE: Can this be solved with any HP CAS? - Paul Dale - 09-27-2017 10:01 PM

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


RE: Can this be solved with any HP CAS? - BarryMead - 09-28-2017 12:24 AM

(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.


RE: Can this be solved with any HP CAS? - Paul Dale - 09-28-2017 01:50 AM

It should also be there in programme mode.


Pauli


RE: Can this be solved with any HP CAS? - AlexFekken - 09-28-2017 03:18 AM

(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)


RE: Can this be solved with any HP CAS? - Csaba Tizedes - 09-28-2017 07:43 PM

(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.


RE: Can this be solved with any HP CAS? - rprosperi - 09-28-2017 09:05 PM

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?


RE: Can this be solved with any HP CAS? - AlexFekken - 09-28-2017 10:09 PM

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.


RE: Can this be solved with any HP CAS? - rprosperi - 09-29-2017 12:00 AM

(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?


RE: Can this be solved with any HP CAS? - BarryMead - 09-29-2017 12:08 AM

(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.


RE: Can this be solved with any HP CAS? - AlexFekken - 09-29-2017 12:46 AM

(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...


RE: Can this be solved with any HP CAS? - SlideRule - 09-29-2017 02:26 AM

(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