Deming's funnel: Difference between revisions

Content added Content deleted
m (Reformatting.)
m (→‎{{header|Wren}}: Minor tidy)
Line 2,440: Line 2,440:
{{trans|Go}}{{libheader|Wren-math}}
{{trans|Go}}{{libheader|Wren-math}}
{{libheader|Wren-fmt}}
{{libheader|Wren-fmt}}
<syntaxhighlight lang="ecmascript">import "/math" for Nums
<syntaxhighlight lang="wren">import "./math" for Nums
import "/fmt" for Fmt
import "./fmt" for Fmt


var dxs = [
var dxs = [
Line 2,490: Line 2,490:
var rys = funnel.call(dys, r)
var rys = funnel.call(dys, r)
System.print("%(label) : x y")
System.print("%(label) : x y")
System.print("Mean : %(Fmt.f(7, Nums.mean(rxs), 4)), %(Fmt.f(7, Nums.mean(rys), 4))")
Fmt.print("Mean : $7.4f, $7.4f", Nums.mean(rxs), Nums.mean(rys))
System.print("Std Dev : %(Fmt.f(7, Nums.popStdDev(rxs), 4)), %(Fmt.f(7, Nums.popStdDev(rys), 4))")
Fmt.print("Std Dev : $7.4f, $7.4f", Nums.popStdDev(rxs), Nums.popStdDev(rys))
System.print()
Fmt.print()
}
}