Click here to Skip to main content
15,893,588 members
Home / Discussions / Algorithms
   

Algorithms

 
Questionfinding the best algorithm Pin
speedchandu20-Oct-12 11:32
speedchandu20-Oct-12 11:32 
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 
There is actually a subtle bug in your code. If, on the last pass of your outer loop, one "digit" is == Base - 1 and you carry into it, you never get to carry out of it. If you write your inner loop backwards (or reverse your array), it all comes out in the wash... The point is that multiprecision add/subtract should be done "right to left" so multiplace carry propagation can occur naturally.

A small point, but still important. The one time it bit me, the code was in ROM inside tamper-proof enclosures. A real PITA to fix...

Cheers,
Peter
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012

GeneralRe: finding the best algorithm Pin
YvesDaoust2-Dec-12 20:59
YvesDaoust2-Dec-12 20:59 
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 

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.