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


Groups > comp.lang.forth > #38487

Re: Writing SM/REM and FM/MOD

From anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups comp.lang.forth
Subject Re: Writing SM/REM and FM/MOD
Date 2015-04-22 10:37 +0000
Organization Institut fuer Computersprachen, Technische Universitaet Wien
Message-ID <2015Apr22.123737@mips.complang.tuwien.ac.at> (permalink)
References <8a492bc8-9c9e-465b-95e4-7d9b986ff583@googlegroups.com> <0c85146c-a11f-41f3-bbf2-c704cf5adfe1@googlegroups.com> <55376e9a$0$2940$e4fe514c@news2.news.xs4all.nl> <86zj60h3u5.fsf@vps34351.public.cloudvps.com>

Show all headers | View raw


Lars Brinkhoff <lars.spam@nocrew.org> writes:
>For extra credit, implement UM/MOD in terms of U/MOD (single precision).

There are multiple ways to implement UM/MOD if you don't have an
instruction for it, depending on which instructions you have.  I
looked at that some time ago when we reimplemented division for Gforth
(for speed), and eventually settled for a restoring shift-and-subtract
algorithm for Alpha, and 1300+ lines of impenetrable C code (taken
from gcc) for other targets.  The shift-and-subtract algorithm may
also be faster for other targets without division instructions, like
ARM.

So your extra task is not a simple one.

- 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 2014: http://www.euroforth.org/ef14/

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


Thread

Writing SM/REM and FM/MOD Julian Fondren <julian.fondren@gmail.com> - 2015-04-21 13:23 -0700
  Writing SM/REM and FM/MOD Mark Wills <markwills1970@gmail.com> - 2015-04-21 13:45 -0700
    Writing SM/REM and FM/MOD Mark Wills <markwills1970@gmail.com> - 2015-04-21 13:54 -0700
    Re: Writing SM/REM and FM/MOD Hans Bezemer <the.beez.speaks@gmail.com> - 2015-04-22 11:49 +0200
      Re: Writing SM/REM and FM/MOD Lars Brinkhoff <lars.spam@nocrew.org> - 2015-04-22 12:09 +0200
        Re: Writing SM/REM and FM/MOD anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-04-22 10:37 +0000
          Re: Writing SM/REM and FM/MOD Michael Barry <barrym95838@yahoo.com> - 2015-04-22 08:19 -0700
        Re: Writing SM/REM and FM/MOD Hans Bezemer <the.beez.speaks@gmail.com> - 2015-04-22 13:25 +0200
          Re: Writing SM/REM and FM/MOD Lars Brinkhoff <lars.spam@nocrew.org> - 2015-04-22 14:42 +0200
    Re: Writing SM/REM and FM/MOD foxaudioresearch@gmail.com - 2015-04-28 06:44 -0700
      Re: Writing SM/REM and FM/MOD Mark Wills <markwills1970@gmail.com> - 2015-04-28 07:27 -0700
  Re: Writing SM/REM and FM/MOD stephen@mpeforth.com (Stephen Pelc) - 2015-04-21 21:44 +0000
  Re: Writing SM/REM and FM/MOD "Rod Pemberton" <bork@lllljunkqwer.cpm> - 2015-04-21 18:32 -0400
    Re: Writing SM/REM and FM/MOD Julian Fondren <julian.fondren@gmail.com> - 2015-04-21 16:28 -0700
      Re: Writing SM/REM and FM/MOD "David N. Williams" <williams@umich.edu> - 2015-04-21 23:05 -0400
        Re: Writing SM/REM and FM/MOD "David N. Williams" <williams@umich.edu> - 2015-04-21 23:07 -0400
      Re: Writing SM/REM and FM/MOD krishna.myneni@ccreweb.org - 2015-04-22 18:15 -0700
  Re: Writing SM/REM and FM/MOD albert@spenarnc.xs4all.nl (Albert van der Horst) - 2015-04-22 00:19 +0000
    Re: Writing SM/REM and FM/MOD anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-04-22 12:54 +0000
      Re: Writing SM/REM and FM/MOD Hans Bezemer <the.beez.speaks@gmail.com> - 2015-04-22 16:50 +0200
        Re: Writing SM/REM and FM/MOD anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-04-22 15:29 +0000
        Re: Writing SM/REM and FM/MOD "Rod Pemberton" <bork@lllljunkqwer.cpm> - 2015-04-24 21:46 -0400
          Re: Writing SM/REM and FM/MOD Michael Barry <barrym95838@yahoo.com> - 2015-04-27 22:08 -0700
            Re: Writing SM/REM and FM/MOD "Rod Pemberton" <bork@lllljunkqwer.cpm> - 2015-04-28 03:24 -0400
    Re: Writing SM/REM and FM/MOD Julian Fondren <ayrnieu@gmail.com> - 2015-05-11 16:38 -0700
      Re: Writing SM/REM and FM/MOD albert@spenarnc.xs4all.nl (Albert van der Horst) - 2015-05-12 00:24 +0000
      Re: Writing SM/REM and FM/MOD anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-05-12 13:58 +0000
  Re: Writing SM/REM and FM/MOD anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-04-22 13:43 +0000

csiph-web