Skip to content
Prev Previous commit
Next Next commit
minor adjustments
* fixed snippet number
* fixed float printing to be more consistent with .ToString()
  • Loading branch information
albert-du committed Oct 30, 2021
commit 445780a427975a212e1131109fd4035801aeb5e8
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ for _ = 1 to rows do
printfn ""

printfn $"""
To demonstrate the proportional distribution,
{runCount:N0} random
To demonstrate the proportional distribution, {runCount:N0} random
integers and doubles are grouped into {distGroupCount} equal value ranges. This
is the count of values in each range:
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ open System
let rnd = Random()

for _ = 1 to 10 do
printfn "%f" (rnd.NextDouble() - 1.0)
printfn "%O" (rnd.NextDouble() - 1.0)

// The example displays output like the following:
// -0.930412760437658
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
open System

// <Snippet18>
// <Snippet14>
[<Literal>]
let ONE_TENTH = 922337203685477581L

Expand Down Expand Up @@ -32,4 +32,4 @@ for i = 0 to 9 do
// 6,456,360,425,798,343,067-7,378,697,629,483,820,647 2,001,637 10.01 %
// 7,378,697,629,483,820,648-8,301,034,833,169,298,228 2,002,870 10.01 %
// 8,301,034,833,169,298,229-9,223,372,036,854,775,807 2,000,303 10.00 %
// </Snippet18>
// </Snippet14>