From b6de785eb5db58ab3ad7c36670398b78028be82d Mon Sep 17 00:00:00 2001 From: git-sandro Date: Thu, 19 Feb 2026 18:28:02 +0100 Subject: [PATCH] serie 1 anfang --- README.md | 5 ++++- introduction/serie_1.py | 29 +++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 introduction/serie_1.py diff --git a/README.md b/README.md index 5cd5a34..01b703f 100644 --- a/README.md +++ b/README.md @@ -1 +1,4 @@ -Repository for CDS-404 Numerische Methoden \ No newline at end of file +Repository for CDS-404 Numerische Methoden + +Required libraries: +* numpy \ No newline at end of file diff --git a/introduction/serie_1.py b/introduction/serie_1.py new file mode 100644 index 0000000..7252e1f --- /dev/null +++ b/introduction/serie_1.py @@ -0,0 +1,29 @@ + +import numpy as np +#%% +print("Aufgabe 2") +print(f"a) {1/3}") +print(f"b) {2/3}") +print(f"c) {1/7}") +print(f"d) {1-0.9999}") +print(f"e) {1-0.999999999999}") +print(f"f) {((1/2) - np.sin(np.pi/6)) ** (1/4)}") + +#%% +print("Aufgabe 6") +print(f"a) {np.power(np.array([45.6]), 3)}") +print(f"b) {np.sqrt(3)}") +print(f"c) {np.power(np.array([2]), (1/5))}") +print(f"d) {np.power(np.array([5.654 * np.power(np.array([10]), 24)]), (1/7))}") +print(f"e) {np.power(np.array([44.5]), (5/9))}") +print(f"f) {4 * np.pi}") +print(f"g) {np.sin(5 * np.pi / 4)}") +print(f"h) {1 / np.tan(-3 * np.pi / 5)}") +print(f"i) {np.tan(np.radians(77))}") +print(f"j) {np.arccos(-0.45)}") +print(f"k) {1 / np.arctan(34.1)}") +print(f"l) {np.power(np.array([np.e]), -3.34)}") +print(f"m) {np.e}") +print(f"n) {np.log(13.2)}") +print(f"o) ") +print(f"p) ")