🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #118

Re: Optimization by programmers

#118
From: Terje Mathisen
Date: Wed, 14 Oct 2026 21:39
35 lines
3396 bytes
Anton Ertl wrote:
> Niklas Holsti <niklas.holsti@tidorum.invalid> writes:
>> On 2026-10-13 13:27, Anton Ertl wrote:
>>> 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.
>>
>> I am rather sure that my memory is correct.
>>
>>> In early systems fixed-point was used a lot, and 1950.0 is
>>> interpreted as 19500 with a scale factor of 1/10.
>> The Forth program in question represented angles as fixed-point
>> fractions (0 <= x < 1) of a full circle. I don't remember the number of
>> bits used.
> 
> Yes, that was customary for angles, as mentioned in the HOPL-II paper
> "The Evolution of Forth"
> <https://www.forth.com/resources/forth-programming-language/>:

Garmin uses (used?) fixed-point only in their GPSs, with circles stored 
as a scaled 0:32 value with an implied period in front. Since the Earth 
is 40 000 km around (over the poles, about 1/300 more along equator), 
this corresponds to about 9mm precision which they probably thought was 
more than good enough for a consumer handheld device.

Terje

-- 
- <Terje.Mathisen at tmsw.no>
"almost all programming can be viewed as an exercise in caching"
Technical Details
Message-ID: <11aosq9$1sccf$1@dont-email.me>
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> <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> <2026Oct13.122712@mips.complang.tuwien.ac.at> <nj76d2FnesuU1@mid.individual.net> <2026Oct14.100238@mips.complang.tuwien.ac.at>

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: Terje Mathisen <terje.mathisen@tmsw.no>
Newsgroups: comp.arch
Subject: Re: Optimization by programmers
Date: Wed, 14 Oct 2026 23:39:20 +0200
Organization: A noiseless patient Spider
Lines: 35
Message-ID: <11aosq9$1sccf$1@dont-email.me>
References: <1177fdi$26ea4$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>
 <2026Oct13.122712@mips.complang.tuwien.ac.at>
 <nj76d2FnesuU1@mid.individual.net>
 <2026Oct14.100238@mips.complang.tuwien.ac.at>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 14 Oct 2026 21:39:22 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="1978767"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+md1GE0G3IVOM3Lx9lewTHgcTe2Y7BTu9a0+zxyUbT5Q=="; posting-host="e54f8db55aaa25c26c7d19a2489e8bd8"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:140.0) Gecko/20100101
 Firefox/140.0 SeaMonkey/2.53.24
Cancel-Lock: sha1:qwz09Kc5TgscfUwBUbklxxCqjkg= sha256:NFyM7xnNFoWgg5yK24FrGHdbqDhsY2vWLo0pSZw/i2U=
	sha1:r5uHNibp2tx/LBksw9CEIByDMHI= sha256:8tNmNhSMWf2GPt2xz0ZdX4e/8jSYf+c2mJ3ZGq+5sDI=
In-Reply-To: <2026Oct14.100238@mips.complang.tuwien.ac.at>