Update list-pi.ps1

This commit is contained in:
Markus Fleschutz 2022-12-04 10:23:03 +01:00
parent e17b81d653
commit fdaa75ddfd

View File

@ -4,7 +4,7 @@
.DESCRIPTION
This PowerShell script calculates and lists the digits of the mathematical constant PI.
.PARAMETER digits
Specifies the number of digits to list (10000 by default)
Specifies the number of digits to list (1000 by default)
.EXAMPLE
PS> ./list-pi
3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342...
@ -14,7 +14,7 @@
Author: Markus Fleschutz | License: CC0
#>
param([int]$Digits = 10000)
param([int]$Digits = 1000)
function List-Pi ( $Digits ) {
$Big = [bigint[]](0..10)
@ -62,6 +62,7 @@ function List-Pi ( $Digits ) {
$r = $nr
}
}
Write-Host "... ($Digits digits)"
}
try {