Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Distribution of floating-point operations in scientific computing

Distribution of floating-point operations in scientific computing

Scheduled Pinned Locked Moved The Lounge
30 Posts 17 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Daniel Pfeffer

    I am looking for data about the distribution of floating-point operations - what percentage are additions/subtractions, what percentage are multiplications, etc. My Google-fu isn't working today, so I would appreciate any pointers.

    If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack. --Winston Churchill

    CPalliniC Offline
    CPalliniC Offline
    CPallini
    wrote on last edited by
    #2

    Daniel Pfeffer wrote:

    My Google-fu isn't working today, so I would appreciate any pointers.

    double *px, *py;
    float *pf;

    here you are.

    In testa che avete, signor di Ceprano?

    1 Reply Last reply
    0
    • D Daniel Pfeffer

      I am looking for data about the distribution of floating-point operations - what percentage are additions/subtractions, what percentage are multiplications, etc. My Google-fu isn't working today, so I would appreciate any pointers.

      If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack. --Winston Churchill

      D Offline
      D Offline
      dan sh
      wrote on last edited by
      #3

      I can't understand this. You want to know how many addition, subtraction, multiplication and division operations are performed in the World?

      "It is easy to decipher extraterrestrial signals after deciphering Javascript and VB6 themselves.", ISanti[^]

      OriginalGriffO 1 Reply Last reply
      0
      • D Daniel Pfeffer

        I am looking for data about the distribution of floating-point operations - what percentage are additions/subtractions, what percentage are multiplications, etc. My Google-fu isn't working today, so I would appreciate any pointers.

        If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack. --Winston Churchill

        D Offline
        D Offline
        DaveAuld
        wrote on last edited by
        #4

        Sounds like a title for a PHD thesis....crack on! :-D

        Dave Find Me On:Web|Youtube|Facebook|Twitter|LinkedIn Folding Stats: Team CodeProject

        OriginalGriffO D 2 Replies Last reply
        0
        • D DaveAuld

          Sounds like a title for a PHD thesis....crack on! :-D

          Dave Find Me On:Web|Youtube|Facebook|Twitter|LinkedIn Folding Stats: Team CodeProject

          OriginalGriffO Offline
          OriginalGriffO Offline
          OriginalGriff
          wrote on last edited by
          #5

          I'd need crack to want to read it!

          Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

          "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
          "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

          D 1 Reply Last reply
          0
          • D dan sh

            I can't understand this. You want to know how many addition, subtraction, multiplication and division operations are performed in the World?

            "It is easy to decipher extraterrestrial signals after deciphering Javascript and VB6 themselves.", ISanti[^]

            OriginalGriffO Offline
            OriginalGriffO Offline
            OriginalGriff
            wrote on last edited by
            #6

            42 The time unit is arbitrary.

            Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

            "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
            "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

            1 Reply Last reply
            0
            • OriginalGriffO OriginalGriff

              I'd need crack to want to read it!

              Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

              D Offline
              D Offline
              DaveAuld
              wrote on last edited by
              #7

              Is was on the list to do, but it fell through the cracks.... :rolleyes:

              Dave Find Me On:Web|Youtube|Facebook|Twitter|LinkedIn Folding Stats: Team CodeProject

              1 Reply Last reply
              0
              • D Daniel Pfeffer

                I am looking for data about the distribution of floating-point operations - what percentage are additions/subtractions, what percentage are multiplications, etc. My Google-fu isn't working today, so I would appreciate any pointers.

                If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack. --Winston Churchill

                Kornfeld Eliyahu PeterK Offline
                Kornfeld Eliyahu PeterK Offline
                Kornfeld Eliyahu Peter
                wrote on last edited by
                #8

                Are you looking for exact values (measured values) or statistics? For statistical purposes it is 25% each :-)

                Skipper: We'll fix it. Alex: Fix it? How you gonna fix this? Skipper: Grit, spit and a whole lotta duct tape.

                "It never ceases to amaze me that a spacecraft launched in 1977 can be fixed remotely from Earth." ― Brian Cox

                D 1 Reply Last reply
                0
                • D Daniel Pfeffer

                  I am looking for data about the distribution of floating-point operations - what percentage are additions/subtractions, what percentage are multiplications, etc. My Google-fu isn't working today, so I would appreciate any pointers.

                  If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack. --Winston Churchill

                  J Offline
                  J Offline
                  Jochen Arndt
                  wrote on last edited by
                  #9

                  This can't be answered since FMA (Multiply–accumulate operation - Wikipedia[^]) has been introduced because it would require to know the distribution of zero FMA arguments.

                  1 Reply Last reply
                  0
                  • D DaveAuld

                    Sounds like a title for a PHD thesis....crack on! :-D

                    Dave Find Me On:Web|Youtube|Facebook|Twitter|LinkedIn Folding Stats: Team CodeProject

                    D Offline
                    D Offline
                    Daniel Pfeffer
                    wrote on last edited by
                    #10

                    I remember reading that someone had performed such an analysis, but I can't find any pointers to it. The idea was that additions/subtractions are more common than multiplications, which in turn are much more common than divisions/square root. This implies that optimizing the less common operations is likely to give a lower return than optimizing the more common operations. As I said, my Google-fu is non-functional today. :(

                    If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack. --Winston Churchill

                    J O 2 Replies Last reply
                    0
                    • Kornfeld Eliyahu PeterK Kornfeld Eliyahu Peter

                      Are you looking for exact values (measured values) or statistics? For statistical purposes it is 25% each :-)

                      Skipper: We'll fix it. Alex: Fix it? How you gonna fix this? Skipper: Grit, spit and a whole lotta duct tape.

                      D Offline
                      D Offline
                      Daniel Pfeffer
                      wrote on last edited by
                      #11

                      Kornfeld Eliyahu Peter wrote:

                      For statistical purposes it is 25% each :)

                      Actually, it isn't. A review of floating-point programs that I have written shows that addition/subtraction is more common than multiplication, and these are much more common than division/square root. I am writing various floating-point libraries, and would like this information so I can know where to spend my optimization time.

                      If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack. --Winston Churchill

                      1 Reply Last reply
                      0
                      • D Daniel Pfeffer

                        I am looking for data about the distribution of floating-point operations - what percentage are additions/subtractions, what percentage are multiplications, etc. My Google-fu isn't working today, so I would appreciate any pointers.

                        If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack. --Winston Churchill

                        C Offline
                        C Offline
                        Chris C B
                        wrote on last edited by
                        #12

                        Looks to me that every body is wrong. There are clearly more zeros than ones. Each byte is packed with leading zeros. The ones are big-time losers. QED. :laugh:

                        J 1 Reply Last reply
                        0
                        • C Chris C B

                          Looks to me that every body is wrong. There are clearly more zeros than ones. Each byte is packed with leading zeros. The ones are big-time losers. QED. :laugh:

                          J Offline
                          J Offline
                          Jochen Arndt
                          wrote on last edited by
                          #13

                          Wrong thread?

                          C M 2 Replies Last reply
                          0
                          • J Jochen Arndt

                            Wrong thread?

                            C Offline
                            C Offline
                            Chris C B
                            wrote on last edited by
                            #14

                            Woops! Yes, it should be the thread below. :-O You will understand my difficulty when you see my next thread. :laugh:

                            D 1 Reply Last reply
                            0
                            • D Daniel Pfeffer

                              I am looking for data about the distribution of floating-point operations - what percentage are additions/subtractions, what percentage are multiplications, etc. My Google-fu isn't working today, so I would appreciate any pointers.

                              If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack. --Winston Churchill

                              R Offline
                              R Offline
                              Rage
                              wrote on last edited by
                              #15

                              What for ?

                              Do not escape reality : improve reality !

                              D 1 Reply Last reply
                              0
                              • R Rage

                                What for ?

                                Do not escape reality : improve reality !

                                D Offline
                                D Offline
                                Daniel Pfeffer
                                wrote on last edited by
                                #16

                                I'm writing a floating-point package in C++ that provides: 1. A full implementation of the binary part of the IEEE-754-2008 Standard for Floating-Point Arithmetic (single-, double- and quad-precision) 2. Implementation of higher-precision formats, compatible with the Standard (up to binary1024). I have a basic implementation written using the "standard" algorithms, and would like some idea of where to invest time on improvements. Obviously, spending a lot of time on an operation that is rarely executed is not the best use of my time... :)

                                If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack. --Winston Churchill

                                J E 2 Replies Last reply
                                0
                                • C Chris C B

                                  Woops! Yes, it should be the thread below. :-O You will understand my difficulty when you see my next thread. :laugh:

                                  D Offline
                                  D Offline
                                  DaveAuld
                                  wrote on last edited by
                                  #17

                                  Not quite, the thread below the thread below... take a step away from keyboard......

                                  Dave Find Me On:Web|Youtube|Facebook|Twitter|LinkedIn Folding Stats: Team CodeProject

                                  C 1 Reply Last reply
                                  0
                                  • D Daniel Pfeffer

                                    I'm writing a floating-point package in C++ that provides: 1. A full implementation of the binary part of the IEEE-754-2008 Standard for Floating-Point Arithmetic (single-, double- and quad-precision) 2. Implementation of higher-precision formats, compatible with the Standard (up to binary1024). I have a basic implementation written using the "standard" algorithms, and would like some idea of where to invest time on improvements. Obviously, spending a lot of time on an operation that is rarely executed is not the best use of my time... :)

                                    If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack. --Winston Churchill

                                    J Offline
                                    J Offline
                                    Jochen Arndt
                                    wrote on last edited by
                                    #18

                                    Daniel Pfeffer wrote:

                                    I'm writing a floating-point package in C++

                                    That was not clear from your original question. So I will dig in here: I would not think about that. All basic operations will be used often (more or less) and should be therefore optimised as far as possible. Because division is the slowest operation it might be the first candidate even used probably less than the other operations. When a calculation uses divisions, a better implementation would probably reduce the overall calculation time by a greater factor than without division optimsation but with addition and multiplication optimisation.

                                    D 1 Reply Last reply
                                    0
                                    • D DaveAuld

                                      Not quite, the thread below the thread below... take a step away from keyboard......

                                      Dave Find Me On:Web|Youtube|Facebook|Twitter|LinkedIn Folding Stats: Team CodeProject

                                      C Offline
                                      C Offline
                                      Chris C B
                                      wrote on last edited by
                                      #19

                                      That isn't a thread - it's just a single post. ;P :-\ Anyway, I don't use a keyboard, I just use my psychic powers to make the words appear on the screen. :laugh:

                                      1 Reply Last reply
                                      0
                                      • J Jochen Arndt

                                        Daniel Pfeffer wrote:

                                        I'm writing a floating-point package in C++

                                        That was not clear from your original question. So I will dig in here: I would not think about that. All basic operations will be used often (more or less) and should be therefore optimised as far as possible. Because division is the slowest operation it might be the first candidate even used probably less than the other operations. When a calculation uses divisions, a better implementation would probably reduce the overall calculation time by a greater factor than without division optimsation but with addition and multiplication optimisation.

                                        D Offline
                                        D Offline
                                        Daniel Pfeffer
                                        wrote on last edited by
                                        #20

                                        OK, that makes sense. Thanks.

                                        If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack. --Winston Churchill

                                        J 1 Reply Last reply
                                        0
                                        • D Daniel Pfeffer

                                          OK, that makes sense. Thanks.

                                          If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack. --Winston Churchill

                                          J Offline
                                          J Offline
                                          Jochen Arndt
                                          wrote on last edited by
                                          #21

                                          You are welcome. It is an interesting and challenging topic. Did you plan to publish it as an article?

                                          D 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups