diff --git a/docs/fundamentals/runtime-libraries/snippets/System/Double/Overview/fsharp/precisionlist5.fs b/docs/fundamentals/runtime-libraries/snippets/System/Double/Overview/fsharp/precisionlist5.fs deleted file mode 100644 index 7fc41f2087328..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System/Double/Overview/fsharp/precisionlist5.fs +++ /dev/null @@ -1,28 +0,0 @@ -module precisionlist5 - -// -open System -open System.IO - -let values = [ 2.2 / 1.01; 1. / 3.; Math.PI ] - -using (new StreamWriter(@".\Doubles.dat")) (fun sw -> - for i = 0 to values.Length - 1 do - sw.Write $"""{values[i]:G17}{if i < values.Length - 1 then "|" else ""}""") - -using (new StreamReader(@".\Doubles.dat")) (fun sr -> - let temp = sr.ReadToEnd() - let tempStrings = temp.Split '|' - - let restoredValues = - [ for i = 0 to tempStrings.Length - 1 do - Double.Parse tempStrings[i] ] - - for i = 0 to values.Length - 1 do - printfn $"""{restoredValues[i]} {if values[i].Equals restoredValues[i] then "=" else "<>"} {values[i]}""") - -// The example displays the following output: -// 2.17821782178218 = 2.17821782178218 -// 0.333333333333333 = 0.333333333333333 -// 3.14159265358979 = 3.14159265358979 -// \ No newline at end of file diff --git a/docs/fundamentals/runtime-libraries/snippets/System/Single/Overview/fsharp/PrecisionList5a.fs b/docs/fundamentals/runtime-libraries/snippets/System/Single/Overview/fsharp/PrecisionList5a.fs deleted file mode 100644 index f6eed8eab0f16..0000000000000 --- a/docs/fundamentals/runtime-libraries/snippets/System/Single/Overview/fsharp/PrecisionList5a.fs +++ /dev/null @@ -1,26 +0,0 @@ -module PrecisionList5a - -// -open System -open System.IO - -let values = [| 3.2f / 1.11f; 1f / 3f; MathF.PI |] - -do - use sw = new StreamWriter(@".\Singles.dat") - for i = 0 to values.Length - 1 do - sw.Write $"""{values[i]:G9}{if i < values.Length - 1 then "|" else ""}""" - - -let restoredValues = - use sr = new StreamReader(@".\Singles.dat") - sr.ReadToEnd().Split '|' - |> Array.map Single.Parse - -for i = 0 to values.Length - 1 do - printfn $"""{values[i]} {if values[i].Equals restoredValues[i] then "=" else "<>"} {restoredValues[i]}""" -// The example displays the following output: -// 2.882883 = 2.882883 -// 0.3333333 = 0.3333333 -// 3.141593 = 3.141593 -// \ No newline at end of file