Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #24009

Euclidian Division (was: Moving 2/ from assembler ...)

From anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups comp.lang.forth
Subject Euclidian Division (was: Moving 2/ from assembler ...)
Date 2013-06-28 14:49 +0000
Organization Institut fuer Computersprachen, Technische Universitaet Wien
Message-ID <2013Jun28.164925@mips.complang.tuwien.ac.at> (permalink)
References <51b5de45$0$620$e4fe514c@dreader34.news.xs4all.nl> <2013Jun11.145241@mips.complang.tuwien.ac.at> <525c52fd-6658-485f-b409-c5534442ba64@2g2000yqr.googlegroups.com> <2013Jun17.180438@mips.complang.tuwien.ac.at> <pe6dnfJTF58i4SLMnZ2dnUVZ_v2dnZ2d@supernews.com>

Show all headers | View raw


Andrew Haley <andrew29@littlepinkcloud.invalid> writes:
>Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
>> Sieur de Bienville <morrimichael@gmail.com> writes:
>>>Out of curiosity, aside from the fact that the standard
>>>mandates either floored or symmetric, is there any reason why /
>>>couldn't be euclidian?
>> 
>> What do you mean by that?
>
>https://biblio.ugent.be/input/download?func=downloadFile&recordOId=314490&fileOId=452146

Which defines Euclidian division to always deliver a remainder r satisfying

0 <= r < |d| (where d is the divisor).

I.e., the sign is never negative.

I have now read the paper, and I don't find the case for this kind of
division convincing.

The application examples are curiosities rather than things I expect
to encounter in the real world: representing numbers in
base-complement with negative base and positive digits is interesting,
but if that's the kind of example he uses as showcase for Euclidian
division, few people will find any benefit from it.  The very
mathematical exposition does not help, either.

Concerning implementation, he writes that only a sign check on the
divisor is required to handle the difference between Euclidian and
floored division.  So there is no more direct/efficient implementation
around (or the author has not thought about it).

- anton
-- 
M. Anton Ertl  http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
     New standard: http://www.forth200x.org/forth200x.html
   EuroForth 2013: http://www.euroforth.org/ef13/

Back to comp.lang.forth | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Re: Moving 2/ from assembler to loadable extension Sieur de Bienville <morrimichael@gmail.com> - 2013-06-15 21:21 -0700
  Re: Moving 2/ from assembler to loadable extension Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-06-16 09:41 -0500
    Re: Moving 2/ from assembler to loadable extension Bernd Paysan <bernd.paysan@gmx.de> - 2013-06-16 22:50 +0200
      Re: Moving 2/ from assembler to loadable extension Coos Haak <chforth@hccnet.nl> - 2013-06-17 01:21 +0200
        Re: Moving 2/ from assembler to loadable extension Bernd Paysan <bernd.paysan@gmx.de> - 2013-06-17 13:51 +0200
          Re: Moving 2/ from assembler to loadable extension Coos Haak <chforth@hccnet.nl> - 2013-06-17 17:04 +0200
            Re: Moving 2/ from assembler to loadable extension Coos Haak <chforth@hccnet.nl> - 2013-06-17 17:07 +0200
            Re: Moving 2/ from assembler to loadable extension Bernd Paysan <bernd.paysan@gmx.de> - 2013-06-18 00:49 +0200
              Re: Moving 2/ from assembler to loadable extension anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-06-18 07:41 +0000
                Re: Moving 2/ from assembler to loadable extension "Elizabeth D. Rather" <erather@forth.com> - 2013-06-17 22:11 -1000
            Re: Moving 2/ from assembler to loadable extension Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-06-18 04:13 -0500
              Re: Moving 2/ from assembler to loadable extension Coos Haak <chforth@hccnet.nl> - 2013-06-18 13:37 +0200
                Re: Moving 2/ from assembler to loadable extension Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-06-18 09:42 -0500
              Re: Moving 2/ from assembler to loadable extension anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-06-18 15:51 +0000
                Re: Moving 2/ from assembler to loadable extension Coos Haak <chforth@hccnet.nl> - 2013-06-18 22:52 +0200
                Re: Moving 2/ from assembler to loadable extension albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-06-19 00:12 +0000
          Re: Moving 2/ from assembler to loadable extension albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-06-17 19:55 +0000
  Re: Moving 2/ from assembler to loadable extension anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-06-17 16:04 +0000
    Re: Moving 2/ from assembler to loadable extension Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-06-17 16:16 -0500
      Re: Moving 2/ from assembler to loadable extension albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-06-17 22:59 +0000
      Euclidian division (was: Moving 2/ from assembler ...) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-06-18 07:49 +0000
      Re: Moving 2/ from assembler to loadable extension rickman <gnuarm@gmail.com> - 2013-06-18 17:29 -0400
        Re: Moving 2/ from assembler to loadable extension Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-06-18 18:18 -0500
          Re: Moving 2/ from assembler to loadable extension rickman <gnuarm@gmail.com> - 2013-06-18 19:47 -0400
        Re: Moving 2/ from assembler to loadable extension albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-06-19 00:16 +0000
        Re: Moving 2/ from assembler to loadable extension Bernd Paysan <bernd.paysan@gmx.de> - 2013-06-19 15:09 +0200
          Re: Moving 2/ from assembler to loadable extension rickman <gnuarm@gmail.com> - 2013-06-19 17:55 -0400
      Euclidian Division (was: Moving 2/ from assembler ...) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-06-28 14:49 +0000
        Re: Euclidian Division Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-06-28 11:20 -0500
          Re: Euclidian Division Michael Morris <morrimichael@gmail.com> - 2013-07-08 00:27 -0500
  Re: Moving 2/ from assembler to loadable extension Marc Olschok <nobody@nowhere.invalid> - 2013-06-19 23:11 +0000

csiph-web