🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.forth
Article #117

Re: F.N floating point format word

#117
From: peter
Date: Sat, 17 Oct 2026 16:23
50 lines
2952 bytes
On Sun, 18 Oct 2026 00:57:50 +1100
dxf <dxforth@gmail.com> wrote:

> While I never considered or designed for 'negative decimal places' it appears
> my version of F.N does do them - albeit with results different from tests I've
> seen posted here.
> 
> Wondering if there was any convention for them, google turned up the ROUND()
> function in Oracle and SQL.  Online examples didn't show what happens at the
> extremes (what I was interested in) but I did find an online SQL server where
> I could test that.  For SQL at least, the results were as follows.
> 
> SQL:
> 
> ROUND(876.543, 0) 877.000
> ROUND(876.543,-1) 880.000
> ROUND(876.543,-2) 900.000
> ROUND(876.543,-3) <overflow error>
> 
> ROUND(456.789, 0) 457.000
> ROUND(456.789,-1) 460.000
> ROUND(456.789,-2) 500.000
> ROUND(456.789,-3) .000
> 
> F.N (dxf):
> 
> 876.543e  0 f.n 877.
> 876.543e -1 f.n 880.
> 876.543e -2 f.n 900.
> 876.543e -3 f.n 1000.
>  
> 456.789e  0 f.n 457.
> 456.789e -1 f.n 460.
> 456.789e -2 f.n 500.
> 456.789e -3 f.n 0.
> 

F.N (pf)

876.543e   0 f.n  877. ok
876.543e  -1 f.n  880  ok
876.543e  -2 f.n  900  ok
876.543e  -3 f.n  900  ok

456.789e   0 f.n  457. ok
456.789e  -1 f.n  460  ok
456.789e  -2 f.n  500  ok
456.789e  -3 f.n  500  ok

Technical Details
Message-ID: <20261017182326.00000c5c@tin.it>
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> <11autmd$3t6hf$1@dont-email.me> <20261017115221.0000440b@tin.it> <6ad37edd$1@news.ausics.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: peter <peter.noreply@tin.it>
Newsgroups: comp.lang.forth
Subject: Re: F.N floating point format word
Date: Sat, 17 Oct 2026 18:23:26 +0200
Organization: A noiseless patient Spider
Lines: 50
Message-ID: <20261017182326.00000c5c@tin.it>
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>
	<11autmd$3t6hf$1@dont-email.me>
	<20261017115221.0000440b@tin.it>
	<6ad37edd$1@news.ausics.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 17 Oct 2026 16:23:26 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="365591"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19G7El+nxwCLxJQvUelYhEsY3DaGGtfSDw="; posting-host="507d3bef6a0b8698f82fc557b52a9e01"
Cancel-Lock: sha1:lHDRIcCBBR29tsfWkZYRhj5aTUA= sha256:af3PgsNnP2zqggCo36zwgFoZyOUc4KyLQeU+grbtMTo=
	sha1:28LRP5MNqPCjnUoeGbGJUvMxngE= sha256:JxtzwcfrZAB9ipTBhHhKyIIk1F6oVQgKZoUQZOs4WAM=
X-Newsreader: Claws Mail 4.4.0 (GTK 3.24.51; x86_64-w64-mingw32)