4 Copyright (c) 2012 The Chromium Authors. All rights reserved.
5 Use of this source code is governed by a BSD-style license that can be
6 found in the LICENSE file.
9 <meta http-equiv=
"Pragma" content=
"no-cache">
10 <meta http-equiv=
"Expires" content=
"-1">
11 <title>{{title}}
</title>
12 <script type=
"text/javascript" src=
"common.js"></script>
13 <script type=
"text/javascript" src=
"example.js"></script>
17 <h2>Status:
<code id=
"statusField">NO-STATUS
</code></h2>
19 The Native Client module executed in this page creates a thread that
20 estimates pi (
π) using the Monte Carlo method. The thread randomly puts
21 1,
000,
000,
000 points inside a square that shares two sides with a quarter
22 circle (a quadrant). Because the area of the quadrant is r
²π/
4 and
23 the area of the square is r
², dividing the number of points inside the
24 quadrant by the number of points inside the square gives us an estimate of
25 π/
4. The textbox under the square shows the current estimate of
π.
27 <!-- The NaCl plugin will be embedded inside the element with id "listener".
29 <div id=
"listener"></div>
30 <input type=
"text" size=
"15" id=
"pi">