my first questions on pre calculus (summer stuff)

This is a discussion on my first questions on pre calculus (summer stuff) within the A Brief History of Cprogramming.com forums, part of the Community Boards category; We had some written problems. Here is the first, tell me what you think. The forumla for the 'gaps' is ...

  1. #1
    Banned
    Join Date
    Jan 2003
    Posts
    1,708

    my first questions on pre calculus (summer stuff)

    We had some written problems. Here is the first, tell me what you think. The forumla for the 'gaps' is just taken from the book, so don't ask me about it :O)

    I thought I answered the question well, but I want to impress my math teacher to let him know I'm still interested and to help keep him motivated. So if there's anything cool I should add please tell me.

    1. Discuss the relationships/differences between screen coordinates and xy – plane coordinates. Are they the same? Different? Why? Include a definition of a pixel and why we should care.

    Your typical graphing calculator displays many of the points on the xy plane and is useful for many purposes. However, not all points on the xy plane can be displayed. For example, when you enlarge your viewing window ‘gaps’ between pixels appear, and are represented by the formula:
    (Xmax – Xmin) / (Columns – 1)
    and
    (Ymax – Ymin) / (Rows – 1)

    Computers are limited by the data types that they use. For example, it is impossible to accurately represent a point on the xy plane where one of the numbers is irrational. This is because on your typical graphing calculator you have a mantissa with about 9 decimal places accuracy (on a personal computer it is typically between 5 and 7). Another problem is the fact that pixels are of a finite size. A pixel (which stands for picture element) is the smallest component of a graphics display, and thus is the smallest section that can be lit up. In reality, numbers go on forever and can be infinitely small, large, or precise. If you had an infinite level of accuracy (which you don’t) you could take a single pixel and graph ten trillion numbers within it.
    Computers also have built in data types that can hold a finite number of values (in powers of two). For example, on your typical 32 bit system (a PC) the highest value of an (unsigned) integer (4 bytes ~ 32 bits) is 2^31 or 2147483648 (the 0 power is the first bit). If you try to add 1 to that number, it will overflow and actually start back at 0. This can pose a problem on your graphing computer (whether it be a TI 83 or a personal computer) because you can never represent a point that goes beyond these limitations unless new hardware or special software is introduced.

  2. #2
    I lurk
    Join Date
    Aug 2002
    Posts
    1,361
    Actually, the highest value an unsigned long can hold on a 32 bit system is (2^32)-1 or 0xFFFFFFFF.

  3. #3
    Banned
    Join Date
    Jan 2003
    Posts
    1,708
    uhh

    no

    cout << "largest int val " << numeric_limits<int>::max() << endl;
    cout << "largest int val " << numeric_limits<long>::max() << endl;


    4 bytes = 32 bits
    the 32nd bit represents the 31st power

    2^31 = the really big number in my paragraph


    unless I'm missing something


    a long and an int are the same thing on a 32 bit system

    EDIT: ok, i guess that's for a signed long, my bad

    EDIT1: That doesn't make sense to me though. I changed the int to unsigned int in that code above and received what you told me, but it doesn't seem like a possibility when the highest available power is 31. Maybe someone can explain it to me.
    Last edited by Silvercord; 06-22-2003 at 01:46 PM.

  4. #4
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    2^31 == 1000 0000 .......

    (2^32)-1 == 1111 1111 111....

    get the idea? 2^31 is the largest high order bit by itself, (2^32)-1 is all bits set.

  5. #5
    Banned
    Join Date
    Jan 2003
    Posts
    1,708
    Oh ok, now I got it. I feel smart right now. No, really.

  6. #6
    Just because ygfperson's Avatar
    Join Date
    Jan 2002
    Posts
    2,493
    IMHO, you could lose the last paragraph without affecting your answer.

  7. #7
    Toaster Zach L.'s Avatar
    Join Date
    Aug 2001
    Posts
    2,686
    You could say that while mathematics (this type at least) is continuous in nature, it cannot be represented on a screen because length is not particularly meaningful below 1.6x10^-35 m (Planck length), and then go off on a tangent about not being able to see where the line defining the function is because you know fairly well how fast the pixels are moving.

    ... You might get a calc book thrown at you, but you could mention it.
    The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. A very long list of questions... maybe to long...
    By Ravens'sWrath in forum C Programming
    Replies: 16
    Last Post: 05-16-2007, 05:36 AM
  2. Trivial questions - what to do?
    By Aerie in forum A Brief History of Cprogramming.com
    Replies: 23
    Last Post: 12-26-2004, 08:44 AM
  3. I want nothing more than to take calculus
    By Silvercord in forum A Brief History of Cprogramming.com
    Replies: 61
    Last Post: 06-20-2003, 04:23 PM
  4. questions re modulus 10 aka check digit stuff
    By DaWench in forum C++ Programming
    Replies: 2
    Last Post: 11-26-2001, 10:14 PM
  5. Replies: 2
    Last Post: 11-26-2001, 03:05 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21