Timeline for Gray codes addition
Current License: CC BY-SA 3.0
        6 events
    
    | when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Nov 15, 2016 at 6:42 | history | edited | greybeard | CC BY-SA 3.0 | 
        
            
             
                
                    added "shift-left variant", improved type mess 
                
             
        
     | 
| Nov 14, 2016 at 23:03 | comment | added | greybeard | 
        
            
    (Just be cautioned that loopless may yield no clear advantage - neither in readability, nor in speed.) One excuse for trying to "reverse the shift-direction" in "the least-to-most significant bit of shorter operand-loop" (btw.: the handling of the remaining bits looks better in that variant) was to see if something like reversing the shift direction in generating parity (accumulating the parity in the most/more significant bit/s) would allow to add reflected binary coded integers faster than proportional to the number of bits. Compare to bin2gray for improved confusion.
        
     | 
|
| Nov 14, 2016 at 21:36 | comment | added | Morwenn | Concerning the improved parity algorithm, I wrote an article some time ago which explained the tricks step by step (still linked to Gray codes). I still prefer type-agnostic solutions for the bit-trick algorithms though. | |
| Nov 14, 2016 at 21:35 | comment | added | Morwenn | Eh, I was cleaning that code a few days ago and it occured to me that it was indeed probably possible to get rid of the last loop. Looks like I won't have to search for the solution by myself, thanks :) | |
| Nov 14, 2016 at 12:26 | comment | added | greybeard | 
        
            
    Parts not being modern C++ (feel invited to improve) has a history - I just today discovered "my" C++-environment accepts C++11 - if told using a flag…
        
     | 
|
| Nov 14, 2016 at 12:23 | history | answered | greybeard | CC BY-SA 3.0 |