-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
59 lines (40 loc) · 1.23 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
<!DOCTYPE html>
<html>
<head>
<meta charset = "UTF-8">
<title>Floating point overview!</title>
<script language = "javascript" type = "text/javascript" src = "overview.js"></script>
</head>
<body>
<form>
Integer to bit: <input type = "text" id = "bit" size = "32" value = "8">---
Result: <span id = "RESbit"></span>
<br>
<br>
Bit to integer: <input type = "text" id = "integer" size = "32" value = "1001">---
Result: <span id = "RESint"></span>
<br>
<br>
<button type = "button" onclick = "calculate()"> Calculate </button>
</form>
<br>
<article>
<h3>Interesting examples:</h3>
<ul>
<button type = "button" onclick = "example1()" > 0.1 + 0.2 </button>
<button type = "button" onclick = "example2()" > (0.1 + 0.2) + 0.3 </button>
<button type = "button" onclick = "example3()" > 0.1 + (0.2 + 0.3) </button>
<br>
<br>
<li id = "ex_one"></li>
<br>
<li id = "ex_two"></li>
<br>
<li id = "ex_three"></li>
</ul>
</article>
<br>
For more explanation please visit -
<a href = "https://github.com/Incrementis/Javascript-floating-point-overview-/wiki"> Floating point overview Wiki</a>
</body>
</html>