From 8d5a60408458f3bc869d81f85dce830cfc7aa22d Mon Sep 17 00:00:00 2001 From: pauline Date: Wed, 15 Apr 2020 12:34:30 +0200 Subject: [PATCH 01/10] Initial commit --- README.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..c3fdd13 --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# ArianeundPauline + From 775102ff61a885b50d89483b6cdfd5344cea472f Mon Sep 17 00:00:00 2001 From: Pauline Maas Date: Wed, 15 Apr 2020 13:00:40 +0200 Subject: [PATCH 02/10] Hallo Welt --- pauline.cpp | 1 + 1 file changed, 1 insertion(+) create mode 100644 pauline.cpp diff --git a/pauline.cpp b/pauline.cpp new file mode 100644 index 0000000..6dcddb1 --- /dev/null +++ b/pauline.cpp @@ -0,0 +1 @@ +Hallo ich bins!!!{} \ No newline at end of file From e3938d2e69e36fffe2dbf7cc284e4cc91299d959 Mon Sep 17 00:00:00 2001 From: pauline Date: Wed, 15 Apr 2020 13:01:33 +0200 Subject: [PATCH 03/10] =?UTF-8?q?=E2=80=9Epauline.cpp=E2=80=9C=20=C3=A4nde?= =?UTF-8?q?rn?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pauline.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pauline.cpp b/pauline.cpp index 6dcddb1..ff65154 100644 --- a/pauline.cpp +++ b/pauline.cpp @@ -1 +1,5 @@ -Hallo ich bins!!!{} \ No newline at end of file +Hallo ich bins!!!{} + + + +Hier auch \ No newline at end of file From 97db7cbd56daf7a3a70b9620cb90656d6cab28ec Mon Sep 17 00:00:00 2001 From: Pauline Maas Date: Wed, 15 Apr 2020 13:09:37 +0200 Subject: [PATCH 04/10] Bumsbirne --- src/ArianeundPauline.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/ArianeundPauline.cpp diff --git a/src/ArianeundPauline.cpp b/src/ArianeundPauline.cpp new file mode 100644 index 0000000..7c0f2f3 --- /dev/null +++ b/src/ArianeundPauline.cpp @@ -0,0 +1,15 @@ +//============================================================================ +// Name : ArianeundPauline.cpp +// Author : +// Version : +// Copyright : Your copyright notice +// Description : Hello World in C++, Ansi-style +//============================================================================ + +#include +using namespace std; + +int main() { + cout << "!!!Hello World!!!" << endl; // prints !!!Hello World!!! + return 0; +} From 1996817e1a3bbdd4b87a98e8463a66bf28cec38e Mon Sep 17 00:00:00 2001 From: Pauline Maas Date: Wed, 15 Apr 2020 13:17:37 +0200 Subject: [PATCH 05/10] Nichts --- src/ArianeundPauline.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/ArianeundPauline.cpp b/src/ArianeundPauline.cpp index 7c0f2f3..4101d0a 100644 --- a/src/ArianeundPauline.cpp +++ b/src/ArianeundPauline.cpp @@ -4,12 +4,4 @@ // Version : // Copyright : Your copyright notice // Description : Hello World in C++, Ansi-style -//============================================================================ - -#include -using namespace std; - -int main() { - cout << "!!!Hello World!!!" << endl; // prints !!!Hello World!!! - return 0; -} +//======================================================================== From 81a1daebfca241b8cecf44ebc5e7846f4c5ff1dc Mon Sep 17 00:00:00 2001 From: maasp Date: Mon, 20 Apr 2020 19:24:09 +0200 Subject: [PATCH 06/10] Hallo --- src/CPUebung2.cpp | 95 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 src/CPUebung2.cpp diff --git a/src/CPUebung2.cpp b/src/CPUebung2.cpp new file mode 100644 index 0000000..2d9c0f2 --- /dev/null +++ b/src/CPUebung2.cpp @@ -0,0 +1,95 @@ +//============================================================================ +// Name : CPUebung2.cpp +// Author : Pauli +// Version : +// Copyright : Your copyright notice +// Description : Hello World in C++, Ansi-style +//============================================================================ + +#include +#include +using namespace std; +void funktion(double *fp, double h, double x){ + //Funktionswerte in Array zusammenfassen, mit *fp Zeiger auf double Array + for (int i=0; i<5; i++){ + if (i>=3){ + fp[i]=log(x-(i-2)*h); /*Funktionswerte für f[3]=f(x-h) und f[4]=f(x-2h) + berechnen*/ + } + else { + fp[i]=log(x+i*h); /*Funktionswerte für f[0]=f(x), f[1]=f(x+h) und + f[2]=f(x+2h) berechnen*/ + } + } +} +// analog zu funktion nur für Aufgabe 2 +void funktion2(double *fp2, double h, double x){ + for (int i=0; i<5; i++){ + if (i>=3){ + fp2[i]=pow(log(x-(i-2)*h),1/x); + } + else { + fp2[i]=pow(log(x+i*h),1/x); + } + } +} +void ersteableitung(double x, double h, double *dfp1) { + double *f; //Zeiger um auf Array aus funktion + f=(double *)malloc(5*sizeof(double)); //Platz für array freimachen + funktion(f,h,x); //Array f mit Werten füllen + + *dfp1 = (f[1] - f[3]) / (2 * h); //Differenzenquotient + free(f); //Speicherbereich freigeben +} +void zweiteableitung(double x, double h, double *dfp2){ + double *f; + f=(double *)malloc(5*sizeof(double)); + funktion(f,h,x); + + *dfp2 = (f[1]-2*f[0]+f[3])/(pow(h,2)); //doppelter Differenzenquotient + free(f); +} +void dritteableitung(double x, double h, double *dfp3){ + double *f; + f=(double *)malloc(5*sizeof(double)); + funktion(f,h,x); + + *dfp3 = (f[2]-2*f[1]+2*f[3]-f[4])/(2*pow(h,3)); //dreifacher Differenzenquotient + free(f); +} +//analog zu ersteableitung aber mit funktion2 +void ableitung2(double x, double h, double *dfp) { + double *f; + f=(double *)malloc(5*sizeof(double)); + funktion2(f,h,x); + + *dfp = (f[1] - f[3]) / (2 * h); + free(f); + +} +int main() { + double x = 3; //Entwicklungspunkt + double h = 0.0001; //Epsilon + double df; //Variable um Ergebnis zu speichern + + ersteableitung(x,h,&df); + printf("%f \n", df); /*Aufrufen der Funktion ersteableitung und + ausgabe der Ergebniss*/ + + zweiteableitung(x,h,&df); + printf("%f \n", df); + + dritteableitung(x,h,&df); + printf("%f \n", df); + + for( double x2=1.0;x2<=6.0; x2+=h){ + ableitung2(x2,h,&df); + if(df Date: Mon, 20 Apr 2020 19:26:23 +0200 Subject: [PATCH 07/10] Nchmal --- src/CPUebung2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CPUebung2.cpp b/src/CPUebung2.cpp index 2d9c0f2..7a19169 100644 --- a/src/CPUebung2.cpp +++ b/src/CPUebung2.cpp @@ -82,7 +82,7 @@ int main() { dritteableitung(x,h,&df); printf("%f \n", df); - for( double x2=1.0;x2<=6.0; x2+=h){ + for( double x2=1.0;x2<=5.0; x2+=h){ ableitung2(x2,h,&df); if(df Date: Mon, 20 Apr 2020 19:27:03 +0200 Subject: [PATCH 08/10] =?UTF-8?q?Bl=C3=B6=C3=B6d?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/CPUebung2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CPUebung2.cpp b/src/CPUebung2.cpp index 7a19169..2d9c0f2 100644 --- a/src/CPUebung2.cpp +++ b/src/CPUebung2.cpp @@ -82,7 +82,7 @@ int main() { dritteableitung(x,h,&df); printf("%f \n", df); - for( double x2=1.0;x2<=5.0; x2+=h){ + for( double x2=1.0;x2<=6.0; x2+=h){ ableitung2(x2,h,&df); if(df Date: Mon, 20 Apr 2020 19:29:06 +0200 Subject: [PATCH 09/10] =?UTF-8?q?M=C3=A4=C3=A4=C3=A4h?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/CPUebung2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CPUebung2.cpp b/src/CPUebung2.cpp index 2d9c0f2..cf0e75e 100644 --- a/src/CPUebung2.cpp +++ b/src/CPUebung2.cpp @@ -79,7 +79,7 @@ int main() { zweiteableitung(x,h,&df); printf("%f \n", df); - dritteableitung(x,h,&df); + dritteableitung(x,h,&df); jhvgcfdxxgchvjb printf("%f \n", df); for( double x2=1.0;x2<=6.0; x2+=h){ From b27527d0380252673847d0ee2a2f422caa1c83ab Mon Sep 17 00:00:00 2001 From: maasp Date: Mon, 20 Apr 2020 19:31:09 +0200 Subject: [PATCH 10/10] nn --- src/CPUebung2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CPUebung2.cpp b/src/CPUebung2.cpp index cf0e75e..9ff4593 100644 --- a/src/CPUebung2.cpp +++ b/src/CPUebung2.cpp @@ -79,7 +79,7 @@ int main() { zweiteableitung(x,h,&df); printf("%f \n", df); - dritteableitung(x,h,&df); jhvgcfdxxgchvjb + dritteableitung(x,h,&df);sssss printf("%f \n", df); for( double x2=1.0;x2<=6.0; x2+=h){