-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmath_functions.html
More file actions
21 lines (21 loc) · 930 Bytes
/
math_functions.html
File metadata and controls
21 lines (21 loc) · 930 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<html>
<title> math functions </title>
<body>
<script type="text/javascript">
var number_1 = 2.89;
var number_2 =-2.89;
document.write("abs value of -2.89 = "+Math.abs(number_2)+"<br>");
document.write("abs value of 2.89 = "+Math.abs(number_1)+"<br>");
document.write("cos(30) = "+Math.cos(30)+"<br>");
document.write("sin(30) = "+Math.sin(30)+"<br>");
document.write("exponential value of 1 = "+Math.exp(1)+"<br>");
document.write("Math.floor(2.89) = "+Math.floor(number_1)+"<br>");
document.write("Math.ceil(2.89) = "+Math.ceil(number_1)+"<br>");
document.write("Math.max(12,445,67,908) = "+Math.max(12,445,67,908)+"<br>");
document.write("Math.min(23,-98,43,78,0) = "+Math.min(23,-98,43,78,0)+"<br>");
document.write("Math.random() = "+Math.random()+"<br>");
document.write("Math.round(2.89) = "+Math.round(2.89)+"<br>");
document.write("Math .sqrt(4) = "+Math .sqrt(4)+"<br>");
</script>
</body>
</html>