User talk:Retroburrowers: Difference between revisions
Content added Content deleted
(sorry can´t test. out of memory) |
No edit summary |
||
Line 1: | Line 1: | ||
Our 1st response is posted here: U r critiquing alphaversions abandoned infavor of a beta which may find the answer -as well as |
|||
false positives due to lack of precision. Please test the beta on fuse, and post your versions after |
false positives due to lack of precision. Please test the beta on fuse, and post your versions after our beta, which we can't run |
||
not having a Next w/1.5 MB ram |
not having a Next w/1.5 MB ram. |
||
--Frisian wrote: |
|||
-- |
|||
A little info why your programs did not give results. |
A little info why your programs did not give results. |
||
<lang zxbasic> 5 FOR r=34 TO 5 STEP -1 |
<lang zxbasic> 5 FOR r=34 TO 5 STEP -1 |
||
Line 86: | Line 86: | ||
</lang> |
</lang> |
||
This code will not run on ZX Spectrum nor on Fuse. In line 5 the last dim statement uses to much memory 249*249*5 = 310005 Bytes, |
This code will not run on ZX Spectrum nor on Fuse. In line 5 the last dim statement uses to much memory 249*249*5 = 310005 Bytes, |
||
this is even more then the total amount of memory for a ZX Spectrum 128. Therefore it´s not a ZX Spectrum program. Also it has the |
|||
same flaw as the other version it will not find the solution. |
|||
Please check [[//rosettacode.org/wiki/Category:ZX_Spectrum_Basic ZX Spectrum page]] |
Please check [[//rosettacode.org/wiki/Category:ZX_Spectrum_Basic ZX Spectrum page]] |
||
--[[User:Frisian|Frisian]] ([[User talk:Frisian|talk]]) 17:44, 30 April 2020 (UTC) |
--[[User:Frisian|Frisian]] ([[User talk:Frisian|talk]]) 17:44, 30 April 2020 (UTC) |
||
Our 2nd reply: |
|||
actually 249^2*5^2, which is just under the internal limit of a Spectrum Next, & can be madesmaller by shifting indices down to 0 |
|||
TO 248 and changing the code accordingly. Yet this beta does not have the same flaw as the alpha, as the m loop runs within the 4 |
|||
others. The error should be different: in taking logs, subtracting them, exponentiating differences, and taking the log of their |
|||
sums, and comparing that to a log in the p array. That ought to compound rounding errors, so we wouldn't be surprised if it didn't |
|||
find the correct solution. Even so, we'd settle for it not finding false solutions. So we'll test it on a 2 MB QL on Q-emuLator |
|||
sometime next week, and also test trying to balance out the rounding errors on each side of the IF =sign. It seems that Sinclair |
|||
BASICs calculate an extra digit in FP functions so as to know which way to round the least significant digit. Comparing the 2.5 |
|||
powers is to attempt a "meet inthe middle" hack to a discrete log problem. Thus, taking INTs becomes superfluous-& even when |
|||
comparing integers after taking INTs, which seems like shooting yourself in the foot: you may find the correct solution, |
|||
but you also may round some FP Nos the wrong way and thereby find false solutions. |
|||
The point is taken that a Spectrum Next is no ZX Spectrum, inwhich case one can revert back to no precalculated differences, and run that at full speed on Fuse. |