-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
166 lines (159 loc) · 10.8 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<title>Scientific Calculator</title>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0" />
<meta name="description" content="This scientific calculator is a free tool that solves complex mathematical expressions by supporting several built-in functions.">
<link rel="preload" href="./assets/fonts/inter-v12-latin-regular.woff2" as="font" crossorigin type="font/woff2">
<link rel="preload" href="./assets/fonts/inter-v12-latin-500.woff2" as="font" crossorigin type="font/woff2">
<link rel="preload" href="./assets/fonts/inter-v12-latin-600.woff2" as="font" crossorigin type="font/woff2">
<link rel="preload" href="./assets/fonts/inter-v12-latin-800.woff2" as="font" crossorigin type="font/woff2">
<script type="text/javascript">
window._ = document.getElementById.bind(document);
window.$ = document.querySelector.bind(document);
window.$$ = document.querySelectorAll.bind(document);
window.defaultSystem = "imperial";
localStorage.setItem("theme", "light");
</script>
<link rel="stylesheet" href="./assets/css/main.min.css" />
<script src="./assets/js/all-calculators.js" defer></script>
</head>
<body style="background-color: transparent !important; min-height: 0 !important">
<div style="width: 100%;">
<div style="width:350px;float:left;padding: 15px;">
<div class="calculator-settings">
<div class="calculator-setting" id="calculator_form">
<div class="calculator-content calculator-content--scientific col">
<span>
<input class="calculator-basic__input" id="input_field" value="0" type="text" onkeydown="ScientificCalculator.inputKeydown(event)" style=" margin-bottom: 0;">
<div>
<span class="input-hints__hint input-hints__hint--comma" id="expression_element" style="padding-top:0;margin-top: 0;display: none;"></span>
</div>
</span>
<div class="calculator-basic" onclick="ScientificCalculator.buttonClick(event)">
<div>
<div class="input-wrapper row">
<label class="input col">
<input type="hidden" value="trig" id="type"/>
<button class="button-switcher button-switcher--active" type="button" onclick="switcher(this, 'type', '')" value="trig" id="type-a">
<span class="button-switcher__text button-switcher__text--active">TRIG</span>
</button>
</label>
<label class="input col">
<button class="button-switcher" type="button" onclick="switcher(this, 'type', '')" value="alg" id="type-b">
<span class="button-switcher__text">ALG</span>
</button>
</label>
<!-- <label class="input col">
<input type="hidden" value="trig" id="scientific"/>
<button class="button-switcher button-switcher--active" type="button" onclick="switcher(this, 'scientific')" value="trig" id="scientific-a">
<span class="button-switcher__text button-switcher__text--active">TRIG</p>
</button>
</label>
<label class="input col">
<button class="button-switcher" type="button" onclick="switcher(this, 'scientific')" value="alg" id="scientific-b">
<span class="button-switcher__text">ALG</p>
</button>
</label> -->
</div>
<button class="purple" data-persistent-action="rad-deg">Rad</button>
</div>
<div>
<button class="action-dark type related-to-type-trig tab--active" data-action="sin">sin</button>
<button class="action-dark type related-to-type-trig tab--active" data-action="cos">cos</button>
<button class="action-dark type related-to-type-trig tab--active" data-action="tan">tan</button>
<button class="action-dark type related-to-type-alg related-item-hidden" data-action="^2">x<sup>2</sup></button>
<button class="action-dark type related-to-type-alg related-item-hidden" data-action="^3">x<sup>3</sup></button>
<button class="action-dark type related-to-type-alg related-item-hidden" data-action="^">x<sup>y</sup></button>
<button class="purple" data-action="*10^">EE</button>
</div>
<div>
<button class="action-dark type related-to-type-trig tab--active" data-action="sinh">sinh</button>
<button class="action-dark type related-to-type-trig tab--active" data-action="cosh">cosh</button>
<button class="action-dark type related-to-type-trig tab--active" data-action="tanh">tanh</button>
<button class="action-dark type related-to-type-alg related-item-hidden" data-action="^(1/2)"><sup>2</sup>√x</button>
<button class="action-dark type related-to-type-alg related-item-hidden" data-action="^(1/3)"><sup>3</sup>√x</button>
<button class="action-dark type related-to-type-alg related-item-hidden" data-action="x^(1/y"><sup>y</sup>√x</button>
<button class="purple" data-action="rnd">Rand</button>
</div>
<div>
<button class="action-dark type related-to-type-trig tab--active" data-action="acos">cos<sup>-1</sup></button>
<button class="action-dark type related-to-type-trig tab--active" data-action="asin">sin<sup>-1</sup></button>
<button class="action-dark type related-to-type-trig tab--active" data-action="atan">tan<sup>-1</sup></button>
<button class="action-dark type related-to-type-alg related-item-hidden" data-action="!">x!</button>
<button class="action-dark type related-to-type-alg related-item-hidden" data-action="10^">10<sup>x</sup></button>
<button class="action-dark type related-to-type-alg related-item-hidden" data-action="ln">ln</button>
<button class="purple" data-action="e">e</button>
</div>
<div>
<button class="action-dark type related-to-type-trig tab--active" data-action="asinh">sinh<sup>-1</sup></button>
<button class="action-dark type related-to-type-trig tab--active" data-action="acosh">cosh<sup>-1</sup></button>
<button class="action-dark type related-to-type-trig tab--active" data-action="atanh">tanh<sup>-1</sup></button>
<button class="action-dark type related-to-type-alg related-item-hidden" data-action="log2">log<sub>2</sub></button>
<button class="action-dark type related-to-type-alg related-item-hidden" data-action="log(x,y">log<sub>y</sub></button>
<button class="action-dark type related-to-type-alg related-item-hidden" data-action="log10">log<sub>10</sub></button>
<button class="purple" data-action="pi">π</button>
</div>
<div>
<button class="gray-main" data-persistent-action="mrc">MRC</button>
<button class="gray-main" data-action="m+">M+</button>
<button class="gray-main" data-action="m-">M-</button>
<button class="action" data-action="%">%</button>
</div>
<div>
<button class="gray-main" data-action="AC">AC</button>
<button class="gray-main" data-action="(">(</button>
<button class="gray-main" data-action=")">)</button>
<button class="action" data-action="±">±</button>
</div>
<div>
<button >7</button>
<button >8</button>
<button >9</button>
<button class="action text-2xl" data-action="/">÷</button>
</div>
<div>
<button >4</button>
<button >5</button>
<button >6</button>
<button class="action text-2xl" data-action="*">×</button>
</div>
<div>
<button >1</button>
<button >2</button>
<button >3</button>
<button class="action text-2xl" data-action="-">−</button>
</div>
<div>
<button >0</button>
<button >.</button>
<button class="indigo text-2xl" data-action="=">=</button>
<button class="action text-2xl" data-action="+">+</button>
</div>
</div>
</div>
<script type="text/javascript" src="./assets/js/lib/math.min.js" async></script>
<script type="text/javascript" src="./assets/js/calculator.js" async></script> </div>
</div>
</div>
<div style="float:left;padding: 15px; overflow: scroll;">
<div class="calculator-result calculator-result--error col" id="error-box">
<div class="row">
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M10 18C14.4183 18 18 14.4183 18 10C18 5.58172 14.4183 2 10 2C5.58172 2 2 5.58172 2 10C2 14.4183 5.58172 18 10 18ZM8.70711
7.29289C8.31658 6.90237 7.68342 6.90237 7.29289 7.29289C6.90237 7.68342 6.90237 8.31658 7.29289 8.70711L8.58579 10L7.29289 11.2929C6.90237 11.6834 6.90237 12.3166 7.29289
12.7071C7.68342 13.0976 8.31658 13.0976 8.70711 12.7071L10 11.4142L11.2929 12.7071C11.6834 13.0976 12.3166 13.0976 12.7071 12.7071C13.0976 12.3166 13.0976 11.6834 12.7071
11.2929L11.4142 10L12.7071 8.70711C13.0976 8.31658 13.0976 7.68342 12.7071 7.29289C12.3166 6.90237 11.6834 6.90237 11.2929 7.29289L10 8.58579L8.70711 7.29289Z" fill="#F87171" class="dark:fill-red-200"></path>
</svg>
<p class="calculator-error__title">There was an error with your calculation.</p>
</div>
<div class="col" id="error-list"></div>
</div> <span id="calculator_result"></span>
</div>
</div>
<script async src="./assets/js/lib/math.min.js"></script>
<script defer src="./assets/js/functions.js"></script>
</body>
</html>