Talk:Isqrt (integer square root) of X: Difference between revisions

From Rosetta Code
Content added Content deleted
m (→‎Some Languages...: added some comments.)
m (→‎Some Languages...: added update about Raku)
Line 1: Line 1:
==Some Languages...==
==Some Languages...==
...aren't implementing the quadratic residue algorithm. I fixed a couple (perhaps clumsily) and marked Seed7 as bad (it uses the built-in sqrt() function). Raku is also wrong, as it links to another sqrt task which doesn't utilize the qr algo.
...aren't implementing the quadratic residue algorithm. I fixed a couple (perhaps clumsily) and marked Seed7 as bad (it uses the built-in sqrt() function). <strike>Raku is also wrong, as it links to another sqrt task which doesn't utilize the qr algo.</strike>


Just a reminder, the task is not to compute square roots in any way, it is to implement the quadratic residue method of computing the square root. --[[User:Enter your username|Enter your username]] ([[User talk:Enter your username|talk]]) 09:33, 9 December 2020 (UTC)
Just a reminder, the task is not to compute square roots in any way, it is to implement the quadratic residue method of computing the square root. --[[User:Enter your username|Enter your username]] ([[User talk:Enter your username|talk]]) 09:33, 9 December 2020 (UTC)
Line 23: Line 23:


L I was hoping someone (maybe some other Rosetta Code administrator) would eventually notice and provide a remedy and possibly take some action.
L I was hoping someone (maybe some other Rosetta Code administrator) would eventually notice and provide a remedy and possibly take some action.

:Update: added qr algo to Raku entry. --[[User:Enter your username|Enter your username]] ([[User talk:Enter your username|talk]]) 22:28, 9 December 2020 (UTC)

Revision as of 22:29, 9 December 2020

Some Languages...

...aren't implementing the quadratic residue algorithm. I fixed a couple (perhaps clumsily) and marked Seed7 as bad (it uses the built-in sqrt() function). Raku is also wrong, as it links to another sqrt task which doesn't utilize the qr algo.

Just a reminder, the task is not to compute square roots in any way, it is to implement the quadratic residue method of computing the square root. --Enter your username (talk) 09:33, 9 December 2020 (UTC)

Yes, I couldn't agree more!   I   (the Rosetta Code task's author)   was thinking about flagging it as incorrect for a multitude of reasons   (but I have not for various reasons that be not mentioned):
  •   It says there is already a task that covers exactly this operation, but it is not even close to this task's square root method (quadratic residue).
  •   It offers no solution, but a comment that says to see something else instead of entering a programming solution.
  •   It proposes to point to another solution, but that solution does not use the required quadratic residue method, nor does it only use integer arithmetic.
  •   It does not provide   any   programming solution nor any output as per the task's requirement.


Maybe something like:


This example is incorrect. Please fix the code and remove this message.

Details:

In the task's preamble, it states:

For this task,   the integer square root of a non─negative number will be computed using a version of quadratic residue, ...


Please include a programming example that uses the shown pseudo-code to compute the integer square root of   X.


This example does not show the output mentioned in the task description on this page (or a page linked to from here). Please ensure that it meets all task requirements and remove this message.
Note that phrases in task descriptions such as "print and display" and "print and show" for example, indicate that (reasonable length) output be a part of a language's solution.




L I was hoping someone (maybe some other Rosetta Code administrator) would eventually notice and provide a remedy and possibly take some action.

Update: added qr algo to Raku entry. --Enter your username (talk) 22:28, 9 December 2020 (UTC)