Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #57981
| From | Andrew Haley <andrew29@littlepinkcloud.invalid> |
|---|---|
| Subject | Re: mixed double and single signed division |
| Newsgroups | comp.lang.forth |
| References | (3 earlier) <raKdnb7em9WBpGDFnZ2dnUU7-LXNnZ2d@supernews.com> <odjigo$18j3$1@gioia.aioe.org> <aYmdndPdrNkU0mDFnZ2dnUU7-YXNnZ2d@supernews.com> <87a876tuyt.fsf@nightsong.com> <ioCdncMS6-kX_mDFnZ2dnUU7-b_NnZ2d@supernews.com> |
| Message-ID | <gridnS75ffb6VGDFnZ2dnUU7-N_NnZ2d@supernews.com> (permalink) |
| Date | 2017-04-24 04:46 -0500 |
Elizabeth D. Rather <erather@forth.com> wrote: > On 4/23/17 4:12 PM, Paul Rubin wrote: >> "Elizabeth D. Rather" <erather@forth.com> writes: >>> Which ones have you encountered in your work? >> >> This happens all the time. Like it's currently April (the 4th month of >> the year) and suppose you want to know what month it was 6 months ago. >> With floored mod, (4-6) mod 12 is 10, so it was October. With signed >> mod, it was the month -2, which is less informative. > > If I wanted to know that, there are many easier ways than computing it > that way. I'm looking for a real-world example, preferably one that > you've encountered. The classic one is an angle of rotation, which can lead or lag and sometimes even exceed 360 degrees, and I have encountered that in real life. But if the dividend is negative and all you want is the remainder, all you have to do is add a multiple of the divisor into the dividend. The easiest way to do that is to add the dividend into the high cell of the divisor and then do the division. I believe that the argument circa 1981 was about whether MOD words which can to handle negative dividends should be part of the standard word set, rather that whether they were occasionally useful. On the other hand, I am happy to maintain that calculating the remainder of anything mod N, N < 0 makes no sense. Andrew.
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
mixed double and single signed division krishna.myneni@ccreweb.org - 2017-04-22 08:21 -0700
Re: mixed double and single signed division NN <november.nihal@gmail.com> - 2017-04-22 09:14 -0700
Re: mixed double and single signed division NN <november.nihal@gmail.com> - 2017-04-22 09:22 -0700
Re: mixed double and single signed division Coos Haak <htrofhc@gmail.com> - 2017-04-22 23:31 +0200
Re: mixed double and single signed division krishna.myneni@ccreweb.org - 2017-04-23 06:44 -0700
Re: mixed double and single signed division hughaguilar96@gmail.com - 2017-04-23 13:24 -0700
Re: mixed double and single signed division krishna.myneni@ccreweb.org - 2017-04-23 06:41 -0700
Re: mixed double and single signed division krishna.myneni@ccreweb.org - 2017-04-23 13:29 -0700
Re: mixed double and single signed division Andrew Haley <andrew29@littlepinkcloud.invalid> - 2017-04-22 11:40 -0500
Re: mixed double and single signed division krishna.myneni@ccreweb.org - 2017-04-23 06:52 -0700
Re: mixed double and single signed division "HAA" <someone@microsoft.com> - 2017-04-23 13:02 +1000
Re: mixed double and single signed division "Elizabeth D. Rather" <erather@forth.com> - 2017-04-22 17:58 -1000
Re: mixed double and single signed division krishna.myneni@ccreweb.org - 2017-04-23 13:36 -0700
Re: mixed double and single signed division krishna.myneni@ccreweb.org - 2017-04-23 16:33 -0700
Re: mixed double and single signed division anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-04-24 13:23 +0000
Re: mixed double and single signed division krishna.myneni@ccreweb.org - 2017-04-24 18:49 -0700
Re: mixed double and single signed division anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-04-24 13:12 +0000
Re: mixed double and single signed division krishna.myneni@ccreweb.org - 2017-04-24 18:35 -0700
Re: mixed double and single signed division "Elizabeth D. Rather" <erather@forth.com> - 2017-04-24 15:52 -1000
Re: mixed double and single signed division krishna.myneni@ccreweb.org - 2017-04-25 02:18 -0700
Re: mixed double and single signed division Paul Rubin <no.email@nospam.invalid> - 2017-04-25 02:25 -0700
Re: mixed double and single signed division anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-04-25 11:30 +0000
Re: mixed double and single signed division "Elizabeth D. Rather" <erather@forth.com> - 2017-04-25 08:08 -1000
Re: mixed double and single signed division anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-04-26 14:48 +0000
Re: mixed double and single signed division anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-04-25 08:40 +0000
Re: mixed double and single signed division krishna.myneni@ccreweb.org - 2017-04-25 02:25 -0700
Re: mixed double and single signed division krishna.myneni@ccreweb.org - 2017-04-25 03:00 -0700
Re: mixed double and single signed division anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-04-25 11:37 +0000
Re: mixed double and single signed division krishna.myneni@ccreweb.org - 2017-04-25 05:27 -0700
Re: mixed double and single signed division anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-04-25 13:34 +0000
Re: mixed double and single signed division krishna.myneni@ccreweb.org - 2017-04-25 15:29 -0700
Re: mixed double and single signed division "HAA" <someone@microsoft.com> - 2017-04-27 14:02 +1000
Re: mixed double and single signed division krishna.myneni@ccreweb.org - 2017-04-27 16:00 -0700
Re: mixed double and single signed division "Elizabeth D. Rather" <erather@forth.com> - 2017-04-27 19:20 -1000
Re: mixed double and single signed division "HAA" <someone@microsoft.com> - 2017-04-28 22:41 +1000
Re: mixed double and single signed division Coos Haak <htrofhc@gmail.com> - 2017-04-25 15:32 +0200
Re: mixed double and single signed division krishna.myneni@ccreweb.org - 2017-04-25 15:22 -0700
Re: mixed double and single signed division krishna.myneni@ccreweb.org - 2017-04-23 06:55 -0700
Re: mixed double and single signed division "Elizabeth D. Rather" <erather@forth.com> - 2017-04-23 13:30 -1000
Re: mixed double and single signed division krishna.myneni@ccreweb.org - 2017-04-23 16:45 -0700
Re: mixed double and single signed division "HAA" <someone@microsoft.com> - 2017-04-24 10:56 +1000
Re: mixed double and single signed division "Elizabeth D. Rather" <erather@forth.com> - 2017-04-23 15:06 -1000
Re: mixed double and single signed division hughaguilar96@gmail.com - 2017-04-23 19:10 -0700
Re: mixed double and single signed division Paul Rubin <no.email@nospam.invalid> - 2017-04-23 19:12 -0700
Re: mixed double and single signed division "Elizabeth D. Rather" <erather@forth.com> - 2017-04-23 16:31 -1000
Re: mixed double and single signed division hughaguilar96@gmail.com - 2017-04-23 21:17 -0700
Re: mixed double and single signed division Paul Rubin <no.email@nospam.invalid> - 2017-04-23 21:47 -0700
Re: mixed double and single signed division hughaguilar96@gmail.com - 2017-04-23 22:58 -0700
Re: mixed double and single signed division hughaguilar96@gmail.com - 2017-04-23 23:22 -0700
Re: mixed double and single signed division Andrew Haley <andrew29@littlepinkcloud.invalid> - 2017-04-24 04:46 -0500
Re: mixed double and single signed division "HAA" <someone@microsoft.com> - 2017-04-24 12:59 +1000
Re: mixed double and single signed division "Elizabeth D. Rather" <erather@forth.com> - 2017-04-23 18:03 -1000
Re: mixed double and single signed division hughaguilar96@gmail.com - 2017-04-23 21:22 -0700
Re: mixed double and single signed division "HAA" <someone@microsoft.com> - 2017-04-25 12:53 +1000
Re: mixed double and single signed division "Elizabeth D. Rather" <erather@forth.com> - 2017-04-24 21:55 -1000
Re: mixed double and single signed division "HAA" <someone@microsoft.com> - 2017-04-25 20:00 +1000
csiph-web