15,964,187 members
Home / Discussions / Algorithms

Algorithms

 Re: formulate an algorithm Gerry Schmitz14-Dec-20 11:37 Gerry Schmitz 14-Dec-20 11:37
 Re: formulate an algorithm Patrice T14-Dec-20 12:38 Patrice T 14-Dec-20 12:38
 Re: formulate an algorithm Member 1525570320-Jun-21 20:01 Member 15255703 20-Jun-21 20:01
 Problem in c language Member 150165689-Dec-20 3:16 Member 15016568 9-Dec-20 3:16
 Re: Problem in c language Richard Deeming9-Dec-20 3:43 Richard Deeming 9-Dec-20 3:43
 Re: Problem in c language CHill609-Dec-20 3:44 CHill60 9-Dec-20 3:44
 Re: Problem in c language Serhii Oleksenko15-May-21 1:38 Serhii Oleksenko 15-May-21 1:38
 Stamp circular trade Shir Gans29-Nov-20 6:25 Shir Gans 29-Nov-20 6:25
 Re: Stamp circular trade Gerry Schmitz29-Nov-20 18:40 Gerry Schmitz 29-Nov-20 18:40
 Re: Stamp circular trade Mircea Neacsu6-Dec-20 5:45 Mircea Neacsu 6-Dec-20 5:45
 Re: Stamp circular trade Shir Gans6-Dec-20 7:51 Shir Gans 6-Dec-20 7:51
 Given an array x, get the array y from a data set of arrays which has the smallest distance to x Member 1499380315-Nov-20 17:17 Member 14993803 15-Nov-20 17:17
 CLOSED AlgoHelp13-Nov-20 23:31 AlgoHelp 13-Nov-20 23:31
 Re: How to determine if 2 labelled graphs are identical? Greg Utas14-Nov-20 1:48 Greg Utas 14-Nov-20 1:48
 Re: How to determine if 2 labelled graphs are identical? Greg Utas14-Nov-20 3:04 Greg Utas 14-Nov-20 3:04
 CLOSED AlgoHelp14-Nov-20 3:49 AlgoHelp 14-Nov-20 3:49
 Re: How to determine if 2 labelled graphs are identical? Greg Utas14-Nov-20 4:03 Greg Utas 14-Nov-20 4:03
 CLOSED AlgoHelp14-Nov-20 4:24 AlgoHelp 14-Nov-20 4:24
 Re: How to determine if 2 labelled graphs are identical? Greg Utas14-Nov-20 5:41 Greg Utas 14-Nov-20 5:41
 Re: How to determine if 2 labelled graphs are identical? Greg Utas15-Nov-20 1:27 Greg Utas 15-Nov-20 1:27
 Long Division / Assembly Language Style C-P-User-313-Oct-20 4:34 C-P-User-3 13-Oct-20 4:34
 Re: Long Division / Assembly Language Style Richard Deeming13-Oct-20 4:53 Richard Deeming 13-Oct-20 4:53
 Re: Long Division / Assembly Language Style harold aptroot13-Oct-20 5:31 harold aptroot 13-Oct-20 5:31
 Re: Long Division / Assembly Language Style trønderen13-Oct-20 6:25 trønderen 13-Oct-20 6:25
 Have you considered table lookup? No smiley ... In the days when a CPU filled a rack of boards, and the ALU (Arithmetic/Logic Unit) alone was a least one board, maybe more, there was a machine that did that, although for floating point rather than integer. The most significant bits of the mantissas (always kept normalized, with a hidden MSB) were used as indexes into a huge 2D table in ROM, giving the 11 most significant bits. From that, a Newton iteration was done, doubling the precision for each iteration. The entire iteration was done in hardware: The initial lookup took one clock cycle, each iteration took an extra clock cycle (two for single precision, four for double precision). The final normalization of the result took yet another clock cycle. This FP divide was so fast that the CPU didn't have any integer divide logic. It was faster to convert the integers to 64 bit FP, do the division and convert back. The FP logic alone was a circuit board about A3 size (i.e. twice the size of a standard typewriter paper) packed with chips. For all I know, maybe modern CPUs use the same technique today. In the late 1970s, it was so remarkable that the design was presented in internationally recognized professional magazines. If I were to write a division function for arbitrary length integers (or arbitrary precision float), I would consider seriously something in this direction. If the machine provides a division instruction, you can use that to obtain the first 'n' bits, rather than using a huge lookup table.
 Re: Long Division / Assembly Language Style Greg Utas13-Oct-20 12:04 Greg Utas 13-Oct-20 12:04
 Last Visit: 31-Dec-99 18:00     Last Update: 10-Aug-24 15:49 Refresh ᐊ Prev1...891011121314151617 Next ᐅ