Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let zad9 (x: float) (y: float) = Seq.initInfinite (fun p -> (System.Math.Sin((x*y)/(float p + 1.0)) |> System.Math.Sqrt) - 2.0)
- let zad9_1 (x: float) (y: float) = seq {
- let p = ref 0.0
- while true do
- let wyrazenie = System.Math.Sqrt(System.Math.Sin((x * y)/(!p + 1.0))) - 2.0
- yield wyrazenie
- p := !p + 1.0
- }
- let zad9_2 (x: float) (y: float) = seq {
- let mutable p: float = 0.0
- while true do
- let wyrazenie = System.Math.Sqrt(System.Math.Sin((x * y) / (p + 1.0))) - 2.0
- yield wyrazenie
- p <- p + 1.0
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement