🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.forth
Article #164

Re: Tests for (DDFS.)

#164
From: Krishna Myneni
Date: Wed, 21 Oct 2026 13:53
83 lines
4470 bytes
On 10/21/26 5:45 AM, marcel hendrix wrote:
> On 10/21/2026 10:50 AM, Krishna Myneni wrote:
>> On 10/20/26 8:05 PM, Krishna Myneni wrote:
> [...]> I post the execution output from dp2_to_dd for the 4 test cases in
>> ddfsdot-test.4th for anyone who wants to reproduce this output. The 
>> hex values of the two double precision numbers input to the program 
>> are shown (the second number is, of course, 64-bit 0). Note that the 
>> "D" exponent marker must be used to enter a double precision number in 
>> Fortran.
> 
> [...]
> 
> Strange. I can duplicate 1, 2, and 4 exactly, but not 3: the pair 
> -0.10000000133514320E-09 0.00000000000000000E+00 .
> 
> Also:
> FORTH> s" -1.0000000133514319600180897396057e-10" >dd cr fswap +e. +e.
> -1.0000000133514319362e-0010  3.7865323450608573444e-0042 ok
> 
> Or, trying to compensate for the FPU 80-bit stack:
> FORTH> 0e dfvalue aa  ok
> FORTH> 53-bits!  s" -1.0000000133514319600180897396057e-10" >dd cr fswap 
> TO aa aa +e. space TO aa aa +e.
> -1.0000000133514319362e-0010  3.7865323450608573444e-0042 ok
> 
> However, note that the float from >DD is -1.0000000133514319362e-0010. , 
> not -0.10000000133514320E-09 as in your case.
> 

These two numbers have the same hex values for double precision floats:

fvariable r
  ok
-1.0000000133514319362e-0010 r df!
  ok
r @ hex u. decimal
BDDB7CDFE0000000  ok

  ok
-0.10000000133514320E-09  r df!
  ok
r @ hex u. decimal
BDDB7CDFE0000000  ok

Your floating point output for double precision is broken:

20 set-precision
  ok
-0.10000000133514320E-09 (fs.) type
-1.0000000133514319600e-10 ok   \ not -1.0000000133514319362e-0010

--
KM



> -marcel
> 
> FORTH> 53-bits! 0.30000000000000004E+00         0.00000000000000000E+00 
>   cr fover +e. space fdup +e.  cr ddfe. cr .(
>   3.0000000000000004440892098500626e-1 )
>   3.0000000000000005126e-0001  0.0000000000000000000e+0000
>   3.0000000000000004440892098500626e-1
>   3.0000000000000004440892098500626e-1  ok
> FORTH> 53-bits! 0.99999993504564039E-38         0.00000000000000000E+00 
>   cr fover +e. space fdup +e.  cr ddfe. cr .(
>   9.9999993504564039245746141539976e-39 )
>   9.9999993504564044884e-0039  0.0000000000000000000e+0000
>   9.9999993504564039245746141539976e-39
>   9.9999993504564039245746141539976e-39  ok
> FORTH> 53-bits! -0.10000000133514320E-09        0.00000000000000000E+00 
>   cr fover +e. space fdup +e.  cr ddfe. cr . 
> ( -1.0000000133514319600180897396057e-10 )
> -1.0000000133514321920e-0010  0.0000000000000000000e+0000
> -1.0000000133514322185120311624269e-10
> -1.0000000133514319600180897396057e-10  ok
> FORTH> 53-bits! -0.90071992547409920E+16        0.00000000000000000E+00 
>   cr fover +e. space fdup +e.  cr ddfe. cr . 
> ( -9.0071992547409920000000000000000e15 )
> -9.0071992547409920000e+0015  0.0000000000000000000e+0000
> -9.0071992547409920000000000000000e15
> -9.0071992547409920000000000000000e15  ok
Technical Details
Message-ID: <11bag4g$3vcfq$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> <6ad8043a$1@news.ausics.net> <11b935k$3gr0s$1@dont-email.me> <11b9ud7$3oofr$1@dont-email.me> <11ba545$294uk$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: Krishna Myneni <krishna.myneni@ccreweb.org>
Newsgroups: comp.lang.forth
Subject: Re: Tests for (DDFS.)
Date: Wed, 21 Oct 2026 08:53:20 -0500
Organization: A noiseless patient Spider
Lines: 83
Message-ID: <11bag4g$3vcfq$1@dont-email.me>
References: <11b7rcu$31u3u$1@dont-email.me> <11b8427$35l54$1@dont-email.me>
 <11b887g$p2rm$1@dont-email.me> <6ad8043a$1@news.ausics.net>
 <11b935k$3gr0s$1@dont-email.me> <11b9ud7$3oofr$1@dont-email.me>
 <11ba545$294uk$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 21 Oct 2026 13:53:22 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="4174330"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/EGEsQiO4cAR8FGqrWWYit"; posting-host="fb81cdbe9bb503afc36aa811300a6187"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:KPWMlP6XA31h8ArOZGyKND++rEY= sha256:iIX9bgvqFkjxJu/nsFSclmYTL/sl7Z0voesLOAyJi0g=
	sha1:GhY2ypIr2h7kB0evxu7pzBTtbQA= sha256:9ux0a5TjX62VgYcbycOanqBJPzrLXv2UELlLdRI6ZNA=
Content-Language: en-US
In-Reply-To: <11ba545$294uk$1@dont-email.me>