Click here to Skip to main content
15,881,248 members
Home / Discussions / Algorithms
   

Algorithms

 
AnswerRe: Cubic Spline Interpolation Pin
Skippums23-Jul-13 11:57
Skippums23-Jul-13 11:57 
QuestionHow to determine whether change over time is an outlier Pin
GuyThiebaut7-Jul-13 0:02
professionalGuyThiebaut7-Jul-13 0:02 
AnswerRe: How to determine whether change over time is an outlier Pin
Manfred Rudolf Bihy23-Jul-13 11:22
professionalManfred Rudolf Bihy23-Jul-13 11:22 
GeneralRe: How to determine whether change over time is an outlier Pin
GuyThiebaut23-Jul-13 21:55
professionalGuyThiebaut23-Jul-13 21:55 
Questionfast division algoirthm Pin
khomeyni22-Jun-13 6:01
khomeyni22-Jun-13 6:01 
GeneralRe: fast division algoirthm Pin
harold aptroot22-Jun-13 10:32
harold aptroot22-Jun-13 10:32 
GeneralRe: fast division algoirthm Pin
khomeyni22-Jun-13 23:19
khomeyni22-Jun-13 23:19 
GeneralRe: fast division algoirthm Pin
harold aptroot23-Jun-13 1:42
harold aptroot23-Jun-13 1:42 
So, you can't add a hardware divider to the FPGA then? Or fast reciprocal support?
Anyway it depends. Does it have fast multiplication? If not, well, that's a problem, you could only implement the slow methods then.
If you have fast multiplication and IEEE floats, you can use the weird trick I linked to in my previous post with a couple of refinement steps. That's really just Newton–Raphson division with a simpler calculation for the initial approximation (but afaik it still only takes 3 refinements for single-precision floats, just like the regular initial approximation). Fast reciprocal support works that way too - give a fast initial approximation (handling the exponent right and getting significant bits from a lookup table, if you get 12 significant bits that way you only need one refinement step for single-precision or, 13 are enough to get 2 steps for double-precision) and optionally have instructions that help implement the refinement step (like AMD's PFRCPIT1 and PFRCPIT2), for example to calculate Y = (1 - D*X) and to calculate X + X * Y.
Even without those tricks Newton–Raphson division is still not bad, with the linear approximation it takes only 4 refinements for double-precision floats, but it also takes some annoying exponent adjustments to get in the right range first (in hardware that wouldn't be half as annoying).
Goldschmidt division is, afaik, roughly equivalent in performance and might have a slightly less complex implementation. It's really the same sort of deal - trickery with the exponent to get in the right range, the "2 - something" estimation trick (which is rearranged in Newton-Raphson division, but it's really the same thing), and doing the refinement step until all the bits are right. It just looks a little different.
GeneralRe: fast division algoirthm Pin
khomeyni2-Jul-13 2:42
khomeyni2-Jul-13 2:42 
GeneralRe: fast division algoirthm Pin
harold aptroot2-Jul-13 3:11
harold aptroot2-Jul-13 3:11 
GeneralRe: fast division algoirthm Pin
khomeyni2-Jul-13 8:58
khomeyni2-Jul-13 8:58 
GeneralRe: fast division algoirthm Pin
harold aptroot2-Jul-13 9:44
harold aptroot2-Jul-13 9:44 
QuestionAlgorithm Sum From Offset To Number Pin
A*****17-Jun-13 12:37
A*****17-Jun-13 12:37 
AnswerRe: Algorithm Sum From Offset To Number Pin
A*****17-Jun-13 17:07
A*****17-Jun-13 17:07 
GeneralRe: Algorithm Sum From Offset To Number Pin
dusty_dex17-Jun-13 23:03
dusty_dex17-Jun-13 23:03 
GeneralRe: Algorithm Sum From Offset To Number[Edited] Pin
A*****18-Jun-13 12:50
A*****18-Jun-13 12:50 
GeneralRe: Algorithm Sum From Offset To Number[Edited] Pin
dusty_dex18-Jun-13 13:20
dusty_dex18-Jun-13 13:20 
GeneralRe: Algorithm Sum From Offset To Number[Edited] Pin
A*****18-Jun-13 13:24
A*****18-Jun-13 13:24 
AnswerRe: Algorithm Sum From Offset To Number Pin
Bernhard Hiller18-Jun-13 20:57
Bernhard Hiller18-Jun-13 20:57 
GeneralRe: Algorithm Sum From Offset To Number Pin
dusty_dex18-Jun-13 22:38
dusty_dex18-Jun-13 22:38 
QuestionWikipedia's comments on Interpolation Search Pin
harold aptroot11-Jun-13 0:59
harold aptroot11-Jun-13 0:59 
AnswerRe: Wikipedia's comments on Interpolation Search Pin
Alan Balkany13-Jun-13 8:27
Alan Balkany13-Jun-13 8:27 
GeneralRe: Wikipedia's comments on Interpolation Search Pin
harold aptroot13-Jun-13 8:59
harold aptroot13-Jun-13 8:59 
Questionalgorithm that finds the m smallest numbers in a list of numbers Pin
demo 29-Jun-13 21:00
demo 29-Jun-13 21:00 
AnswerRe: algorithm that finds the m smallest numbers in a list of numbers Pin
Richard MacCutchan9-Jun-13 21:14
mveRichard MacCutchan9-Jun-13 21:14 

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.