Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.forth    |    Forth programmers eat a lot of Bratwurst    |    117,927 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 116,504 of 117,927    |
|    Krishna Myneni to Krishna Myneni    |
|    Re: F*/ (f-star-slash)    |
|    29 May 24 07:27:33    |
      From: krishna.myneni@ccreweb.org              On 5/28/24 06:11, Krishna Myneni wrote:       ...       > Updated benchmark code also allows for validating the arithmetic of F*/       > for all of the 1 million test cases. At the moment, all arithmetic cases       > use only "normal" fp numbers i.e. they do not include zero, infinity, or       > subnormal numbers -- special tests are needed for such cases.       > ...              I found the reason for hanging in my implementation of F*/ -- the       problem was in the word DP_NORMAL_FRACTION (the only word which has an       indefinite loop in the code). The version which doesn't go into an       infinite loop is given below:              : dp-normal-fraction ( u -- expinc u')        dup DP_FRACTION_BITS 1+ rshift        dup IF        tuck rshift        ELSE        drop -1 swap \ -1 u        BEGIN        dup DP_IMPLIED_BIT and 0=        WHILE        1 lshift        swap 1- swap        REPEAT        THEN                     Now the benchmark code runs. It shows two things (see below):              1. The execution time is poor compared to Anton's implementation, about       8x slower.              2. Half of the arithmetic results are wrong, with the max relative error       being as high as 2/3.              So, I clearly have some work to do to fix the arithmetic. It was       fortuitous that it passed my test cases, but clearly the test cases in       my original implementation of F*/ were insufficient.              --       Krishna                     bench-f*/       603 ms        ok       check-results              1000000 samples              # tolerance errors: 501374       # sign errors: 0       Max relative error: 0.666667        ok              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca