Click here to Skip to main content
15,868,141 members
Home / Discussions / Algorithms
   

Algorithms

 
AnswerRe: Raytracing render quality Pin
Richard MacCutchan31-Jul-11 22:53
mveRichard MacCutchan31-Jul-11 22:53 
GeneralRe: Raytracing render quality Pin
Thomas.D Williams31-Jul-11 23:44
Thomas.D Williams31-Jul-11 23:44 
GeneralRe: Raytracing render quality Pin
David19875-Aug-11 1:07
David19875-Aug-11 1:07 
GeneralRe: Raytracing render quality Pin
Thomas.D Williams5-Aug-11 5:00
Thomas.D Williams5-Aug-11 5:00 
QuestionUnsigned Integer Mod/Remainder Pin
John Paul Walker28-Jul-11 13:11
John Paul Walker28-Jul-11 13: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 19:18
professionalDr.Walt Fair, PE28-Jul-11 19:18 
GeneralRe: Unsigned Integer Mod/Remainder Pin
John Paul Walker29-Jul-11 13:40
John Paul Walker29-Jul-11 13:40 
GeneralRe: Unsigned Integer Mod/Remainder Pin
Dr.Walt Fair, PE30-Jul-11 17:23
professionalDr.Walt Fair, PE30-Jul-11 17:23 
AnswerRe: Unsigned Integer Mod/Remainder Pin
David198729-Jul-11 20:41
David198729-Jul-11 20:41 
QuestionHow to find estimated time remaining ? Pin
yogish29326-Jul-11 0:53
yogish29326-Jul-11 0:53 
AnswerRe: How to find estimated time remaining ? Pin
Richard MacCutchan26-Jul-11 3:00
mveRichard MacCutchan26-Jul-11 3:00 
GeneralRe: How to find estimated time remaining ? Pin
yogish29326-Jul-11 4:27
yogish29326-Jul-11 4:27 
GeneralRe: How to find estimated time remaining ? Pin
Richard MacCutchan26-Jul-11 4:46
mveRichard MacCutchan26-Jul-11 4:46 
QuestionPID control algorithms Pin
Wjousts21-Jul-11 8:47
Wjousts21-Jul-11 8:47 
AnswerRe: PID control algorithms Pin
Roger Wright21-Jul-11 12:12
professionalRoger Wright21-Jul-11 12:12 
GeneralRe: PID control algorithms Pin
Wjousts21-Jul-11 13:45
Wjousts21-Jul-11 13:45 
AnswerRe: PID control algorithms Pin
Bernhard Hiller31-Jul-11 19:42
Bernhard Hiller31-Jul-11 19:42 
AnswerRe: PID control algorithms Pin
CPallini5-Aug-11 4:15
mveCPallini5-Aug-11 4:15 
QuestionFind an emtpy entry in a 3x3 grid? Pin
Neo1010118-Jul-11 4:31
Neo1010118-Jul-11 4:31 
AnswerRe: Find an emtpy entry in a 3x3 grid? Pin
BobJanova18-Jul-11 4:49
BobJanova18-Jul-11 4:49 
GeneralRe: Find an emtpy entry in a 3x3 grid? Pin
David198718-Jul-11 4:54
David198718-Jul-11 4:54 
GeneralRe: Find an emtpy entry in a 3x3 grid? Pin
Neo1010118-Jul-11 6:24
Neo1010118-Jul-11 6:24 
GeneralRe: Find an emtpy entry in a 3x3 grid? Pin
David198718-Jul-11 6:31
David198718-Jul-11 6:31 
GeneralRe: Find an emtpy entry in a 3x3 grid? Pin
Neo1010118-Jul-11 6:47
Neo1010118-Jul-11 6:47 
GeneralRe: Find an emtpy entry in a 3x3 grid? Pin
David198718-Jul-11 7:03
David198718-Jul-11 7:03 

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.