On 21/10/2026 12:05 pm, Krishna Myneni wrote:
> On 10/20/26 7:15 PM, dxf wrote:
>> On 21/10/2026 4:26 am, 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 ?
>>
>> I wasn't aware any JVN packages performed rounding. AFAIK some implementations
>> (yours?) limited numbers printed to PRECISION but that this was truncation - not
>> rounding. Rounding presented a whole new problem - why I never attempted it.
>>
>
> The present iteration of (DDFS.) in kForth's dd_io.4th includes some changes you introduced. I would have to back and check JVN's original code (which uses a state machine) to see it performs differently than the subroutine ddwrite() in Bailey's ddfun Fortran 90 package, which is what is used in my program dp2_to_dd.f90 (listed below).
The input routine had a different issue. Debugging proved so onerous that I just
replaced the lot and it solved original problem. In retrospect the issue was likely
due to the original's use of >FLOAT which split the conversion into two. My routine
was the equivalent of a >DDFLOAT written from scratch. The code proved simpler than
JVN's state machine >FLOAT thingy.
>
> It is more productive to make (DDFS.) a Forth equivalent to ddwrite(), to provide the same performance.
I wouldn't know. I've only ever considered my patches to JVN's DDFS. to be just that -
patches. The 'peeldigit' routine should never produce 'negative digits' - but it does.
I've no idea how Bailey did things or whether JVN was cutting corners but the latter's
routine clearly had/has issues.
> What does your present version of (DDFS.) output on these tests?
As I consider my present DDFS. routine merely a 'sticky-taped' version of the original
that doesn't produce glaring errors, I don't hold it up as any solution. The latter is
for others more interested than me to develop.
> ...