Click here to Skip to main content
15,891,033 members
Home / Discussions / Algorithms
   

Algorithms

 
AnswerRe: finding the best algorithm Pin
Alan Balkany22-Oct-12 5:00
Alan Balkany22-Oct-12 5:00 
GeneralRe: finding the best algorithm Pin
speedchandu22-Oct-12 20:12
speedchandu22-Oct-12 20:12 
GeneralRe: finding the best algorithm Pin
_Kel_22-Oct-12 23:36
_Kel_22-Oct-12 23:36 
GeneralRe: finding the best algorithm Pin
AshrafKawarezmey14-Nov-12 4:57
AshrafKawarezmey14-Nov-12 4:57 
AnswerRe: finding the best algorithm Pin
YvesDaoust22-Oct-12 21:41
YvesDaoust22-Oct-12 21:41 
AnswerRe: finding the best algorithm Pin
YvesDaoust22-Oct-12 22:11
YvesDaoust22-Oct-12 22:11 
GeneralRe: finding the best algorithm Pin
Peter_in_27802-Dec-12 14:45
professionalPeter_in_27802-Dec-12 14:45 
GeneralRe: finding the best algorithm Pin
YvesDaoust2-Dec-12 20:59
YvesDaoust2-Dec-12 20:59 
You are quite right, sorry for having mislead you.

This is the kind of "off by one" trap I too easily fall into. When I wrote this code I was indeed unsure in what way to go, and I just satisfied myself when I saw successful tests.

There is indeed no carry propagation here and this could have been avoided by careful proofreading: when the carry is made, it applies to digit Position-1, showing that propagation needs to be done by decreasing indexes.

Mea culpa.

How did you discover the flaw ?
GeneralRe: finding the best algorithm Pin
Peter_in_27802-Dec-12 23:34
professionalPeter_in_27802-Dec-12 23:34 
GeneralRe: finding the best algorithm Pin
YvesDaoust3-Dec-12 0:15
YvesDaoust3-Dec-12 0:15 
GeneralRe: finding the best algorithm Pin
YvesDaoust2-Dec-12 21:40
YvesDaoust2-Dec-12 21:40 
QuestionSplitting up multiple readings... Pin
glennPattonWork39-Oct-12 0:50
professionalglennPattonWork39-Oct-12 0:50 
GeneralRe: Splitting up multiple readings... Pin
harold aptroot9-Oct-12 0:57
harold aptroot9-Oct-12 0:57 
GeneralRe: Splitting up multiple readings... Pin
glennPattonWork39-Oct-12 1:27
professionalglennPattonWork39-Oct-12 1:27 
GeneralRe: Splitting up multiple readings... Pin
harold aptroot9-Oct-12 1:35
harold aptroot9-Oct-12 1:35 
GeneralRe: Splitting up multiple readings... Pin
Pete O'Hanlon9-Oct-12 2:05
mvePete O'Hanlon9-Oct-12 2:05 
GeneralRe: Splitting up multiple readings... Pin
glennPattonWork39-Oct-12 2:36
professionalglennPattonWork39-Oct-12 2:36 
GeneralRe: Splitting up multiple readings... Pin
Pete O'Hanlon9-Oct-12 2:45
mvePete O'Hanlon9-Oct-12 2:45 
GeneralRe: Splitting up multiple readings... Pin
Jochen Arndt9-Oct-12 3:09
professionalJochen Arndt9-Oct-12 3:09 
GeneralRe: Splitting up multiple readings... Pin
glennPattonWork39-Oct-12 4:34
professionalglennPattonWork39-Oct-12 4:34 
GeneralRe: Splitting up multiple readings... Pin
Jochen Arndt9-Oct-12 4:45
professionalJochen Arndt9-Oct-12 4:45 
GeneralRe: Splitting up multiple readings... Pin
glennPattonWork39-Oct-12 5:15
professionalglennPattonWork39-Oct-12 5:15 
GeneralRe: Splitting up multiple readings... Pin
Jochen Arndt9-Oct-12 5:55
professionalJochen Arndt9-Oct-12 5:55 
GeneralRe: Splitting up multiple readings... Pin
glennPattonWork39-Oct-12 4:45
professionalglennPattonWork39-Oct-12 4:45 
GeneralRe: Splitting up multiple readings... Pin
Eddy Vluggen22-Oct-12 6:24
professionalEddy Vluggen22-Oct-12 6:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.