Talk:Integer roots: Difference between revisions

From Rosetta Code
Content added Content deleted
m (→‎as a test...: added another query.)
Line 1: Line 1:
==as a test...==
==as a test...==
Does &nbsp; &nbsp; <big> ''As a test, you <u>can</u> calculate ···'' </big> &nbsp; &nbsp; to be taken literally, or should it be inferred that it &nbsp; '''is''' &nbsp; to be the test? &nbsp; The underscoring was added by me. &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 01:47, 11 May 2016 (UTC)
Does &nbsp; &nbsp; <big> ''As a test, you <u>can</u> calculate ···'' </big> &nbsp; &nbsp; to be taken literally, or should it be inferred that it &nbsp; '''is''' &nbsp; to be the test? &nbsp; The underscoring was added by me. &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 01:47, 11 May 2016 (UTC)



Do you mean the '''test''' is the algorithm to be used, or just a suggestion that that's '''the''' method &nbsp; (or '''a''' method) &nbsp; to be used? &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 01:47, 11 May 2016 (UTC)
Do you mean the '''test''' is the algorithm to be used, or just a suggestion that that's '''the''' method &nbsp; (or '''a''' method) &nbsp; to be used? &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 01:47, 11 May 2016 (UTC)


:Perhaps this is misleading. It certainly should not be the '''only''' test.


How should entries handle the case of a &nbsp; zero &nbsp; root? &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 01:47, 11 May 2016 (UTC)
How should entries handle the case of a &nbsp; zero &nbsp; root? &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 01:47, 11 May 2016 (UTC)


:Uncertain about that - ideas?


In the task's requirements, it's mentioned that &nbsp; '''N''' &nbsp; is an integer. &nbsp; If &nbsp; '''N''' &nbsp; is negative, it means that the resultant root is the reciprocal of the &nbsp; abs('''N''')<sup>th</sup> &nbsp; root. &nbsp; Is this the intent of the task? &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 01:56, 11 May 2016 (UTC)
In the task's requirements, it's mentioned that &nbsp; '''N''' &nbsp; is an integer. &nbsp; If &nbsp; '''N''' &nbsp; is negative, it means that the resultant root is the reciprocal of the &nbsp; abs('''N''')<sup>th</sup> &nbsp; root. &nbsp; Is this the intent of the task? &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 01:56, 11 May 2016 (UTC)


:I would change that to "non-negative integer".


In the interim, for the REXX computer language entry, I used a general-purpose integer root (of any number) which bypasses the problem of multiplying a number by a gihugeic number to get around the problems with handling a decimal fraction. &nbsp; The numbers being passed to the &nbsp; '''iRoot''' &nbsp; function could mimic the suggested method if required.
In the interim, for the REXX computer language entry, I used a general-purpose integer root (of any number) which bypasses the problem of multiplying a number by a gihugeic number to get around the problems with handling a decimal fraction. &nbsp; The numbers being passed to the &nbsp; '''iRoot''' &nbsp; function could mimic the suggested method if required.

Revision as of 02:26, 11 May 2016

as a test...

Does     As a test, you can calculate ···     to be taken literally, or should it be inferred that it   is   to be the test?   The underscoring was added by me.   -- Gerard Schildberger (talk) 01:47, 11 May 2016 (UTC)

Do you mean the test is the algorithm to be used, or just a suggestion that that's the method   (or a method)   to be used?   -- Gerard Schildberger (talk) 01:47, 11 May 2016 (UTC)

Perhaps this is misleading. It certainly should not be the only test.

How should entries handle the case of a   zero   root?   -- Gerard Schildberger (talk) 01:47, 11 May 2016 (UTC)

Uncertain about that - ideas?

In the task's requirements, it's mentioned that   N   is an integer.   If   N   is negative, it means that the resultant root is the reciprocal of the   abs(N)th   root.   Is this the intent of the task?   -- Gerard Schildberger (talk) 01:56, 11 May 2016 (UTC)

I would change that to "non-negative integer".

In the interim, for the REXX computer language entry, I used a general-purpose integer root (of any number) which bypasses the problem of multiplying a number by a gihugeic number to get around the problems with handling a decimal fraction.   The numbers being passed to the   iRoot   function could mimic the suggested method if required.

The REXX entry also handles negative roots, which are allowed by the current task requirements.   -- Gerard Schildberger (talk) 01:47, 11 May 2016 (UTC)