Need a way to divide a group of numbers

This is a discussion on Need a way to divide a group of numbers within the A Brief History of Cprogramming.com forums, part of the Community Boards category; I don't know what you want to achieve, but if you only have a problem with division, show us an ...

  1. #1
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    I don't know what you want to achieve, but if you only have a problem with division, show us an example of the other operations, what for example does 1,0,0 + 2,0 give?
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  2. #2
    Wen Resu
    Join Date
    May 2003
    Posts
    219

    Need a way to divide a group of numbers

    Little side project i am doing, and ran into a block. What i want to do is create a calculator that can do basic maths on a range of numbers limited only by the memory within computer <IE not the max imposed by the implementation. Its gona be in C++ so i wrote a vectorish class to help with this. My Problem now lies in Division.
    Imaging i have two groups of numbers
    A:1 0 0
    B: 2 0
    i wanted to know what A divided by B is. My problem is i can't seem to figure out or find a forumla that will allow me to divide the groups. Standard long division wouldn't work cause one number doesn't know the next exists
    Thanks for your time
    Sorry if this isn't very clear, post any questions.
    PS: posted this in GD cause its not programming specific, its kinda general as we have no math place heh; but if ya think it should go else where move away of course

  3. #3
    Wen Resu
    Join Date
    May 2003
    Posts
    219
    alrighty.
    think of the numbers in the groupings as one big number
    but each part of it
    it would be like an int[3] = { 1 , 0 , 0} Which would be 100
    Addition Multiplication and subtraction are easy enough with basic math you learn early in life but divion is ickier :P
    so 1,0,0 + 2,0 = 120

  4. #4
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,825
    Stop bumping your threads.

    edit: Whoops - my mistake - sorry.

  5. #5
    Wen Resu
    Join Date
    May 2003
    Posts
    219
    Umm i didn'trAdrian Respodned to my thread and responded to him. duno why his post is at top of my First psot <look at times, its wierd>

  6. #6
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,136
    An easy way would be to implement the school long-hand division you learn in elementary school.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Program that prints numbers in columns
    By rayrayj52 in forum C++ Programming
    Replies: 12
    Last Post: 09-20-2004, 02:43 PM
  2. pulling numbers from files....
    By Confuzz in forum C++ Programming
    Replies: 3
    Last Post: 09-07-2004, 07:49 PM
  3. the definition of a mathematical "average" or "mean"
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 7
    Last Post: 12-03-2002, 10:15 AM
  4. Line Numbers in VI and/or Visual C++ :: C++
    By kuphryn in forum C++ Programming
    Replies: 2
    Last Post: 02-10-2002, 09:54 PM
  5. A (complex) question on numbers
    By Unregistered in forum C++ Programming
    Replies: 8
    Last Post: 02-03-2002, 05:38 PM

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