🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.forth
Article #110

Re: F.N floating point format word

#110
From: dxf
Date: Sat, 17 Oct 2026 13:57
33 lines
2110 bytes
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.
Technical Details
Message-ID: <6ad37edd$1@news.ausics.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.ausics.net!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>

Show Full Headers
Complete Article Headers
Date: Sun, 18 Oct 2026 00:57:50 +1100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: F.N floating point format word
Newsgroups: comp.lang.forth
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>
Content-Language: en-GB
From: dxf <dxforth@gmail.com>
In-Reply-To: <20261017115221.0000440b@tin.it>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: news.ausics.net
Message-ID: <6ad37edd$1@news.ausics.net>
Organization: Ausics - https://newsgroups.ausics.net
Lines: 33
X-Complaints: abuse@ausics.net
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.ausics.net!not-for-mail