🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #77

Re: Optimization by programmers

#77
From: Anton Ertl
Date: Tue, 13 Oct 2026 10:27
42 lines
3372 bytes
Niklas Holsti <niklas.holsti@tidorum.invalid> writes:
>Forth originated in astronomy, if I remember correctly. I do remember 
>that in an astronomy-domain Forth program, where it was often necessary 
>to transform the celestial coordinates of stars from the standard 
>catalog epoch (the start of the year 1950) to the current time, the word 
>1950.0 was defined to perform that transformation.

That is unlikely, as explained below.

>That Forth system did not have floating-point support, so 1950.0 could 
>not be understood as a floating-point literal. But if the program had 
>been ported to a Forth system with floating-point support, confusion 
>could have resulted.

Most Forth systems recognize strings like 1950.0 as double-cell
numbers.  That's expecially true in early systems, where 16-bit cells
were too small for the arithmetic needs of many applications
(including in astronomy).  In early systems fixed-point was used a
lot, and 1950.0 is interpreted as 19500 with a scale factor of 1/10.

Only in recent times with 32-bit and 64-bit cells roll-your-own system
implementors have chosen to abandon double-cell numbers, but
mainstream systems (even with 64-bit cells) still recognize 1950.0 as
double-cell number.  Just on 2026-10-05 someone complained on
comp.lang.forth <6ac33315@news.ausics.net>:

|Maybe there's a mechanism in Gforth that stops annoying nags when
|printing numbers?
|
|Gforth 0.7.9_20200709
|
|1. d.
|*terminal*:1:1: warning: '1.' is a double-cell integer; type `help' for more info1  ok

The warning is not about printing the double-cell number, but about
the "1.".  But anyway, it shows that double-cell numbers are still
being used.

- anton
-- 
'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
  Mitch Alsup, <c17fcd89-f024-40e7-a594-88a85ac10d20o@googlegroups.com>
Technical Details
Message-ID: <2026Oct13.122712@mips.complang.tuwien.ac.at>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
References: <1177fdi$26ea4$1@dont-email.me> <11a3ofn$2ak3s$1@dont-email.me> <11a5hd5$4qb$1@reader2.panix.com> <11a5lqo$2v5bq$1@dont-email.me> <11a6870$41j$1@reader2.panix.com> <11a6a6h$37i1n$1@dont-email.me> <1791742457-5857@newsgrouper.org> <11agm4p$2tfut$1@dont-email.me> <11ahs8q$38ir0$4@dont-email.me> <11aig3c$3hdcn$1@dont-email.me> <11aiqc0$3kr94$3@dont-email.me> <2026Oct12.191033@mips.complang.tuwien.ac.at> <nj6aehFiusqU1@mid.individual.net>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.arch
Subject: Re: Optimization by programmers
Date: Tue, 13 Oct 2026 10:27:12 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 42
Message-ID: <2026Oct13.122712@mips.complang.tuwien.ac.at>
References: <1177fdi$26ea4$1@dont-email.me> <11a3ofn$2ak3s$1@dont-email.me> <11a5hd5$4qb$1@reader2.panix.com> <11a5lqo$2v5bq$1@dont-email.me> <11a6870$41j$1@reader2.panix.com> <11a6a6h$37i1n$1@dont-email.me> <1791742457-5857@newsgrouper.org> <11agm4p$2tfut$1@dont-email.me> <11ahs8q$38ir0$4@dont-email.me> <11aig3c$3hdcn$1@dont-email.me> <11aiqc0$3kr94$3@dont-email.me> <2026Oct12.191033@mips.complang.tuwien.ac.at> <nj6aehFiusqU1@mid.individual.net>
Injection-Date: Tue, 13 Oct 2026 10:55:56 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="498579"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+7+9fHs0qcbqyoRodjfAM/"; posting-host="fe61e7b3cd0f773f794eaa5f8cfc4f56"
Cancel-Lock: sha1:9DxwrOEaMhQ16zbgAwQhUhSQTEc= sha256:UauuT90Uq9PEmic949dj7/pLv2+hYRC4LKrv0J/c1ik=
	sha1:movrJKtA8kVP2mqAOTrhRrEY/gw= sha256:B2YArUuEqea7IWjdr+vHuWNFADOOnv3YYDMkDijsSz8=
X-newsreader: xrn 10.11