8 lines
332 B
Text
8 lines
332 B
Text
$x = @(1, 2, 3, 1e11)
|
|
$y = @(1, 1.4142135623730951, 1.7320508075688772, 316227.76601683791)
|
|
$xprecision = 3
|
|
$yprecision = 5
|
|
$arr = foreach($i in 0..($x.count-1)) {
|
|
[pscustomobject]@{x = "{0:g$xprecision}" -f $x[$i]; y = "{0:g$yprecision}" -f $y[$i]}
|
|
}
|
|
($arr | format-table -HideTableHeaders | Out-String).Trim() > filename.txt
|