Skip to content

Instantly share code, notes, and snippets.

@zaersk
Last active August 29, 2015 14:05
Show Gist options
  • Save zaersk/71d5869282d4d9da7b29 to your computer and use it in GitHub Desktop.
Save zaersk/71d5869282d4d9da7b29 to your computer and use it in GitHub Desktop.
func ζ(s:Int) -> Double {
var i : Double = Double()
var sum : Double = Double()
for (var i = 1.0; i < Double.infinity; i++) {
sum += (1 / pow(i, Double(s)))
}
return sum
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment