🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.forth
Article #152

Re: Tests for (DDFS.)

#152
From: marcel hendrix
Date: Tue, 20 Oct 2026 17:51
29 lines
2503 bytes
On 10/20/2026 7:26 PM, marcel hendrix wrote:
> On 10/20/2026 6:15 PM, Krishna Myneni wrote:
>> On 10/20/26 8:47 AM, Krishna Myneni wrote:
>> ...
>>>
>>> ...
>>> The output shows that (DDFS.) as presently implemented in dd_io.4th 
>>> fails for one of the test cases (test 2), and probably for many more 
>>> cases.
>>> ...
>>
>> Typing the string outputs from (FS.) and (DDFS.) shows that (DDFS.) is 
>> not rounding properly.
> Simply setting the low part of a double double to 0 might be a bit too 
> simplistic? Is the difference in the range of 1e-15 .. 1e-17 ?
Or, using xdfloats and showing the low and high xfloat separately:

FORTH> S" 9.9999993504564039e-39"  >XD fswap +E. 2 spaces +E. 
9.9999993504564038992e-0039   2.7761965966859100882e-0058 ok
FORTH> S" 0.30000000000000003e0"   >XD fswap +E. 2 spaces +E. 
3.0000000000000002998e-0001   1.0967909050947355352e-0020 ok
FORTH> S" -1.0000000133514319e-10" >XD fswap +E. 2 spaces +E. 
-1.0000000133514319000e-0010   1.5520703912062604677e-0031 ok
FORTH> S" -9007199254740991.5e0"   >XD fswap +E. 2 spaces +E. 
-9.0071992547409915000e+0015   0.0000000000000000000e+0000 ok

Here only the 2nd test might have trouble.

-marcel
Technical Details
Message-ID: <11b89ml$p3ih$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: <11b7rcu$31u3u$1@dont-email.me> <11b8427$35l54$1@dont-email.me> <11b887g$p2rm$1@dont-email.me>

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: marcel hendrix <mhx@iae.nl>
Newsgroups: comp.lang.forth
Subject: Re: Tests for (DDFS.)
Date: Tue, 20 Oct 2026 19:51:16 +0200
Organization: A noiseless patient Spider
Lines: 29
Message-ID: <11b89ml$p3ih$1@dont-email.me>
References: <11b7rcu$31u3u$1@dont-email.me> <11b8427$35l54$1@dont-email.me>
 <11b887g$p2rm$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 20 Oct 2026 17:51:17 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="822865"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19u2JHp+f14F7s74l9hMJYuLSJkAqwFGNg="; posting-host="9af0d298bf90b86c84ab0cdc0d07855f"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:D1JgZVsQU3iXjs5o8dmhdrS2muw= sha256:jAtoa81Lgydq2koIVp4husLzPVRHXluQncFHE2+Ka3w=
	sha1:1NIPOaUXZDjYj90RbrceNTn0PAw= sha256:meUX+/RRnQZZR0LYXTlRPqFZAGtLcbgnXvAKSTCYsaA=
In-Reply-To: <11b887g$p2rm$1@dont-email.me>
Content-Language: en-US