Nth root: Difference between revisions

Content deleted Content added
Grondilu (talk | contribs)
→‎{{header|Raku}}: create an infix operator and use a sequence
Jjuanhdez (talk | contribs)
Added Dart
Line 1,639: Line 1,639:
<pre>7131.5
<pre>7131.5
2</pre>
2</pre>

=={{header|Dart}}==
<syntaxhighlight lang="dart">import 'dart:math' show pow;

num nroot(num value, num degree) {
return pow(value, (1 / degree));
}

void main() {
int n = 15;
num x = pow(-3.14159, 15);
print('root($n, $x) = ${nroot(n, x)}');
}</syntaxhighlight>


=={{header|Delphi}}==
=={{header|Delphi}}==