summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2022-03-22 23:00:17 +0100
committerAnton Luka Šijanec <anton@sijanec.eu>2022-03-22 23:00:17 +0100
commitc29b044bf5cc874782b0fece6399768b66e5c43b (patch)
treed65ca07d6939e8be1af508cbd87c1c30c680f00b
parentučenje biologije (diff)
downloadsola-gimb-3-c29b044bf5cc874782b0fece6399768b66e5c43b.tar
sola-gimb-3-c29b044bf5cc874782b0fece6399768b66e5c43b.tar.gz
sola-gimb-3-c29b044bf5cc874782b0fece6399768b66e5c43b.tar.bz2
sola-gimb-3-c29b044bf5cc874782b0fece6399768b66e5c43b.tar.lz
sola-gimb-3-c29b044bf5cc874782b0fece6399768b66e5c43b.tar.xz
sola-gimb-3-c29b044bf5cc874782b0fece6399768b66e5c43b.tar.zst
sola-gimb-3-c29b044bf5cc874782b0fece6399768b66e5c43b.zip
-rw-r--r--inf/razno/complexbench.c43
-rw-r--r--mat/formule.tex (renamed from mat/trigonometrija.tex)14
2 files changed, 54 insertions, 3 deletions
diff --git a/inf/razno/complexbench.c b/inf/razno/complexbench.c
new file mode 100644
index 0000000..ceb1129
--- /dev/null
+++ b/inf/razno/complexbench.c
@@ -0,0 +1,43 @@
+#include <complex.h>
+#include <stdio.h>
+#include <time.h>
+#include <stdlib.h>
+struct kompleksno {
+ long double r;
+ long double i;
+};
+struct kompleksno množi (struct kompleksno a, struct kompleksno b) {
+ struct kompleksno r;
+ r.r = (a.r * b.r) - (a.i * b.i /* ii = -1 */);
+ r.i = (a.i * b.r) + (a.r * b.i); /* zakon o distributivnosti */
+ return r;
+}
+struct kompleksno seštej (struct kompleksno a, struct kompleksno b) {
+ a.r += b.r;
+ a.i += b.i;
+ return a;
+}
+int main (int argc, char ** argv) {
+ long double complex c = 0.001 + 0.0001 * I;
+ struct kompleksno k = { .r = 0.001, .i = 0.0001 };
+ long double complex a = -0.5 + 0.55 * I;
+ struct kompleksno s = { .r = -0.5, .i = 0.55 };
+ int število = argc > 1 ? atoi(argv[1]) : 10000;
+ clock_t cikli = clock();
+ for (int i = 0; i < število; i++) {
+ c = c*c + a;
+ if (creall(c) > 0.01 && cimagl(c) < -0.02)
+ c += 0.00003;
+ }
+ fprintf(stderr, "rezultat complex.h: %Lf+%Lfi\n", creall(c), cimagl(c));
+ fprintf(stderr, " porabljen čas: %ld ciklov\n", clock()-cikli);
+ cikli = clock();
+ for (int i = 0; i < število; i++) {
+ k = seštej(množi(k, k), s);
+ if (k.r > 0.01 && k.i < -0.02)
+ k.r += 0.00003;
+ }
+ fprintf(stderr, "rezultat na roke: %Lf+%Lfi\n", k.r, k.i);
+ fprintf(stderr, " porabljen čas: %ld ciklov\n", clock()-cikli);
+ return 0;
+}
diff --git a/mat/trigonometrija.tex b/mat/formule.tex
index c9cfff5..1995684 100644
--- a/mat/trigonometrija.tex
+++ b/mat/formule.tex
@@ -28,7 +28,7 @@
}
\AddEnumerateCounter{\xslalph}{\@xslalph}{m}
\makeatother
-\title{Trigonometrične formule}
+\title{Formule}
\author{Anton Luka Šijanec, 3. a}
\begin{document}
\maketitle
@@ -36,7 +36,7 @@
% Spisek izbranih trigonometričnih izrekov bom kot pripomoček imel na drugem testu pri matematiki v tretjem letniku.
% \end{abstract}
% \tableofcontents
-\section{Drugi test}
+\section{Trigonometrija: Drugi test}
\begin{multicols}{2}
\begin{tabular}{|c|c|c|c|c|c|}
\hline
@@ -90,7 +90,7 @@
$$2\sin^2\frac{\alpha}{2}=1-\cos\alpha$$
$$\tan^2\frac{x}{2}=\frac{1-\cos\alpha}{1+\cos\alpha}$$
\end{multicols}
-\section{Tretji test}
+\section{Trikotniki in krogi: Tretji test}
\begin{multicols}{2}
$$s=\frac{a+b+c}{2} \wedge S=\sqrt{s(s-a)(s-b)(s-c)}$$
$$S_\text{trikotnika v izseku}=\frac{r^2\sin\alpha}{2}$$
@@ -116,6 +116,14 @@
$$f(x)\neq-f(x)\nLeftrightarrow f(-x)=-f(x) \text{ in obratno}$$
$$f(x)=-f(x) \wedge f(-x)=-f(x) \Leftrightarrow f(x)=0$$
\end{multicols}
+\section{Trorazsežnostna geometrijska telesa: Četrti test} % todo: funkcije na likih - notranji kot, prisekana piramida, prisekan stožec, kuboktaeder, tetraeder, včartavanje teles v druga telesa
+\begin{multicols}{2}
+ $$S_\text{odseka}=r^2\pi\frac{\alpha}{\ang{360}}-\frac{r^2\sin\alpha}{2}$$
+ $$V_\text{piramide}=\frac{P_\text{osnovna}v}{3}$$
+ $$P_\text{stožca}=\frac{s\cdot2\pi r}{2}\text{(špornova fora)}+r^2\pi=r\pi\left(r+s\right)$$
+ $$V_\text{stožca}=\frac{r^2v\pi}{3}$$
+ $$P_\text{enakostraničnega trikotnika}=\frac{a^2\sqrt{3}}{4}$$
+\end{multicols}
\section{Zaključek}
\hologo{LaTeX} izvorna koda dokumenta je objavljena na \url{https://git.sijanec.eu/sijanec/sola-gimb-3}. Za izdelavo dokumenta je potreben \texttt{TeXLive 2020}.
\if\razhroscevanje1