1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Division Revision

  1. Jun 4, 2005 #1
    Guys I need a fast algorithm to perform division with a remainder. It has to be very fast though...
  2. jcsd
  3. Jun 4, 2005 #2
    Something like, x/y could be done like: (where x and y are numbers)


    Then the remainder is: [y*Frac(x/y)]

    That'll be pretty much instant (if you wanna do it on a computer or something)

    If you want to do it with a calculator then just do:

    x/y but disregard the decimals

    Then to work out the remainder just do:

    x/y but disregard the integer before the decimals then multiply them by y

    If you want to do it without a calculator then just do it the old fasioned way :)
    Last edited: Jun 4, 2005
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook