Click here to Skip to main content
15,562,410 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: connection routing algorithm for connecting rectangles with lines ? Pin
Member 41945938-Aug-11 18:57
Member 41945938-Aug-11 18:57 
GeneralRe: connection routing algorithm for connecting rectangles with lines ? Pin
BillWoodruff16-Aug-11 19:36
professionalBillWoodruff16-Aug-11 19:36 
QuestionRaytracing render quality [modified] Pin
Thomas.D Williams31-Jul-11 12:48
Thomas.D Williams31-Jul-11 12:48 
AnswerRe: Raytracing render quality Pin
Richard MacCutchan31-Jul-11 23:53
mveRichard MacCutchan31-Jul-11 23:53 
GeneralRe: Raytracing render quality Pin
Thomas.D Williams1-Aug-11 0:44
Thomas.D Williams1-Aug-11 0:44 
GeneralRe: Raytracing render quality Pin
David19875-Aug-11 2:07
David19875-Aug-11 2:07 
GeneralRe: Raytracing render quality Pin
Thomas.D Williams5-Aug-11 6:00
Thomas.D Williams5-Aug-11 6:00 
QuestionUnsigned Integer Mod/Remainder Pin
John Paul Walker28-Jul-11 14:11
John Paul Walker28-Jul-11 14:11 
Hi Everyone,

I'm working on a 128 bit unsigned integer class (due to Numerics.BigInt being too slow). I've gotten most of the regular arithmetic functions working, but now I'm on the Modulo one. Does anyone know of shortcuts to finding the remainder without having to go through the full division? (Yes, I have googled this for several days, with little progress)

So far the only one I've found is if the divisor is a power of 2, you can use

C#
Remainder = Dividend & (Divisor - 1);


But that's it. Nothing for any other number. So if anyone knows of anything similar, or heck, just a really fast division/mod algorithm, please let me know.

Thanks,
John
AnswerRe: Unsigned Integer Mod/Remainder Pin
Dr.Walt Fair, PE28-Jul-11 20:18
professionalDr.Walt Fair, PE28-Jul-11 20:18 
GeneralRe: Unsigned Integer Mod/Remainder Pin
John Paul Walker29-Jul-11 14:40
John Paul Walker29-Jul-11 14:40 
GeneralRe: Unsigned Integer Mod/Remainder Pin
Dr.Walt Fair, PE30-Jul-11 18:23
professionalDr.Walt Fair, PE30-Jul-11 18:23 
AnswerRe: Unsigned Integer Mod/Remainder Pin
David198729-Jul-11 21:41
David198729-Jul-11 21:41 
QuestionHow to find estimated time remaining ? Pin
yogish29326-Jul-11 1:53
yogish29326-Jul-11 1:53 
AnswerRe: How to find estimated time remaining ? Pin
Richard MacCutchan26-Jul-11 4:00
mveRichard MacCutchan26-Jul-11 4:00 
GeneralRe: How to find estimated time remaining ? Pin
yogish29326-Jul-11 5:27
yogish29326-Jul-11 5:27 
GeneralRe: How to find estimated time remaining ? Pin
Richard MacCutchan26-Jul-11 5:46
mveRichard MacCutchan26-Jul-11 5:46 
QuestionPID control algorithms Pin
Wjousts21-Jul-11 9:47
Wjousts21-Jul-11 9:47 
AnswerRe: PID control algorithms Pin
Roger Wright21-Jul-11 13:12
professionalRoger Wright21-Jul-11 13:12 
GeneralRe: PID control algorithms Pin
Wjousts21-Jul-11 14:45
Wjousts21-Jul-11 14:45 
AnswerRe: PID control algorithms Pin
Bernhard Hiller31-Jul-11 20:42
Bernhard Hiller31-Jul-11 20:42 
AnswerRe: PID control algorithms Pin
CPallini5-Aug-11 5:15
mveCPallini5-Aug-11 5:15 
QuestionFind an emtpy entry in a 3x3 grid? Pin
Neo1010118-Jul-11 5:31
Neo1010118-Jul-11 5:31 
AnswerRe: Find an emtpy entry in a 3x3 grid? Pin
BobJanova18-Jul-11 5:49
BobJanova18-Jul-11 5:49 
GeneralRe: Find an emtpy entry in a 3x3 grid? Pin
David198718-Jul-11 5:54
David198718-Jul-11 5:54 
GeneralRe: Find an emtpy entry in a 3x3 grid? Pin
Neo1010118-Jul-11 7:24
Neo1010118-Jul-11 7: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.