Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #55939
| From | albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: When to use !name vs. name! ? |
| Date | 2017-03-19 20:47 +0100 |
| Organization | A poorly-installed InterNetNews site |
| Message-ID | <oamn86$sdf$1@cherry.spenarnc.xs4all.nl> (permalink) |
| References | <oa7clo$1pao$1@gioia.aioe.org> <bJmdndkW2_YCc1DFnZ2dnUU7-U_NnZ2d@supernews.com> <oaltt2$of8$1@cherry.spenarnc.xs4all.nl> <2017Mar19.172304@mips.complang.tuwien.ac.at> |
In article <2017Mar19.172304@mips.complang.tuwien.ac.at>, Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote: >albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) writes: >>I can see that these words are worth having, especially 2/ that is >>a bit manipulation despite the misleading name. >>On two's complement machine it is the same then '' 2 / '' > >Only if / is floored: > >SwiftForth i386-Linux 3.6.3 29-Jun-2016 >-1 2 / . 0 ok >-1 2/ . -1 ok > >VFX Forth for Linux IA32 Version: 4.72 [build 0555] >-1 2 / . 0 ok >-1 2/ . -1 ok My bad, I only remembered never to use 2/ for division, because under some circumstances it is not the same. Apparently more circumstances than I thought. I once had 2/ as a loadable extension using FM/MOD but now I just have a code word that uses SHR, . > >Gforth 0.7.2, Copyright (C) 1995-2008 Free Software Foundation, Inc. >Gforth comes with ABSOLUTELY NO WARRANTY; for details type `license' >Type `bye' to exit >-1 2 / . -1 ok >-1 2/ . -1 ok > >>While '' 1 + '' optimises just fine, a code word for 1+ warrants >>special attention in an optimiser. > >Why would you write 1+ as a code word if your optimizer can handle "1 +"? > >: 1+ 1 + ; Exactly. Why write "1+" if your optimiser handles "1 +". > >- anton Groetjes Albert -- Albert van der Horst, UTRECHT,THE NETHERLANDS Economic growth -- being exponential -- ultimately falters. albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
When to use !name vs. name! ? "HAA" <someone@microsoft.com> - 2017-03-14 11:15 +1100
Re: When to use !name vs. name! ? hughaguilar96@gmail.com - 2017-03-13 18:27 -0700
Re: When to use !name vs. name! ? Mark Wills <markwills1970@gmail.com> - 2017-03-14 01:33 -0700
Re: When to use !name vs. name! ? Mark Wills <markwills1970@gmail.com> - 2017-03-14 01:30 -0700
When to use !name vs. name! ? NN <november.nihal@gmail.com> - 2017-03-14 02:56 -0700
Re: When to use !name vs. name! ? "HAA" <someone@microsoft.com> - 2017-03-16 08:59 +1100
Re: When to use !name vs. name! ? Mark Wills <markwills1970@gmail.com> - 2017-03-16 02:11 -0700
Re: When to use !name vs. name! ? "HAA" <someone@microsoft.com> - 2017-03-17 11:19 +1100
Re: When to use !name vs. name! ? rickman <gnuarm@gmail.com> - 2017-03-16 20:46 -0400
Re: When to use !name vs. name! ? "Elizabeth D. Rather" <erather@forth.com> - 2017-03-16 21:34 -1000
Re: When to use !name vs. name! ? "HAA" <someone@microsoft.com> - 2017-03-18 09:49 +1100
Re: When to use !name vs. name! ? "Elizabeth D. Rather" <erather@forth.com> - 2017-03-17 13:08 -1000
Re: When to use !name vs. name! ? rickman <gnuarm@gmail.com> - 2017-03-17 19:35 -0400
Re: When to use !name vs. name! ? Mark Wills <markwills1970@gmail.com> - 2017-03-18 00:51 -0700
Re: When to use !name vs. name! ? "HAA" <someone@microsoft.com> - 2017-03-19 10:47 +1100
Re: When to use !name vs. name! ? rickman <gnuarm@gmail.com> - 2017-03-18 22:18 -0400
Re: When to use !name vs. name! ? "Elizabeth D. Rather" <erather@forth.com> - 2017-03-18 16:36 -1000
Re: When to use !name vs. name! ? rickman <gnuarm@gmail.com> - 2017-03-18 23:53 -0400
Re: When to use !name vs. name! ? "Elizabeth D. Rather" <erather@forth.com> - 2017-03-18 22:22 -1000
Re: When to use !name vs. name! ? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-03-19 16:03 +0000
Re: When to use !name vs. name! ? Alex <alex@rivadpm.com> - 2017-03-19 17:42 +0000
Re: When to use !name vs. name! ? "Elizabeth D. Rather" <erather@forth.com> - 2017-03-19 13:10 -1000
Re: When to use !name vs. name! ? albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2017-03-19 13:34 +0100
Re: When to use !name vs. name! ? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-03-19 16:23 +0000
Re: When to use !name vs. name! ? albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2017-03-19 20:47 +0100
Re: When to use !name vs. name! ? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2017-03-20 03:47 -0500
Re: When to use !name vs. name! ? "HAA" <someone@microsoft.com> - 2017-03-20 09:41 +1100
Re: When to use !name vs. name! ? Coos Haak <htrofhc@gmail.com> - 2017-03-20 01:24 +0100
Re: When to use !name vs. name! ? "HAA" <someone@microsoft.com> - 2017-03-21 12:10 +1100
Re: When to use !name vs. name! ? hughaguilar96@gmail.com - 2017-03-20 18:45 -0700
Re: When to use !name vs. name! ? Coos Haak <htrofhc@gmail.com> - 2017-03-21 14:58 +0100
Re: When to use !name vs. name! ? "HAA" <someone@microsoft.com> - 2017-03-22 19:49 +1100
Re: When to use !name vs. name! ? hughaguilar96@gmail.com - 2017-03-17 16:46 -0700
Re: When to use !name vs. name! ? Lars Brinkhoff <lars.spam@nocrew.org> - 2017-04-12 08:13 +0200
csiph-web