Nth root: Difference between revisions
Added Dart
(→{{header|Raku}}: create an infix operator and use a sequence) |
(Added Dart) |
||
Line 1,639:
<pre>7131.5
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}}==
|