-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathFun44.java
More file actions
27 lines (23 loc) · 581 Bytes
/
Fun44.java
File metadata and controls
27 lines (23 loc) · 581 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
27
package fun;
/**
* Project Admin -> Husanboy Azamov
* Package Name -> fun
* Class Date -> 6/21/2022/ 12:50 PM
*/
public class Fun44 {
public static void main(String[] args) {
Arctg(4.2, 5.1);
}
public static double Arctg(double x, double e) {
double sum = 0;
double surat, maxraj;
int ishora = -1;//1
for (int i = 1; i <= e; i++) {
surat = Math.pow(x, 2 * i + 1);
maxraj = 2 * i + 1;
sum += ishora * (surat / maxraj);
ishora *= -1;//
}
return sum;
}
}