| Deutsch English Français Italiano |
|
<c3g8ujtv9lqqlf5d3go718ao0sh6d8ujfq@4ax.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Rosario19 <Ros@invalid.invalid> Newsgroups: comp.lang.c Subject: Re: Fast division (was Re: Suggested method for returning a string from a C program?) Date: Wed, 26 Mar 2025 19:01:12 +0100 Organization: A noiseless patient Spider Lines: 20 Message-ID: <c3g8ujtv9lqqlf5d3go718ao0sh6d8ujfq@4ax.com> References: <vrdhok$47cb$2@dont-email.me> <20250319115550.0000676f@yahoo.com> <vreuj1$1asii$4@dont-email.me> <vreve4$19klp$2@dont-email.me> <20250319201903.00005452@yahoo.com> <86r02roqdq.fsf@linuxsc.com> <vrh1br$35029$2@dont-email.me> <LRUCP.2$541.0@fx47.iad> <vrh71t$3be42$1@dont-email.me> <vrk8vm$2f4gc$1@paganini.bofh.team> <20250321113316.506@kylheku.com> <vrl6hp$2qg20$1@dont-email.me> <20250321210228.508@kylheku.com> <vrmg7d$2nif7$2@paganini.bofh.team> <vrvjr9$i7gg$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Date: Wed, 26 Mar 2025 19:01:13 +0100 (CET) Injection-Info: dont-email.me; posting-host="d872c668e4185a12311cf9031d5b6ee9"; logging-data="2409527"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/yqPod6fEObfXpW3QgtNnkaKjZAGX3xys=" Cancel-Lock: sha1:vczZ7YVbEO+YuG+nCbkM3uoOYf8= X-Newsreader: Forte Free Agent 1.93/32.576 English (American) Bytes: 2253 On Wed, 26 Mar 2025 02:04:40 +0100, Janis Papanagnou wrote: >On 22.03.2025 15:07, Waldek Hebisch wrote: >>=20 >> Actually, to do fast division of N-bit number by fixed N-bit number >> one need 2N-bit multiplication.=20 pheraps that means a/b where a is in a big set, is more heavy to calculate that a* 1/b where a is in a big set of numbers >I just stumbled across your post and above sentence. Do you mean *one* >multiplication of 2N bit numbers? - Could you please explain that (by >an example, or could you provide a reference)? > >(The reason for my question is that for integer divisions of length N >an old DSP I used required besides shifts effectively N subtractions >to create the result and modulus; it didn't use any multiplications.) > >Janis