Loading ...
Sorry, an error occurred while loading the content.

double-->single divide?

Expand Messages
  • WarrenS
    Related question: If we have two 64-bit unsigned integers a,b and wish to divide the double-length a*2^64 + b by a single 64-bit unsigned integer c to get
    Message 1 of 7 , Jan 14, 2012
    View Source
    • 0 Attachment
      Related question:

      If we have two 64-bit unsigned integers a,b and wish to divide the
      double-length
      a*2^64 + b
      by a single 64-bit unsigned integer c to get single-length
      quotient=q and remainder=r...
      how do we do it using hardware?

      And what happens if the quotient q does not fit in a single-length?
    • Warren Smith
      sorry, I m not much of a programmer. Last question re multiply, got a nice answer from Brennan saying how to within C program, to call the assembler to do the
      Message 2 of 7 , Jan 14, 2012
      View Source
      • 0 Attachment
        sorry, I'm not much of a programmer. Last question re multiply, got a nice
        answer from Brennan saying how to within C program, to call the assembler
        to do the job.

        I assume there is similar answer here.

        You did that, but did not explain how to do it in C. In C you need to
        speak both C and assembler and understand how to get them to talk, but yes.

        Really if the C compiler writers had a smidgen of brains, they'd have
        supplied a hook so that everybody could easily do these things without
        needing to deal with assembler themselves.


        [Non-text portions of this message have been removed]
      • Paul Leyland
        ... What kind of hardware would you like to use? It s pretty easy to do it with almost any FPGA but if you want an ASIC it s likely to cost you serious money.
        Message 3 of 7 , Jan 14, 2012
        View Source
        • 0 Attachment
          > how do we do it using hardware?

          What kind of hardware would you like to use? It's pretty easy to do it
          with almost any FPGA but if you want an ASIC it's likely to cost you
          serious money. It's also pretty easy to do with an abacus and an
          instruction manual, but likely to be rather slow.

          In other words, what's your real question?

          Paul
        Your message has been successfully submitted and would be delivered to recipients shortly.