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
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?

Similar Discussions: Division Revision
  1. Division for ratios (Replies: 4)