Talk:Nth root: Difference between revisions

From Rosetta Code
Content added Content deleted
(fixing header typo)
No edit summary
Line 1: Line 1:
== Comparison to Non-integer Exponentiation ==
==Comparison to Non-integer Exponentiation==
Okay, I get that this task calls for implementing a particular algorithm (convergence by successive approximation). However, it seems like it would be appropriate to describe (in comments perhaps) whether the language supports a more direct method of computing an nth root (such as raising a number to a fractional power: x ** (1/n) for the nth root of x).
Okay, I get that this task calls for implementing a particular algorithm (convergence by successive approximation). However, it seems like it would be appropriate to describe (in comments perhaps) whether the language supports a more direct method of computing an nth root (such as raising a number to a fractional power: x ** (1/n) for the nth root of x).


For those languages which support it (non-integer exponentiation; or via any library function) I'd also recommend that the task specify that the code should compare the results of this algorithm versus the one obtained in the language's most natural native method. [[User:JimD|JimD]] 22:03, 3 August 2009 (UTC)
For those languages which support it (non-integer exponentiation; or via any library function) I'd also recommend that the task specify that the code should compare the results of this algorithm versus the one obtained in the language's most natural native method. [[User:JimD|JimD]] 22:03, 3 August 2009 (UTC)
:Exponentiation operators should be discussed in [[Math constants and functions]]. Comparisons could be added optionally. --[[User:Mwn3d|Mwn3d]] 22:14, 3 August 2009 (UTC)

Revision as of 22:14, 3 August 2009

Comparison to Non-integer Exponentiation

Okay, I get that this task calls for implementing a particular algorithm (convergence by successive approximation). However, it seems like it would be appropriate to describe (in comments perhaps) whether the language supports a more direct method of computing an nth root (such as raising a number to a fractional power: x ** (1/n) for the nth root of x).

For those languages which support it (non-integer exponentiation; or via any library function) I'd also recommend that the task specify that the code should compare the results of this algorithm versus the one obtained in the language's most natural native method. JimD 22:03, 3 August 2009 (UTC)

Exponentiation operators should be discussed in Math constants and functions. Comparisons could be added optionally. --Mwn3d 22:14, 3 August 2009 (UTC)