Skip to content

Commit 65731b8

Browse files
committed
---
yaml --- r: 128983 b: refs/heads/try c: 8658722 h: refs/heads/master i: 128981: 8e7f2dc 128979: 3bcc2b9 128975: 45782a6 v: v3
1 parent 9a2daec commit 65731b8

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 07d86b46a949a94223da714e35b343243e4ecce4
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: a86d9ad15e339ab343a12513f9c90556f677b9ca
5-
refs/heads/try: 348132196a1a25336d2df6b6e0989540cdc8f7e1
5+
refs/heads/try: 86587224d0b99c69da01ebfaf98052694036302b
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/libstd/rand/mod.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,20 +70,20 @@
7070
//! println!("{}", tuple)
7171
//! ```
7272
//!
73-
//! ## Monte Carlo estimation of pi
73+
//! ## Monte Carlo estimation of π
7474
//!
7575
//! For this example, imagine we have a square with sides of length 2 and a unit
76-
//! circle, both centered at the origin. Since the area of a unit circle is pi,
77-
//! the ratio
76+
//! circle, both centered at the origin. Since the area of a unit circle is π,
77+
//! we have:
7878
//!
7979
//! ```notrust
80-
//! (area of unit circle) / (area of square)
80+
//! (area of unit circle) / (area of square) = π / 4
8181
//! ```
8282
//!
83-
//! is equal to pi / 4. So if we sample many points randomly from the square,
84-
//! roughly pi / 4 of them should be inside the circle.
83+
//! So if we sample many points randomly from the square, roughly π / 4 of them
84+
//! should be inside the circle.
8585
//!
86-
//! We can use the above fact to estimate the value of pi: pick many points in the
86+
//! We can use the above fact to estimate the value of π: pick many points in the
8787
//! square at random, calculate the fraction that fall within the circle, and
8888
//! multiply this fraction by 4.
8989
//!

0 commit comments

Comments
 (0)