RosettaCodeData/Task/Continued-fraction/F-Sharp/continued-fraction-7.fs
2023-07-01 13:44:08 -04:00

3 lines
295 B
FSharp

let ()=let mutable n=0 in (fun ()->n<-n+1;-decimal(pown n 6))
let ()=let mutable n=0M in (fun ()->n<-n+1M; (2M*n-1M)*(17M*n*n-17M*n+5M))
cf2S (()) (()) |>Seq.map(fun n->6M/n) |> Seq.take 10 |> Seq.pairwise |> Seq.iter(fun(n,g)->printfn "%1.20f < p < %- 1.20f" (min n g) (max n g));;