Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,23 +0,0 @@
|
|||
$A = 0
|
||||
$LogG = 0
|
||||
$InvH = 0
|
||||
|
||||
$ii = 1..10
|
||||
foreach($i in $ii) {
|
||||
# Arithmetic mean is computed directly
|
||||
$A += $i / $ii.Count
|
||||
# Geometric mean is computed using Logarithms
|
||||
$LogG += [Math]::Log($i) / $ii.Count
|
||||
# Harmonic mean is computed using its inverse
|
||||
$InvH += 1 / ($i * $ii.Count)
|
||||
}
|
||||
|
||||
$G = [Math]::Exp($LogG)
|
||||
$H = 1/$InvH
|
||||
|
||||
write-host "Arithmetic mean: A = $A"
|
||||
write-host "Geometric mean: G = $G"
|
||||
write-host "Harmonic mean: H = $H"
|
||||
|
||||
write-host "Is A >= G ? $($A -ge $G)"
|
||||
write-host "Is G >= H ? $($G -ge $H)"
|
||||
Loading…
Add table
Add a link
Reference in a new issue