🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.forth
Article #100

Re: F.N floating point format word

#100
From: Krishna Myneni
Date: Sat, 17 Oct 2026 04:31
32 lines
2445 bytes
On 10/8/26 3:07 PM, peter wrote:
...
> : f.n ( F:fp n -- )
...
>      over 0< if
>          dup 0 <= if nip 0 swap else  \ negative e and n
>                  swap over 1- negate max swap          \ limit negative n
>          else swap over 1024 swap - min swap then then \ limit positive n
...

> Here is the code for (F.N)
> 
> \ (F.N) print float with n decimals to string

> : (f.n) ( F:fp n -- )
...
>      over 0< if
>          dup 0 <= if nip 0 swap else  \ negative e and n
>                   swap over 1- negate max swap             \ limit negative n
>              else swap over 1024 swap - min swap then then \ limit positive n
...
The code snippets above use a control structure of the form

IF ... IF ... ELSE ... ELSE ... THEN THEN

Is this consistent with the standard?

--
Krishna


Technical Details
Message-ID: <11autmd$3t6hf$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: <119oin2$26n99$1@dont-email.me> <11a01mr$sqrm$1@dont-email.me> <20261005150222.00006cf5@tin.it> <11a16nc$1camn$1@dont-email.me> <20261006080347.00002cdf@tin.it> <11a4tj5$2ku7v$1@dont-email.me> <20261007223526.000065ab@tin.it> <6ac7013a$1@news.ausics.net> <20261008121302.00007412@tin.it> <20261008152645.00001682@tin.it> <11a88oh$3t0ti$1@dont-email.me> <20261008220746.0000042f@tin.it>

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: Krishna Myneni <krishna.myneni@ccreweb.org>
Newsgroups: comp.lang.forth
Subject: Re: F.N floating point format word
Date: Fri, 16 Oct 2026 23:31:07 -0500
Organization: A noiseless patient Spider
Lines: 32
Message-ID: <11autmd$3t6hf$1@dont-email.me>
References: <119oin2$26n99$1@dont-email.me> <11a01mr$sqrm$1@dont-email.me>
 <20261005150222.00006cf5@tin.it> <11a16nc$1camn$1@dont-email.me>
 <20261006080347.00002cdf@tin.it> <11a4tj5$2ku7v$1@dont-email.me>
 <20261007223526.000065ab@tin.it> <6ac7013a$1@news.ausics.net>
 <20261008121302.00007412@tin.it> <20261008152645.00001682@tin.it>
 <11a88oh$3t0ti$1@dont-email.me> <20261008220746.0000042f@tin.it>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 17 Oct 2026 04:31:11 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="4102703"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+DrY8fhffiieeNz6rFvj2t"; posting-host="e44790808d9367a5c724567d377e4b9f"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:JcBb5SSKkARmLQMMJzlAv/KKYBE= sha256:7DTUcf8A/wPKhkFIttD/rNZDVK7E3EMxdJAhCbvVzXg=
	sha1:NEOCj0IHQ2tvZDkr0yaIGeEWP8M= sha256:d6hDhcwX1Vd1JtjJ+wolUBkdgHiELp7aIUYGZOsSf0E=
In-Reply-To: <20261008220746.0000042f@tin.it>
Content-Language: en-US