Wednesday, July 11, 2012

What's the comma good for?

How NOT to add the large numbers:
 324,568,116 + 538,246
The other day I was typing a huge number into my calculator, and was reminded of an error my students often make, that of using the comma. You may have noticed that there is a comma in the middle of the TI-83 and 84's buttons, and maybe even tried to use it before? Get the "Syntax Error" message before? Though we  typically separate large numbers into chunks of three digits each, that is not what the comma was designed to do in calculators, and if you try to use it to do that, as shown to the right, your calculator gets confused. I often tell my students "You are smarter than your calculator" meaning -- it has no idea that commas are used in that way. It thinks you're crazy.

So, what is the comma there for then, if not to separate large numbers into chunks of three digits? Here's a handful of reasons the comma is useful, and things you can use it for:

  • An argument separator:  the most common use of a comma on a TI-83 or TI-84 is to separate different inputs of a function.  Lots of words here... let me summarize:
      function - some sort of a command that takes input from you and calculates something.
      argument - the "input" that you put into a function
    Here's a few examples:  Hidden in the Math button are some functions you might want to know about that require more than one input. Try typing in gcd(100, 84) and you'll find that the calculator will give you the greatest common factor (or divisor) of 100 and 84. Notice because you had two inputs, you had to separate them with a comma. Further right in the menu is randInt(1,6) which will give you a random number between 1 and 6, like rolling a dice. Add a third number in like randInt(1,6,5) and it will give you a list of random numbers, as if you rolled 5 dice, like if math class was really boring and you wanted to play Yahtzee but knew the teacher would be annoyed with the sound of dice on your desk.

  • A list separator:  you can also create lists of numbers in your calculator, using the braces {} and commas. You might want to do this if you are doing things with statistics, or if you are trying to answer many different questions at once. There are different list functions in the List menu, and in the Stats menu. Usually I will type my list up, say: {1, 3, 5, 7, 9, 11} and then store it using the STO button, and then I can do all sorts of things with or to the list, a few of which are demonstrated to the right.  

  • A matrix separator: similar to the lists option, this will help you to create and store a matrix of numbers, for which you need to use the [] brackets instead of parentheses. Matrices are far to rich a topic to explore in depth here, and I think it's much easier to use the Edit option in the Matrix menu when I work with them myself, but you can type up a matrix on the main screen, or in the programming screens by using [ [a, b, c, ...] [d, e, f, ...] ...] if you wanted to, and when programming its the only way.
  • An ordered pair separator: if you have a set of x,y coordinates, you use the comma to tell the calculator when x stops and y begins.  Among other places, there are a few useful functions in the Angle menu that require you to enter in an x- and a y- coordinate, such as when calculating the length and angle of a vector?  Suppose you want to know the distance from (0,0) to (3, 4) and what angle you need to travel at? Type in R>Pr(3,4) and R>Ptheta(3,4) to get the distance (5 units) and the angle (~53 degrees).   

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...