🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.forth
Article #28

Re: F.N floating point format word

#28
From: peter
Date: Thu, 08 Oct 2026 10:13
27 lines
2359 bytes
On Thu, 8 Oct 2026 13:34:33 +1100
dxf <dxforth@gmail.com> wrote:

> On 8/10/2026 7:35 am, peter wrote:
> > ... 
> > There were no real reason. The result at fpad is used only for
> > INF and NAN. I also wanted a number larger then 17, 32 looked like 
> > a good round number. The importance of the first call to represent
> > is to get a correct exp to use in the following calculations.  
> > The second time represent is called it will be with u=exp+n to get 
> > the correct rounding.
> 
> Are you sure it's necessary?  Your tests appear to work with it set at 5.
> 

You might be right!
My first concern was for number like
9.9999999995e that will round up all the way and get a exp+1
But it looks like the code handles that also.

The problem was 99.995e 2 f.n that became 100.0
But that was solved also by pre-filling the buffer with 0 and always
printing the correct number of decimals

BR
Peter
Technical Details
Message-ID: <20261008121302.00007412@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>

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: Thu, 8 Oct 2026 12:13:02 +0200
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <20261008121302.00007412@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>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 08 Oct 2026 10:13:13 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="3909777"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19UXpLzgOis87U6H24fBlUK2BvK7w9KSJI="; posting-host="dd63b567af524a9d4c3f6459d93aa223"
Cancel-Lock: sha1:FNYj7of2N4zVQ+GBzgRAslXG32E= sha256:W+ieIuh88+Cs2H6n7XCJigYpmIZXm1C8w6ygDWex9gQ=
	sha1:unp2la52F0WghyT8l4pdvJu2lMI= sha256:eBQ9O4hh7JcpT6akaTl+WdVHgdh9HRbS2Jb+0R1g8gk=
X-Newsreader: Claws Mail 4.4.0 (GTK 3.24.51; x86_64-w64-mingw32)