|
@ -79,7 +79,7 @@ public class TasksFrame extends JFrame { |
|
|
|
|
|
|
|
|
setup5ModList(1, 20); |
|
|
setup5ModList(1, 20); |
|
|
|
|
|
|
|
|
setupLeibnizR(1000); |
|
|
|
|
|
|
|
|
setupPI(100000); |
|
|
|
|
|
|
|
|
setupEulerschePhiFunk(); |
|
|
setupEulerschePhiFunk(); |
|
|
|
|
|
|
|
@ -822,16 +822,16 @@ public class TasksFrame extends JFrame { |
|
|
return mods; |
|
|
return mods; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public double setupLeibnizR(int t) { |
|
|
|
|
|
|
|
|
public double setupPI(int t) { |
|
|
double sum=0; |
|
|
double sum=0; |
|
|
for(int i=0;i<t;i++){ |
|
|
for(int i=0;i<t;i++){ |
|
|
sum += Math.pow(-1,i)/((2*i)+1); |
|
|
sum += Math.pow(-1,i)/((2*i)+1); |
|
|
} |
|
|
} |
|
|
JPanel jPanel = setupPanel("Leibniz F. von 0 bis" + t); |
|
|
|
|
|
|
|
|
JPanel jPanel = setupPanel("Zahl Pi, berechnet mit Hilfe von Leibniz F. von 0 bis" + t); |
|
|
|
|
|
|
|
|
JLabel summe = new JLabel(); |
|
|
JLabel summe = new JLabel(); |
|
|
summe.setVisible(true); |
|
|
summe.setVisible(true); |
|
|
summe.setText(String.valueOf(sum)); |
|
|
|
|
|
|
|
|
summe.setText(String.valueOf(sum*4)); |
|
|
summe.setBounds(10,50,100,30); |
|
|
summe.setBounds(10,50,100,30); |
|
|
|
|
|
|
|
|
jPanel.add(summe); |
|
|
jPanel.add(summe); |
|
|