Author Topic: Math problems?  (Read 6687 times)

0 Members and 2 Guests are viewing this topic.

Offline GustavoHM

  • LV0 Newcomer (Next: 5)
  • Posts: 2
  • Rating: +0/-0
    • View Profile
Math problems?
« on: September 15, 2014, 11:49:47 pm »
Hello!
I'm a proud Prime owner and, as my first graphing calc, I could not be happier. :hyper:
However there are two problems(?) that I found while playing around with it:

On the Home screen, doing (1/9)*9 gives me 0.999... , when it should result in 1. Switching between exact and approximate modes converts 0.99... into 1. I know it might be related to floating point calculation and obvious approximations, but either way, doing that with CAS gives only 1. ???

And the second problem is dividing by zero in CAS, which results in infinity. The same calculation in Home results in Error, which is expected, as, for all I know, division by zero is supposed to be undefined.

Please enlighten me if I misinterpreted the results.

GHM

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Math problems?
« Reply #1 on: September 17, 2014, 02:49:25 am »
Hi and welcome to the forums :)

I have an HP Prime but haven't used it that much outside development, but yeah I noticed this happened now after trying it. Both my TI-Nspire and 84+ gives 1 even in standard mode. However, something I have noticed is that if you use the HP Prime in CAS mode, it gives 1, while in home mode it gives 0.999... as you mention. I'm unsure if that's an expected behavior in home mode, but I guess not because my TI-Nspire is not a CAS model, nor is my 84+, and both gave the 1 answer. Perhaps somebody else could clarify on why the answer in non-CAS mode is different than in CAS mode and my other calculators.

As for division by zero, the error in home mode should be normal, I think, as on my Nspire it says Undef and my 84+ says Divide by Zero error. Perhaps it depends of if the calculator is in CAS mode or not? (Although that doesn't explain the difference in results for the (1/9)*9 problem in non-CAS mode.

The HP Prime is known to have some weird bugs so it could be one, but it could just be that the calculator functions differently and since documentation is not very visible, it's hard to know.

Offline timwessman

  • LV3 Member (Next: 100)
  • ***
  • Posts: 94
  • Rating: +32/-0
    • View Profile
Re: Math problems?
« Reply #2 on: September 18, 2014, 08:55:12 am »
Hello,

You've actually just stepped your foot into one of the oldest and most contentious differences between the HP philosophy and TI. The answer of "1" here is actually incorrect in a limited precision device. What?!?!?!?

The reason is due to one fact that you hinted at. When calculations are done in limited precision machines (12 digits for user usage in the case of Prime) you CANNOT represent certain numbers. 1/9 is going to be .111111111111..... repeating out to infinity. HOWEVER, these machines cannot represent and infinite number of digits. So if you break you input up into multiple steps, you can discover something interesting.

On any calculator but an HP machine, try typing 1/9. Now do Ans*9. You will see 1.

Now try doing 1/9, but this time you will COPY the exact display shown you into your input (.111111111111111*9) or similar and then evaluate. You will see .999999... out to the end of the display. So what is going on?

This is what is known as "guard digits". Most calculators keep a few extra digits around that are not shown to the user. If you chain the calculations together they can help, but they in essence cause the displayed results to be different depending on how you entered the numbers.

The HP philosophy has always been "the number shown in full precision will be the same no matter how you do the problem, and will always be fully accurate to the extent possible within the limited display of the device".

Now as you have discovered, in the CAS the result is always 1. The reason for this is the numbers in CAS *are* EXACT objects that CAN represent infinite precisions. Therefore a result of 1 is the correct answer no matter to which philosophy you adhere.

There is something very powerful in the way we designed Prime - there is a LOT of research into what is known as pedagogy, use of correct mathematical thinking, and using correct mathematical language. When students are using Prime, it is constantly pushing them to think about questions like "am I trying to see numerical representations, graphical representations, or symbolic representations. Am I solving things in an exact way, or in an approximate way?" By pushing you to make these internal questions, you are actually pushing your thinking in a mathematical way and changing the way you think about math and problem solving!

There is a LOT of research into this area and Prime was designed taking that into account. While there are some warts still as Omnimaga alluded to, there are a LOT of educators, professors and similar who are very excited because they can see clearly that it was designed using this research and recognize the power and benefit of such an approach.

The exact reason it returns "Error: X/0" instead of just undefined is again due to this idea that we are pushing the way you think. In approximate HOME, this is a clear answer that indicates what is going on. In the CAS, you actually receive a +/-Inifintiy - not plain infinity! That is actually what is known as a complex inifnity. No other handheld calculator returns this! It actually IS the correct result. However, since the TI CAS calcs return "undefined" (which is correct, simply just not as correct as possible) people are used to seeing that.

Take a look here however: http://www.wolframalpha.com/input/?i=1%2F0

Note what you get as the result?  :-)

