Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,20 +0,0 @@
|
|||
function pow($a, [int]$b) {
|
||||
if ($b -eq -1) { return 1/$a }
|
||||
if ($b -eq 0) { return 1 }
|
||||
if ($b -eq 1) { return $a }
|
||||
if ($b -lt 0) {
|
||||
$rec = $true # reciprocal needed
|
||||
$b = -$b
|
||||
}
|
||||
|
||||
$result = $a
|
||||
2..$b | ForEach-Object {
|
||||
$result *= $a
|
||||
}
|
||||
|
||||
if ($rec) {
|
||||
return 1/$result
|
||||
} else {
|
||||
return $result
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue