/
index.html
92 lines (85 loc) · 4.06 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<!doctype html>
<html>
<head>
<!-- Basics -->
<meta charset="utf-8">
<title>Monte Carlo Calculator</title>
<!-- Mobile Friendly -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<!--meta http-equiv="X-UA-Compatible" content="IE=edge"-->
<!-- Stylesheet -->
<link rel="stylesheet" href="assets/css/site.css">
<!-- Fonts -->
<style>
@import url('https://fonts.googleapis.com/css2?family=Arvo&family=Roboto&family=Roboto+Mono:wght@300&display=swap');
</style>
<!-- Mathjax -->
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
<!-- d3.js -->
<!-- <script src="https://d3js.org/d3.v4.js"></script> -->
<!-- Calculator Script -->
<script src="assets/js/calculator.js"></script>
</head>
<body>
<header>
<h1 class="center">Monte Carlo Calculator</h1>
<a class="home center" href="https://philswatton.github.io/projects">Back to projects</a>
<a class="home center" href="about.html">About</a>
</header>
<main>
<form name="calculator" class="calculator center" id="calculator">
<input onKeyDown="limit()" value="15/(4~6)" name="formula" id="formula"><!--3^(2~4)-->
<br>
<div class="pad">
<button type="button" onclick="press('7')">7</button>
<button type="button" onclick="press('8')">8</button>
<button type="button" onclick="press('9')">9</button>
<button type="button" onclick="press('+')">+</button>
<button type="button" onclick="press('-')">-</button>
<button type="button" onclick="press('4')">4</button>
<button type="button" onclick="press('5')">5</button>
<button type="button" onclick="press('6')">6</button>
<button type="button" onclick="press('*')">x</button>
<button type="button" onclick="press('/')">÷</button>
<button type="button" onclick="press('1')">1</button>
<button type="button" onclick="press('2')">2</button>
<button type="button" onclick="press('3')">3</button>
<button type="button" onclick="press('^')">^</button>
<button type="button" onclick="press('.')">.</button>
<span></span>
<button type="button" onclick="press('0')">0</button>
<span></span>
<button type="button" onclick="press('(')">(</button>
<button type="button" onclick="press(')')">)</button>
<span></span>
<button type="button" onclick="press('~')">~</button>
<span></span>
<button type="button" onclick="del()">DEL</button>
<button type="button" id="equals">=</button>
</div>
<br>
<div class="draw-div">
<p>Draws:</p>
<input type="number" min="1000" value="10000" id="draws">
</div>
</form>
<section class="output">
<div class="output-numbers">
<div class="output-div">
<p class="output-label">Expected outcome:</p>
<p id="output-mean"></p>
</div>
<div class="output-div">
<p class="output-label">95% range:</p>
<p id="output-range"></p>
</div>
</div>
<div class="vis-panel">
<svg id="histogram" height="400">
</svg>
</div>
</section>
</main>
</body>
</html>