Complex infinity in a single x/y plane can be thought of as a divergence tending towards infinity in both directions. Is it undefined? Not really - it is actually very *well* defined and using that definition can be very useful in many advanced math concepts. Simply returning "undefined" is a result that avoids the need to start thinking and talking about more "advanced" things.

Since we are trying to push the boundaries of thinking and encourage more exact mathematical thinking however...
« Last Edit: September 18, 2014, 08:59:11 am by timwessman »
TW

Although I work for the HP calculator group, the comments and opinions I post here are my own.

Offline GustavoHM

  • LV0 Newcomer (Next: 5)
  • Posts: 2
  • Rating: +0/-0
    • View Profile
Re: Math problems?
« Reply #3 on: September 18, 2014, 11:46:34 am »
Hello Tim and DJ Omnimaga!
Thank you both for your replies.


Tim, I do understand that limited precision calculations have, well, limited precision and will be subjected to imprecision when dealing with recurring decimals and such. That explains the 0.999... answer in Home mode as you said. And now I see how students would interpret the result and learn with it.
However, how can CAS do infinite precision calculations in a limited precision calculator?

CAS gives 1 in both exact and aproximate answer modes, even when I "shift+Enter" the expression to calculate the aproximate answer first, so it doesn't seem to use the exact result as base for the aproximate one. 
How does it achieve 1 then?


I did look up the 1/0 answer in WolframAlpha after my post and did some research in complex infinities. It is a rather interesting subject, but complicated enough to support the "undefined" category when dealing with common math.


Thank you again for your comprehensive reply. Now I can appreciate my Prime even more after learning its philosophies. And, of course, brag a bit about it with my TI-owner friends ;)


GHM

Offline bb010g

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 428
  • Rating: +22/-1
  • I do stuff
    • View Profile
    • elsewhere on the net
Re: Math problems?
« Reply #4 on: November 09, 2014, 04:02:10 pm »
However, how can CAS do infinite precision calculations in a limited precision calculator?

CAS gives 1 in both exact and aproximate answer modes, even when I "shift+Enter" the expression to calculate the aproximate answer first, so it doesn't seem to use the exact result as base for the aproximate one. 
How does it achieve 1 then?
The CAS works with symbolic representations. If you run exact(3.14) in CAS, you'll get a rational fraction. (1/9)*9 simply uses simplification of fractions: the 9's cancel. When you run approx((1/9)*9), the CAS first runs (1/9)*9) to 1, which results in an expression approx(1) which becomes approximate (if you stick it into another calculation, it will make the rest approx unless you say exact) 1..
Arch Linux user
Haskell newbie | Warming up to Lua | Being dragged into C++
Calculators: HP 50g, HP 35s, Casio Prizm, TI-Nspire CX CAS, HP 28s, HP Prime, Mathematica 9 (if that counts)
π: 3.14...; l: 108; i: 105; e: 101; l+i+e: 314
THE CAKE IS A LIE IS A PIE

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Math problems?
« Reply #5 on: November 10, 2014, 12:05:57 am »
And, of course, brag a bit about it with my TI-owner friends ;)

Don't worry, I have used TI graphing calcs since 2001 and the HP Prime is still my 2nd favorite calc, behind the TI-84+SE, and that comes from someone who owns over 25 different models. ;) The only reason why it's not first is because of the OS bugs and the fact I used the 84+ series for so incredibly long.