Talk:Square root by hand: Difference between revisions

m
m (added/forced a TOC (for now).)
 
(3 intermediate revisions by 2 users not shown)
Line 19:
 
What is the meaning of the second argument?
 
: The second argument is used to specify the number of decimal digits to be displayed (spit).     -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 18:29, 1 August 2021 (UTC)
 
 
The REXX Version shows:
Line 33 ⟶ 36:
 
: The REXX program was incorrectly not accounting for the displaying of the decimal point   (as it was counting it as a decimal digit).   The program has been corrected.     -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 18:22, 1 August 2021 (UTC)
 
: Also note that REXX program doesn't round the result (digits being displayed/spit).     -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 18:29, 1 August 2021 (UTC)
:: Actually, in my opinion it should (round for the last digit) to get correct 80 digits!
<pre>
.44721359549995793928183473374625524708812367192230514485417944908210418512756097988288288167575
.44721359549995793928183473374625524708812367192230514485417944908210418512756097
</pre>
::--Walter Pachl 18:54, 1 August 2021 (UTC)
 
::: In order to round, &nbsp; the REXX program would have to compute the &nbsp; ''next'' &nbsp; decimal digit. &nbsp; Bear in mind that the last decimal digit has already been computed and displayed (spit) to the terminal screen, &nbsp; so rounding in a spigot algorithm could entail &nbsp; ''backing up'' &nbsp; and changing (undoing) the previous decimal digit that was already just displayed (spit). &nbsp; With irrational numbers, &nbsp; there is no correct last decimal digit. &nbsp; Spigot algorithms are not designed for rounding, &nbsp; but for spitting digits one at a time. &nbsp; Rounding can be incorporated into the routine &nbsp; (by withholding one decimal digit), &nbsp; but would unnecessary complicate any program and make the comparisons of computer programming languages more problematic. &nbsp; &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 20:38, 1 August 2021 (UTC)
::::I see. Thanks. --Walter Pachl 06:02, 2 August 2021 (UTC)
2,289

edits