Cumulative standard deviation: Difference between revisions

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


var cumStdDev = Fiber.new { |a|
var cumStdDev = Fiber.new { |a|
Line 4,457: Line 4,457:
var sd = cumStdDev.call(a)
var sd = cumStdDev.call(a)
if (cumStdDev.isDone) return
if (cumStdDev.isDone) return
System.print("Std Dev : %(Fmt.f(10, sd, 8))\n")
Fmt.print("Std Dev : $10.8f\n", sd)
}</syntaxhighlight>
}</syntaxhighlight>