forked from deepdalsania/tutorials
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMath_Demo.java
More file actions
26 lines (23 loc) · 971 Bytes
/
Math_Demo.java
File metadata and controls
26 lines (23 loc) · 971 Bytes
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
package utilpck;
public class Math_Demo {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.println("1)Value of PI : "+Math.PI);
System.out.println("2)Ceiling Value : "+Math.ceil(444.10));
System.out.println("3)Floor Value : "+Math.floor(444.10));
System.out.println("4)Square root of 16 : "+Math.sqrt(16));
System.out.println("5)Vlaue of Cos(2) : "+Math.cos(2));
System.out.println("6)Value of log10(2) : "+Math.log10(2));
System.out.println("7)Value of log(2) : "+Math.log(2));
System.out.println("8)Maximum : "+Math.max(10, 5));
System.out.println("9)Minimum : "+Math.min(10, 5));
System.out.println("10)Round : "+Math.round(10.4));
System.out.println("11)Power : "+Math.pow(2, 5));
// System.out.println("12)ULP : "+Math.ulp(456.45));
System.out.println("12)Radian to Degree : "+Math.toDegrees(4.5));
System.out.println("13)Degree to Radian : "+Math.toRadians(30));
}
}