Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,49 +0,0 @@
|
|||
function Get-Tpk
|
||||
{
|
||||
[CmdletBinding()]
|
||||
[OutputType([PSCustomObject])]
|
||||
Param
|
||||
(
|
||||
[Parameter(Mandatory=$true,
|
||||
ValueFromPipeline=$true,
|
||||
ValueFromPipelineByPropertyName=$true,
|
||||
Position=0)]
|
||||
[double]
|
||||
$Number
|
||||
)
|
||||
|
||||
Begin
|
||||
{
|
||||
function Get-TpkFunction ([double]$Number)
|
||||
{
|
||||
[Math]::Pow([Math]::Abs($Number),(0.5)) + 5 * [Math]::Pow($Number,3)
|
||||
}
|
||||
|
||||
[object[]]$output = @()
|
||||
}
|
||||
Process
|
||||
{
|
||||
$Number | ForEach-Object {
|
||||
$n = Get-TpkFunction $_
|
||||
|
||||
if ($n -le 400)
|
||||
{
|
||||
$result = $n
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = "Overflow"
|
||||
}
|
||||
}
|
||||
|
||||
$output += [PSCustomObject]@{
|
||||
Number = $Number
|
||||
Result = $result
|
||||
}
|
||||
}
|
||||
End
|
||||
{
|
||||
[Array]::Reverse($output)
|
||||
$output
|
||||
}
|
||||
}
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
$tpk = 1..11 | Get-Tpk
|
||||
$tpk
|
||||
|
|
@ -1 +0,0 @@
|
|||
$tpk | where result -ne overflow | sort number
|
||||
Loading…
Add table
Add a link
Reference in a new issue