Created
January 19, 2014 16:11
-
-
Save cohalz/8506978 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let pos n = | |
let rec neg(n, k,i) = | |
if(n-k < 0) then 0.0 | |
else if i mod 2 = 0 then neg(n,k+1,i+1) +. 1.0 /. float_of_int(4* (n-k) + 1) | |
else neg(n,k,i+1) -. 1.0 /. (float_of_int(4*(n-k)+3)) in | |
neg(n,0,0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment