From c5fcf7179a83ef65c86c6a4a390029149e518649 Mon Sep 17 00:00:00 2001 From: Franciszek Malinka Date: Tue, 5 Oct 2021 21:49:54 +0200 Subject: Duzy commit ze smieciami --- ...1015978_4776115014339835571_n-skonwertowany.pdf | Bin 0 -> 1660637 bytes ...1707_3588724294520406_8136239036747413299_n.png | Bin 0 -> 679932 bytes ...5884_1275447756144832_7413241105249986699_n.png | Bin 0 -> 1613691 bytes ...7167_1593737770811593_6543718578218515066_n.png | Bin 0 -> 1242394 bytes ...69750_402042141155881_6570437974905119964_n.png | Bin 0 -> 1270864 bytes ...73976_806284520153252_3023546758120299349_n.png | Bin 0 -> 2954065 bytes ...79651_127423085629823_7095725336054137948_n.png | Bin 0 -> 2491669 bytes ...0297_3761749477254265_6630322790773233417_n.jpg | Bin 0 -> 329588 bytes ...96371_285037769609973_5071243443428926710_n.png | Bin 0 -> 2073836 bytes ...33532_130649335266217_8093422482628866562_n.png | Bin 0 -> 2928577 bytes ...52255_702612607336254_8763088947964594383_n.png | Bin 0 -> 2561680 bytes ...60414_385323922546640_7543172243449108812_n.png | Bin 0 -> 2743807 bytes ...61511_860991487774115_3425133879253665938_n.png | Bin 0 -> 3285709 bytes ...958548_194848802130251_475083678163168921_n.png | Bin 0 -> 3125144 bytes ...82685_871949666894555_2235741868842097206_n.png | Bin 0 -> 1755788 bytes semestr-3/anm/ANM (1).pdf | Bin 0 -> 265778 bytes semestr-3/anm/CORDIC_ppt.pdf | Bin 0 -> 182141 bytes semestr-3/anm/L8.autosave1.xoj | Bin 0 -> 578349 bytes "semestr-3/anm/Zadanie 10 tre\305\233\304\207.png" | Bin 0 -> 29202 bytes "semestr-3/anm/Zadanie 3 tre\305\233\304\207.png" | Bin 0 -> 35533 bytes semestr-3/anm/anMc-M12.pdf | Bin 0 -> 145629 bytes semestr-3/anm/cordic/CORDICtable.c | 21 + semestr-3/anm/cordic/cordic.cpp | 189 + semestr-3/anm/cordic/cordic.jl | 81 + semestr-3/anm/cordic/csin.cpp | 49 + semestr-3/anm/cordic/taylor.jl | 103 + semestr-3/anm/cordic/trig.jl | 43 + semestr-3/anm/gen.sh | 0 semestr-3/anm/horner.jl | 16 + semestr-3/anm/jpg2pdf (4).pdf | Bin 0 -> 390964 bytes semestr-3/anm/l10.hs | 16 + semestr-3/anm/l3z8.pdf | Bin 0 -> 3584471 bytes semestr-3/anm/l4z3.pdf | Bin 0 -> 1648804 bytes semestr-3/anm/l4z7.jl | 91 + semestr-3/anm/l4z7.txt | 0 semestr-3/anm/numerki/lista1/test.jl | 118 + semestr-3/anm/numerki/lista1/test.jl.txt | 16 + semestr-3/anm/numerki/lista2/rozw.ml | 33 + semestr-3/anm/pracownia1/doc/sprawozdanie.pdf | Bin 0 -> 184895 bytes semestr-3/anm/pracownia1/doc/sprawozdanie.tex | 464 + semestr-3/anm/pracownia1/prog/program.html | 16056 ++++++++++++++++ semestr-3/anm/pracownia1/prog/program.ipynb | 2042 ++ semestr-3/anm/pracownia1/prog/program.jl | 247 + semestr-3/anm/pracownia2/brut.jl | 177 + semestr-3/anm/pracowniaPOP/diff/program.diff | 148 + semestr-3/anm/pracowniaPOP/diff/sprawozdanie.diff | 213 + .../anm/pracowniaPOP/diff/sprawozdaniepdfdiff.pdf | Bin 0 -> 1932384 bytes semestr-3/anm/pracowniaPOP/doc/cordic error.png | Bin 0 -> 23856 bytes semestr-3/anm/pracowniaPOP/doc/sprawozdanie.pdf | Bin 0 -> 266104 bytes semestr-3/anm/pracowniaPOP/doc/sprawozdanie.tex | 509 + semestr-3/anm/pracowniaPOP/doc/taylor error.png | Bin 0 -> 12978 bytes semestr-3/anm/pracowniaPOP/prog/program.html | 19173 +++++++++++++++++++ semestr-3/anm/pracowniaPOP/prog/program.ipynb | 7922 ++++++++ semestr-3/anm/pracowniaPOP/prog/program.jl | 273 + semestr-3/anm/sprawozdanie.aux | 35 + semestr-3/anm/sprawozdanie.auxlock | 1 + semestr-3/anm/sprawozdanie.fdb_latexmk | 291 + semestr-3/anm/sprawozdanie.fls | 447 + semestr-3/anm/sprawozdanie.log | 1353 ++ semestr-3/anm/sprawozdanie.pdf | Bin 0 -> 231824 bytes semestr-3/anm/sprawozdanie.tex | 488 + semestr-3/anm/xd.pdf | Bin 0 -> 284003 bytes semestr-3/anm/zad126.jl | 58 + semestr-3/anm/zad2.jpeg | Bin 0 -> 180603 bytes semestr-3/anm/zad2ab.jpeg | Bin 0 -> 169890 bytes semestr-3/anm/zad3.jpeg | Bin 0 -> 110277 bytes "semestr-3/anm/zadanie 9 tre\305\233\304\207.png" | Bin 0 -> 22035 bytes semestr-3/anm/zadanie 9.png | Bin 0 -> 3659 bytes 68 files changed, 50673 insertions(+) create mode 100644 semestr-3/anm/122110696_1293432301015978_4776115014339835571_n-skonwertowany.pdf create mode 100644 semestr-3/anm/126611707_3588724294520406_8136239036747413299_n.png create mode 100644 semestr-3/anm/126815884_1275447756144832_7413241105249986699_n.png create mode 100644 semestr-3/anm/126817167_1593737770811593_6543718578218515066_n.png create mode 100644 semestr-3/anm/126869750_402042141155881_6570437974905119964_n.png create mode 100644 semestr-3/anm/126873976_806284520153252_3023546758120299349_n.png create mode 100644 semestr-3/anm/126879651_127423085629823_7095725336054137948_n.png create mode 100644 semestr-3/anm/127790297_3761749477254265_6630322790773233417_n.jpg create mode 100644 semestr-3/anm/127796371_285037769609973_5071243443428926710_n.png create mode 100644 semestr-3/anm/127833532_130649335266217_8093422482628866562_n.png create mode 100644 semestr-3/anm/127852255_702612607336254_8763088947964594383_n.png create mode 100644 semestr-3/anm/127860414_385323922546640_7543172243449108812_n.png create mode 100644 semestr-3/anm/127861511_860991487774115_3425133879253665938_n.png create mode 100644 semestr-3/anm/127958548_194848802130251_475083678163168921_n.png create mode 100644 semestr-3/anm/127982685_871949666894555_2235741868842097206_n.png create mode 100644 semestr-3/anm/ANM (1).pdf create mode 100644 semestr-3/anm/CORDIC_ppt.pdf create mode 100644 semestr-3/anm/L8.autosave1.xoj create mode 100644 "semestr-3/anm/Zadanie 10 tre\305\233\304\207.png" create mode 100644 "semestr-3/anm/Zadanie 3 tre\305\233\304\207.png" create mode 100644 semestr-3/anm/anMc-M12.pdf create mode 100644 semestr-3/anm/cordic/CORDICtable.c create mode 100644 semestr-3/anm/cordic/cordic.cpp create mode 100644 semestr-3/anm/cordic/cordic.jl create mode 100644 semestr-3/anm/cordic/csin.cpp create mode 100644 semestr-3/anm/cordic/taylor.jl create mode 100644 semestr-3/anm/cordic/trig.jl create mode 100644 semestr-3/anm/gen.sh create mode 100644 semestr-3/anm/horner.jl create mode 100644 semestr-3/anm/jpg2pdf (4).pdf create mode 100644 semestr-3/anm/l10.hs create mode 100644 semestr-3/anm/l3z8.pdf create mode 100644 semestr-3/anm/l4z3.pdf create mode 100644 semestr-3/anm/l4z7.jl create mode 100644 semestr-3/anm/l4z7.txt create mode 100644 semestr-3/anm/numerki/lista1/test.jl create mode 100644 semestr-3/anm/numerki/lista1/test.jl.txt create mode 100644 semestr-3/anm/numerki/lista2/rozw.ml create mode 100644 semestr-3/anm/pracownia1/doc/sprawozdanie.pdf create mode 100644 semestr-3/anm/pracownia1/doc/sprawozdanie.tex create mode 100644 semestr-3/anm/pracownia1/prog/program.html create mode 100644 semestr-3/anm/pracownia1/prog/program.ipynb create mode 100644 semestr-3/anm/pracownia1/prog/program.jl create mode 100644 semestr-3/anm/pracownia2/brut.jl create mode 100644 semestr-3/anm/pracowniaPOP/diff/program.diff create mode 100644 semestr-3/anm/pracowniaPOP/diff/sprawozdanie.diff create mode 100644 semestr-3/anm/pracowniaPOP/diff/sprawozdaniepdfdiff.pdf create mode 100644 semestr-3/anm/pracowniaPOP/doc/cordic error.png create mode 100644 semestr-3/anm/pracowniaPOP/doc/sprawozdanie.pdf create mode 100644 semestr-3/anm/pracowniaPOP/doc/sprawozdanie.tex create mode 100644 semestr-3/anm/pracowniaPOP/doc/taylor error.png create mode 100644 semestr-3/anm/pracowniaPOP/prog/program.html create mode 100644 semestr-3/anm/pracowniaPOP/prog/program.ipynb create mode 100644 semestr-3/anm/pracowniaPOP/prog/program.jl create mode 100644 semestr-3/anm/sprawozdanie.aux create mode 100644 semestr-3/anm/sprawozdanie.auxlock create mode 100644 semestr-3/anm/sprawozdanie.fdb_latexmk create mode 100644 semestr-3/anm/sprawozdanie.fls create mode 100644 semestr-3/anm/sprawozdanie.log create mode 100644 semestr-3/anm/sprawozdanie.pdf create mode 100644 semestr-3/anm/sprawozdanie.tex create mode 100644 semestr-3/anm/xd.pdf create mode 100644 semestr-3/anm/zad126.jl create mode 100644 semestr-3/anm/zad2.jpeg create mode 100644 semestr-3/anm/zad2ab.jpeg create mode 100644 semestr-3/anm/zad3.jpeg create mode 100644 "semestr-3/anm/zadanie 9 tre\305\233\304\207.png" create mode 100644 semestr-3/anm/zadanie 9.png (limited to 'semestr-3/anm') diff --git a/semestr-3/anm/122110696_1293432301015978_4776115014339835571_n-skonwertowany.pdf b/semestr-3/anm/122110696_1293432301015978_4776115014339835571_n-skonwertowany.pdf new file mode 100644 index 0000000..a4c0ca1 Binary files /dev/null and b/semestr-3/anm/122110696_1293432301015978_4776115014339835571_n-skonwertowany.pdf differ diff --git a/semestr-3/anm/126611707_3588724294520406_8136239036747413299_n.png b/semestr-3/anm/126611707_3588724294520406_8136239036747413299_n.png new file mode 100644 index 0000000..2ede7fe Binary files /dev/null and b/semestr-3/anm/126611707_3588724294520406_8136239036747413299_n.png differ diff --git a/semestr-3/anm/126815884_1275447756144832_7413241105249986699_n.png b/semestr-3/anm/126815884_1275447756144832_7413241105249986699_n.png new file mode 100644 index 0000000..2d0bc74 Binary files /dev/null and b/semestr-3/anm/126815884_1275447756144832_7413241105249986699_n.png differ diff --git a/semestr-3/anm/126817167_1593737770811593_6543718578218515066_n.png b/semestr-3/anm/126817167_1593737770811593_6543718578218515066_n.png new file mode 100644 index 0000000..88823e3 Binary files /dev/null and b/semestr-3/anm/126817167_1593737770811593_6543718578218515066_n.png differ diff --git a/semestr-3/anm/126869750_402042141155881_6570437974905119964_n.png b/semestr-3/anm/126869750_402042141155881_6570437974905119964_n.png new file mode 100644 index 0000000..8389062 Binary files /dev/null and b/semestr-3/anm/126869750_402042141155881_6570437974905119964_n.png differ diff --git a/semestr-3/anm/126873976_806284520153252_3023546758120299349_n.png b/semestr-3/anm/126873976_806284520153252_3023546758120299349_n.png new file mode 100644 index 0000000..12d681e Binary files /dev/null and b/semestr-3/anm/126873976_806284520153252_3023546758120299349_n.png differ diff --git a/semestr-3/anm/126879651_127423085629823_7095725336054137948_n.png b/semestr-3/anm/126879651_127423085629823_7095725336054137948_n.png new file mode 100644 index 0000000..1d99a97 Binary files /dev/null and b/semestr-3/anm/126879651_127423085629823_7095725336054137948_n.png differ diff --git a/semestr-3/anm/127790297_3761749477254265_6630322790773233417_n.jpg b/semestr-3/anm/127790297_3761749477254265_6630322790773233417_n.jpg new file mode 100644 index 0000000..7b65438 Binary files /dev/null and b/semestr-3/anm/127790297_3761749477254265_6630322790773233417_n.jpg differ diff --git a/semestr-3/anm/127796371_285037769609973_5071243443428926710_n.png b/semestr-3/anm/127796371_285037769609973_5071243443428926710_n.png new file mode 100644 index 0000000..cfaf4a1 Binary files /dev/null and b/semestr-3/anm/127796371_285037769609973_5071243443428926710_n.png differ diff --git a/semestr-3/anm/127833532_130649335266217_8093422482628866562_n.png b/semestr-3/anm/127833532_130649335266217_8093422482628866562_n.png new file mode 100644 index 0000000..f339f55 Binary files /dev/null and b/semestr-3/anm/127833532_130649335266217_8093422482628866562_n.png differ diff --git a/semestr-3/anm/127852255_702612607336254_8763088947964594383_n.png b/semestr-3/anm/127852255_702612607336254_8763088947964594383_n.png new file mode 100644 index 0000000..a10f3a4 Binary files /dev/null and b/semestr-3/anm/127852255_702612607336254_8763088947964594383_n.png differ diff --git a/semestr-3/anm/127860414_385323922546640_7543172243449108812_n.png b/semestr-3/anm/127860414_385323922546640_7543172243449108812_n.png new file mode 100644 index 0000000..603b3ca Binary files /dev/null and b/semestr-3/anm/127860414_385323922546640_7543172243449108812_n.png differ diff --git a/semestr-3/anm/127861511_860991487774115_3425133879253665938_n.png b/semestr-3/anm/127861511_860991487774115_3425133879253665938_n.png new file mode 100644 index 0000000..ef46951 Binary files /dev/null and b/semestr-3/anm/127861511_860991487774115_3425133879253665938_n.png differ diff --git a/semestr-3/anm/127958548_194848802130251_475083678163168921_n.png b/semestr-3/anm/127958548_194848802130251_475083678163168921_n.png new file mode 100644 index 0000000..b52b23e Binary files /dev/null and b/semestr-3/anm/127958548_194848802130251_475083678163168921_n.png differ diff --git a/semestr-3/anm/127982685_871949666894555_2235741868842097206_n.png b/semestr-3/anm/127982685_871949666894555_2235741868842097206_n.png new file mode 100644 index 0000000..7d385fe Binary files /dev/null and b/semestr-3/anm/127982685_871949666894555_2235741868842097206_n.png differ diff --git a/semestr-3/anm/ANM (1).pdf b/semestr-3/anm/ANM (1).pdf new file mode 100644 index 0000000..94b5b89 Binary files /dev/null and b/semestr-3/anm/ANM (1).pdf differ diff --git a/semestr-3/anm/CORDIC_ppt.pdf b/semestr-3/anm/CORDIC_ppt.pdf new file mode 100644 index 0000000..61e69aa Binary files /dev/null and b/semestr-3/anm/CORDIC_ppt.pdf differ diff --git a/semestr-3/anm/L8.autosave1.xoj b/semestr-3/anm/L8.autosave1.xoj new file mode 100644 index 0000000..229ac69 Binary files /dev/null and b/semestr-3/anm/L8.autosave1.xoj differ diff --git "a/semestr-3/anm/Zadanie 10 tre\305\233\304\207.png" "b/semestr-3/anm/Zadanie 10 tre\305\233\304\207.png" new file mode 100644 index 0000000..9ffbf3c Binary files /dev/null and "b/semestr-3/anm/Zadanie 10 tre\305\233\304\207.png" differ diff --git "a/semestr-3/anm/Zadanie 3 tre\305\233\304\207.png" "b/semestr-3/anm/Zadanie 3 tre\305\233\304\207.png" new file mode 100644 index 0000000..32aa6aa Binary files /dev/null and "b/semestr-3/anm/Zadanie 3 tre\305\233\304\207.png" differ diff --git a/semestr-3/anm/anMc-M12.pdf b/semestr-3/anm/anMc-M12.pdf new file mode 100644 index 0000000..f6334ac Binary files /dev/null and b/semestr-3/anm/anMc-M12.pdf differ diff --git a/semestr-3/anm/cordic/CORDICtable.c b/semestr-3/anm/cordic/CORDICtable.c new file mode 100644 index 0000000..f222d08 --- /dev/null +++ b/semestr-3/anm/cordic/CORDICtable.c @@ -0,0 +1,21 @@ +//CORDIC, 21 bits, 18 iterations +// 1.0 = 262144.000000 multiplication factor +// A = 1.743279 convergence angle (limit is 1.7432866 = 99.9deg) +// F = 1.646760 gain (limit is 1.64676025812107) +// 1/F = 0.607253 inverse gain (limit is 0.607252935008881) +// pi = 3.141593 (3.1415926536897932384626) + +#define CORDIC_A 1.743279 // CORDIC convergence angle A +#define CORDIC_F 0x00069648 // CORDIC gain F +#define CORDIC_1F 0x00026DD4 // CORDIC inverse gain 1/F +#define CORDIC_HALFPI 0x0006487F +#define CORDIC_PI 0x000C90FE +#define CORDIC_TWOPI 0x001921FB +#define CORDIC_MUL 262144.000000 // CORDIC multiplication factor M = 2^18 +#define CORDIC_MAXITER 18 + +int CORDIC_ZTBL[] = { + 0x0003243F, 0x0001DAC6, 0x0000FADC, 0x00007F57, 0x00003FEB, 0x00001FFD, 0x00001000, 0x00000800, + 0x00000400, 0x00000200, 0x00000100, 0x00000080, 0x00000040, 0x00000020, 0x00000010, 0x00000008, + 0x00000004, 0x00000002 }; + diff --git a/semestr-3/anm/cordic/cordic.cpp b/semestr-3/anm/cordic/cordic.cpp new file mode 100644 index 0000000..b0dfd39 --- /dev/null +++ b/semestr-3/anm/cordic/cordic.cpp @@ -0,0 +1,189 @@ +#include +#include +//#define M_PI 3.1415926536897932384626 +int main(int argc, char **argv) +{ + FILE *f; + char tname[50], cname[10]; + int n, n2, mp2, niter, bits, t; + double F, A, mul, tmul; // CORDIC gain, convergence angle, multiplication factor + printf("0)circular, 1)linear, 2)hyperbolic? "); + scanf("%d", &t); + switch (t) + { + case 0: + sprintf(cname, "%s", ""); + break; + case 1: + sprintf(cname, "%s", "_LIN"); + break; + case 2: + sprintf(cname, "%s", "_HYPER"); + break; + } + sprintf(tname, "CORDICtable%s.c", cname); + if (NULL == (f = fopen(tname, "wt"))) + { + printf("cannot write to %s\n", tname); + return 0; + } + + printf("number of bits for mantissa (e.g. 30)? "); + scanf("%d", &bits); + printf("0) mul factor is 2^n (easier output scaling), or\n" + "1) 2pi is 2^n (easier implementation)\n ? "); + scanf("%d", &mp2); + printf("suggested multiplication factor "); + if (mp2 == 0) + { + tmul = (double)(1 << (bits - 3)); + printf("2^%d = %f\n", bits - 3, tmul); + } + else + { + tmul = (double)(1 << (bits - 2)) / M_PI; + printf("2^%d/pi = %f\n", bits - 2, tmul); + } + printf("multiplication factor (0 for suggested)? "); + scanf("%lf", &mul); + if (mul < 0.1) + { + mul = tmul; + printf("%f\n", mul); + } + else + mp2 = -1; // custom mul factor + switch (t) + { + case 0: + for (n = 0; n < bits; n++) + if ((int)round(atan(pow(2.0, (double)(-n))) * mul) == 0) + break; + break; + case 1: + for (n = 0; n < bits; n++) + if ((int)round((pow(2.0, (double)(-n))) * mul) == 0) + break; + break; + case 2: + for (n = 1, n2 = 4; n < bits;) + { + if ((int)round(atanh(pow(2.0, (double)(-n))) * mul) == 0) + break; + if (n == n2) + n2 = 3 * n + 1; + else + n++; + } + break; + } + printf("iterations (up to %d)? ", n); + scanf("%d", &niter); + + F = 1.0; + A = 0.0; + switch (t) + { + case 0: + for (n = 0; n < niter; n++) + { + F = F * sqrt(1 + pow(2.0, -2.0 * n)); + A += atan(pow(2.0, (double)(-n))); + } + break; + case 1: + for (n = 0; n < niter; n++) + { + F = F * sqrt(1); + A += (pow(2.0, (double)(-n))); + } + break; + case 2: + for (n = 1, n2 = 4; n < niter;) + { + F = F * sqrt(1 - pow(2.0, -2.0 * n)); + A += atanh(pow(2.0, (double)(-n))); + if (n == n2) + n2 = 3 * n + 1; + else + n++; + } + break; + } + + fprintf(f, "//CORDIC%s, %d bits, %d iterations\n", cname, bits, niter); + fprintf(f, "// 1.0 = %f multiplication factor\n", mul); + switch (t) + { + case 0: + fprintf(f, "// A = %lf convergence angle " + "(limit is 1.7432866 = 99.9deg)\n", + A); + fprintf(f, "// F = %lf gain (limit is 1.64676025812107)\n", F); + fprintf(f, "// 1/F = %lf inverse gain (limit is 0.607252935008881)\n", 1.0 / F); + break; + case 1: + fprintf(f, "// A = %lf convergence angle (limit is 2)\n", A); + fprintf(f, "// F = %lf gain (limit is 1.0)\n", F); + fprintf(f, "// 1/F = %lf inverse gain (limit is 1.0)\n", 1.0 / F); + break; + case 2: + fprintf(f, "// A = %lf convergence angle " + "(limit is 1.1181730 = 64.0deg)\n", + A); + fprintf(f, "// F = %lf gain (limit is 0.82978162013890)\n", F); + fprintf(f, "// 1/F = %lf inverse gain (limit is 1.20513635844646)\n", 1.0 / F); + break; + } + fprintf(f, "// pi = %lf (3.1415926536897932384626)\n", M_PI); + fprintf(f, "\n"); + fprintf(f, "#define CORDIC%s_A %f // CORDIC convergence angle A\n", cname, A); + fprintf(f, "#define CORDIC%s_F 0x%08X // CORDIC gain F\n", + cname, (int)round(mul * F)); + fprintf(f, "#define CORDIC%s_1F 0x%08X // CORDIC inverse gain 1/F\n", + cname, (int)round(mul / F)); + fprintf(f, "#define CORDIC%s_HALFPI 0x%08X\n", cname, (int)round(mul * (M_PI / 2.0))); + fprintf(f, "#define CORDIC%s_PI 0x%08X\n", cname, (int)round(mul * (M_PI))); + fprintf(f, "#define CORDIC%s_TWOPI 0x%08X\n", cname, (int)round(mul * (2.0 * M_PI))); + fprintf(f, "#define CORDIC%s_MUL %f // CORDIC multiplication factor M", cname, mul); + switch (mp2) + { + case 0: + fprintf(f, " = 2^%d\n", bits - 3); + break; + case 1: + fprintf(f, " = 2^%d/pi\n", bits - 2); + break; + default: + fprintf(f, "\n"); + break; + } + fprintf(f, "#define CORDIC%s_MAXITER %d\n\n", cname, niter); + fprintf(f, "int CORDIC%s_ZTBL[] = {", cname); + for (n = 0; n < niter; n++) + { + if ((n % 8) == 0) + fprintf(f, "\n "); + switch (t) + { + case 0: + fprintf(f, "0x%08X", (int)round(atan(pow(2.0, (double)(-n))) * mul)); + break; + case 1: + fprintf(f, "0x%08X", (int)round((pow(2.0, (double)(-n))) * mul)); + break; + case 2: + n = n == 0 ? 1 : n; + fprintf(f, "0x%08X", (int)round(atanh(pow(2.0, (double)(-n))) * mul)); + break; + } + if (n < (niter - 1)) + fprintf(f, ", "); + else + fprintf(f, " "); + } + fprintf(f, "};\n\n"); + fclose(f); + printf("table written to %s\n", tname); + return 0; +} diff --git a/semestr-3/anm/cordic/cordic.jl b/semestr-3/anm/cordic/cordic.jl new file mode 100644 index 0000000..9509fb2 --- /dev/null +++ b/semestr-3/anm/cordic/cordic.jl @@ -0,0 +1,81 @@ +using Printf + +global ITERATIONS = 30 +global CORDIC_MUL_POW = 30 +global CORDIC_MUL = 2.0^CORDIC_MUL_POW +global CORDIC_ATANS +global CORDIC_F +global CORDIC_F_INV + +CORDIC_ATANS = [843314857, 497837829, 263043837, 133525159, 67021687, 33543516, 16775851, 8388437, 4194283, 2097149, 1048576, 524288, 262144, 131072, 65536, 32768, 16384, 8192, 4096, 2048, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2] +CORDIC_F = 1768195363 +CORDIC_F_INV = 652032874 + +function preprocess_atan(iterations) + global CORDIC_MUL + atan2pow = Array{Float64}(undef, iterations) + @printf("CORDIC_ATANS = [") + for i in 1:iterations + atan2pow[i] = round(atan(1.0 / Float64(BigInt(2)^(i - 1))) * CORDIC_MUL) + @printf("%d", atan2pow[i]) + if i < iterations + @printf(", ") + end + end + @printf("]\n") +end + +function preprocess_scaling_factor(iterations) + # @printf("Preprocessing scaling factor, %d iterations\n", iterations) + CORDIC_F = 1.0 + for i in 0:iterations + CORDIC_F *= sqrt(1. + 1. / Float64(BigInt(2)^(2 * i))) + end + # @printf("Scaling factor: %.16f\n", F) + @printf("CORDIC_F = %d\nCORDIC_F_INV = %d\n", round(CORDIC_F * CORDIC_MUL), round(CORDIC_MUL / CORDIC_F)) +end + +function approx_trig(x, iterations) + global CORDIC_ATANS + global CORDIC_F_INV + X = CORDIC_F_INV + Y = 0 + Z = round(x * CORDIC_MUL) + s = 1 + for i in 0:(iterations - 1) + println(X, " ", Y) + + tempX = X + if Z == 0 + break + end + if Z >= 0 + X -= s * (Y >> i) + Y += s * (tempX >> i) + Z -= s * CORDIC_ATANS[i + 1] + else + X += s * (Y >> i) + Y -= s * (tempX >> i) + Z += s * CORDIC_ATANS[i + 1] + end + end + + println(X, " ", Y) + return (Float64(X) / CORDIC_MUL, Float64(Y) / CORDIC_MUL) +end + +# works only for real numbers +function approx_sin(x, y) + return (approx_trig(x, ITERATIONS)[2], 0) +end + +# works only for real numbers +function approx_cos(x, y) + return (approx_trig(x, ITERATIONS)[1], 0) +end + +function main() + println("Preprocessing CORDIC constants.") + preprocess_atan(CORDIC_MUL_POW) + preprocess_scaling_factor(CORDIC_MUL_POW) +end diff --git a/semestr-3/anm/cordic/csin.cpp b/semestr-3/anm/cordic/csin.cpp new file mode 100644 index 0000000..bcc9af4 --- /dev/null +++ b/semestr-3/anm/cordic/csin.cpp @@ -0,0 +1,49 @@ +#include "CORDICtable.c" +#include +// angle is radians multiplied by CORDIC multiplication factor M +// modulus can be set to CORDIC inverse gain 1/F to avoid post-division +void CORDICsincos(int a, int m, int *s, int *c) +{ + int k, tx, x = m, y = 0, z = a, fl = 0; + if (z > +CORDIC_HALFPI) + { + fl = +1; + z = (+CORDIC_PI) - z; + } + else if (z < -CORDIC_HALFPI) + { + fl = +1; + z = (-CORDIC_PI) - z; + } + for (k = 0; k < CORDIC_MAXITER; k++) + { + std::cout << x << " " << y << " " << z << "\n"; + tx = x; + if (z >= 0) + { + x -= (y >> k); + y += (tx >> k); + z -= CORDIC_ZTBL[k]; + } + else + { + x += (y >> k); + y -= (tx >> k); + z += CORDIC_ZTBL[k]; + } + } + if (fl) + x = -x; + *c = x; // m*cos(a) multiplied by gain F and factor M + *s = y; // m*sin(a) multiplied by gain F and factor M +} + +int main() +{ + double x; + std::cin >> x; + int sinus, cosinus; + CORDICsincos(x * CORDIC_MUL, CORDIC_1F, &sinus, &cosinus); + std::cout << sinus << " " << cosinus << "\n"; + std::cout << (double)sinus / (double)CORDIC_MUL << " " << (double)cosinus / (double)CORDIC_MUL << "\n"; +} \ No newline at end of file diff --git a/semestr-3/anm/cordic/taylor.jl b/semestr-3/anm/cordic/taylor.jl new file mode 100644 index 0000000..5d2d26d --- /dev/null +++ b/semestr-3/anm/cordic/taylor.jl @@ -0,0 +1,103 @@ +module taylor +using Base +using Printf + +ITER = 12 +HYPERBOLIC_MAX = 0.2 + +function series(x, parity, change_sign, iterations) + elements = ones(Float64, 2 * iterations) + res = 0.0 + i = 2 + while i <= 2 * iterations + parity - 2 + elements[i + 1] = elements[i] / i + if change_sign && (i % 2 == parity) + elements[i + 1] = -elements[i + 1] + end - + i += 1 + end + i = 2 * iterations + parity - 2 + while i >= parity + res *= x * x + res += elements[i + 1] + i -= 2 + end + if parity == 1 + res *= x + end + return res +end + +function real_sin(r, iterations) + r = r - floor(r / (2 * pi)) * 2 * pi + if r > pi + return -real_sin(r - pi, iterations) + end + if r > pi / 2 + return real_cos(r - pi / 2, iterations) + end + if r > pi / 4 + return real_cos(pi / 2 - r, iterations) + end + + return series(r, 1, true, iterations) +end + +function real_cos(r, iterations) + r = r - floor(r / (2 * pi)) * 2 * pi + if r > pi + return -real_cos(r - pi, iterations) + end + if r > pi / 2 + return -real_sin(r - pi / 2, iterations) + end + if r > pi / 4 + return real_sin(pi / 2 - r, iterations) + end + + return series(r, 0, true, iterations) +end + +function real_sinh(r, iterations) + if abs(r) > HYPERBOLIC_MAX + return 2 * real_sinh(r / 2, iterations) * real_cosh(r / 2, iterations) + end + return series(r, 1, false, iterations) +end + +function real_cosh(r, iterations) + if abs(r) > HYPERBOLIC_MAX + s = real_sinh(r / 2, iterations) + c = real_cosh(r / 2, iterations) + return s * s + c * c + end + return series(r, 0, false, iterations) +end + +function complex_sin(a, b, iterations) + return (real_sin(a, iterations) * real_cosh(b, iterations), + real_cos(a, iterations) * real_sinh(b, iterations)) +end + +function complex_cos(a, b, iterations) + return (real_cos(a, iterations) * real_cosh(b, iterations), + -real_sin(a, iterations) * real_sinh(b, iterations)) +end + +# c = a + bi +function csin(a, b) + return complex_sin(a, b, ITER) +end + +function ccos(a, b) + return complex_cos(a, b, ITER) +end + +function rsinh(r) + return real_sinh(r, ITER) +end + +function rcosh(r) + return real_cosh(r, ITER) +end +end \ No newline at end of file diff --git a/semestr-3/anm/cordic/trig.jl b/semestr-3/anm/cordic/trig.jl new file mode 100644 index 0000000..bf1dc2c --- /dev/null +++ b/semestr-3/anm/cordic/trig.jl @@ -0,0 +1,43 @@ +include("cordic.jl") +include("taylor.jl") +using Printf + +# preprocessing +cordic.main() + +function rel_error(x, y) + return abs((x - y) / y) +end + +function test_real_sin(arg, trig_func) + @printf("Testing relative error for function %s and argument %f.\n", String(Symbol(trig_func)), arg) + res = trig_func(arg, 0) + real_res = sin(arg) + @printf("Result: %.50f\n", res[1]) + @printf("LibRes: %.50F\n", real_res) + @printf("Relative error: %e\n", rel_error(res[1], real_res)) +end + +function test_complex_sin(arg_real, arg_imag, trig_func) + @printf("Testing relative error for function %s and argument %f + %f i.\n", String(Symbol(trig_func)), arg_real, arg_imag) + res = trig_func(arg_real, arg_imag) + real_res = sin(arg_real + arg_imag * im) + @printf("Result: %.50f + %.50f i\n", res[1], res[2]) + @printf("LibRes: %.50f + %.50f i\n", real(real_res), imag(real_res)) + @printf("Relative error: %e, %e\n", rel_error(res[1], real(real_res)), rel_error(res[2], imag(real_res))) +end + +test_real_sin(0.5, taylor.csin) +test_real_sin(0.5, cordic.approx_sin) + + +test_real_sin(0.001, taylor.csin) +test_real_sin(0.001, cordic.approx_sin) + + +test_real_sin(0.1, taylor.csin) +test_real_sin(0.1, cordic.approx_sin) + + +# test_complex_sin(0.5 + 2pi, 0.5, taylor.csin) +# test_complex_sin(100, 0.5, taylor.csin) \ No newline at end of file diff --git a/semestr-3/anm/gen.sh b/semestr-3/anm/gen.sh new file mode 100644 index 0000000..e69de29 diff --git a/semestr-3/anm/horner.jl b/semestr-3/anm/horner.jl new file mode 100644 index 0000000..a3fb69b --- /dev/null +++ b/semestr-3/anm/horner.jl @@ -0,0 +1,16 @@ +function horner(w, n, x0) + p = w[n + 1] + q = 0 + r = w[n + 1] + t = 0 + for i in range(n, 1, step=-1) + q = p + x0 * q + p = w[i] + x0 * p + t = r + x0 * t + r = p + x0 * r + end + return [p, q, r, t] +end + + +println(horner([-13, 10, -7, 2], 3, 2)) \ No newline at end of file diff --git a/semestr-3/anm/jpg2pdf (4).pdf b/semestr-3/anm/jpg2pdf (4).pdf new file mode 100644 index 0000000..2e64482 Binary files /dev/null and b/semestr-3/anm/jpg2pdf (4).pdf differ diff --git a/semestr-3/anm/l10.hs b/semestr-3/anm/l10.hs new file mode 100644 index 0000000..dfccaf4 --- /dev/null +++ b/semestr-3/anm/l10.hs @@ -0,0 +1,16 @@ +-- Zadanie 1 + +int :: (String -> a) -> String -> Integer -> a +int f s n = f (s ++ show n) + +str :: (String -> a) -> String -> String -> a +str f s1 s2 = f (s1 ++ s2) + +lit :: String -> (String -> a) -> String -> a +lit s f s2 = f (s2 ++ s) + +(^^) :: (b -> c) -> (a -> b) -> a -> c +(^^) = (.) + +sprintf :: ((String -> a) -> String -> String) -> String +sprintf f = f id "" \ No newline at end of file diff --git a/semestr-3/anm/l3z8.pdf b/semestr-3/anm/l3z8.pdf new file mode 100644 index 0000000..81941d5 Binary files /dev/null and b/semestr-3/anm/l3z8.pdf differ diff --git a/semestr-3/anm/l4z3.pdf b/semestr-3/anm/l4z3.pdf new file mode 100644 index 0000000..22f55f5 Binary files /dev/null and b/semestr-3/anm/l4z3.pdf differ diff --git a/semestr-3/anm/l4z7.jl b/semestr-3/anm/l4z7.jl new file mode 100644 index 0000000..febec3c --- /dev/null +++ b/semestr-3/anm/l4z7.jl @@ -0,0 +1,91 @@ +using OffsetArrays +using Printf +using Polynomials +BF = BigFloat +setprecision(128) + +function emptyArray(type, size) + return OffsetVector{type}(undef, 0:(size - 1)) +end + +function bairstow(n, p, u, v, iterations) + b = emptyArray(BF, n + 1) + c = emptyArray(BF, n + 1) + b[n] = p[n] + c[n] = 0 + c[n - 1] = p[n] + for j in 1:iterations + b[n - 1] = p[n - 1] + u * b[n] + for k in range(n - 2, 0, step=-1) + b[k] = p[k] + u * b[k + 1] + v * b[k + 2] + c[k] = b[k + 1] + u * c[k + 1] + v * c[k + 2] + end + J = c[0] * c[2] - c[1] * c[1] + u += (c[1] * b[1] - c[2] * b[0]) / J + v += (c[1] * b[0] - c[0] * b[1]) / J + end + return (u, v, b) +end + +function evalPolynomial(p, x) + res = BF(0) + for i in range(size(p)[1] - 1, 0, step=-1) + res = p[i] + res * x + end + return res +end + +function solveQuadratic(p) + if p[1] != 0 + delta = p[2]^2 - 4p[1]p[3] + delta += (delta < 0) ? 0im : 0 + if p[2] >= 0 + b = -p[2] - delta^0.5 + return (b / (2p[1]), 2p[3] / b) # <=> P[3]/P[1] = b / (2P[1]) * X <=> X = 2P[3] / b + else + b = -p[2] + delta^0.5 + return [2p[3] / b, b / (2p[1])] + end + elseif p[2] != 0 + return [-p[3] / p[2]] + else + return [] + end +end + +function findRoots(p, u, v, iterations) + u, v, b = bairstow(4, p, u, v, iterations) + z1, z2 = solveQuadratic([1, -u, -v]) + z3, z4 = solveQuadratic([b[4], b[3], b[2]]) + return [z1, z2, z3, z4] +end + +w = emptyArray(BF, 5) +w[0] = 1 +w[1] = 2 +w[2] = 3 +w[3] = 4 +w[4] = 5 + +u0 = BF(0.1) +v0 = BF(0.1) + +roots_of_w = findRoots(w, u0, v0, 20) + +for z in roots_of_w + # println(evalPolynomial(w, z)) + res = evalPolynomial(w, z) + @printf("Evaluation at root %.16f + %.16fi: %.16f + %.16fi\n", real(z), imag(z), real(res), imag(res)) +end + +roots_of_w2 = roots(Polynomial([1, 2, 3, 4, 5])) + +function relError(x, y) + return abs((x - y) / x) +end + +for (z1, z2) in zip(roots_of_w, roots_of_w2) + error = relError(z1, z2) + @printf("Błąd względny między %.16f + %.16fi oraz %.16f + %.16fi: %.16f\n", + real(z1), imag(z1), real(z2), imag(z2), error) +end \ No newline at end of file diff --git a/semestr-3/anm/l4z7.txt b/semestr-3/anm/l4z7.txt new file mode 100644 index 0000000..e69de29 diff --git a/semestr-3/anm/numerki/lista1/test.jl b/semestr-3/anm/numerki/lista1/test.jl new file mode 100644 index 0000000..235800a --- /dev/null +++ b/semestr-3/anm/numerki/lista1/test.jl @@ -0,0 +1,118 @@ +using Random + +function prettyfloat64(f) + ss = bitstring(f) + s = ss[1] + c = ss[2:12] + m = ss[13:end] + return string(s, " ", c, " ", m) +end + +function string_to_float64(st) + s = st[1] + c = st[2:12] + m = st[13:end] + + if s == '0' + s = 1.0 + else + s = -1.0 + end + + c = parse(Int, string("0b", c)) + c = 2.0^(c - 1023) + m = Float64(parse(Int64, string("0b", m))) / Float64(2^52) + 1.0 + return s * c * m +end + +rng = MersenneTwister(123) + +function rand_f64_bitstring() + return randstring(rng, ['0', '1'], 64) +end + +function test_string_to_float() + for i in 1:100000 + # st = rand_f64_bitstring() + st = rand(rng) + res = string_to_float64(bitstring(st)) + println(string(st, " -> ", prettyfloat64(st), " -> ", res)) + if bitstring(res) == bitstring(st) + println("OK") + else + println("ZJEBALO SIE") + break + end + end +end + +function find_felerny_x() + while true + x = rand(rng) + 1.0 + res = x * (1.0 / x) + if res != 1.0 + println(string("Znalazlem! ", x)) + return x + end + end +end + +function find_felerne_iksy(iterations) + bad_xs = 0 + for i in 1:iterations + x = rand(rng) + 1.0 + res = x * (1.0 / x) + if res != 1.0 + bad_xs += 1 + end + end + println("Znalazlem ", bad_xs, " felernych iksow, czyli ", bad_xs / iterations * 100.0, "% wszystkich losowanych wartosci.") +end + +# find_felerne_iksy(10000000) + + +function rel_error(x, rx) + x = Float64(x) + rx = Float64(rx) + relative = abs((x - rx) / x) + return relative +end + +function test_poly(t, poly, x=4.71, exact=-14.636489) + println("Testing poly \"", poly, "\" with float type ", t, ".") + res = poly(x, t) + println(poly, "(", x, ") = ", res) + println("Relative error (exact: ", exact, "): ", rel_error(exact, res)) +end + +function w(x, t) + x = t(x) + return x^3 - (t(6)) * (x^2) + (t(3)) * x - t(0.149) +end + +function w2(x, t) + x = t(x) + return ((x - t(6)) * x + t(3)) * x - t(0.149) +end + + +function task3() + println("Task3: ") + + test_poly(Float16, w) + println() + test_poly(Float32, w) + println() + test_poly(Float64, w) + println() + + test_poly(Float16, w2) + println() + test_poly(Float32, w2) + println() + test_poly(Float64, w2) + println() +end + + diff --git a/semestr-3/anm/numerki/lista1/test.jl.txt b/semestr-3/anm/numerki/lista1/test.jl.txt new file mode 100644 index 0000000..81b4901 --- /dev/null +++ b/semestr-3/anm/numerki/lista1/test.jl.txt @@ -0,0 +1,16 @@ +function string_to_float64(st) + s = st[1] + c = st[2:12] + m = st[13:end] + + if s == '0' + s = 1.0 + else + s = -1.0 + end + + c = parse(Int, string("0b", c)) + c = 2.0 ^ (c - 1023) + m = Float64(parse(Int64, string("0b", m))) / Float64(2^52) + 1.0 + return s * c * m +end diff --git a/semestr-3/anm/numerki/lista2/rozw.ml b/semestr-3/anm/numerki/lista2/rozw.ml new file mode 100644 index 0000000..f946051 --- /dev/null +++ b/semestr-3/anm/numerki/lista2/rozw.ml @@ -0,0 +1,33 @@ +(* Zadanie 1 *) + +let sublists l = + let rec backtrack sl = function + | [] -> [sl] + | hd :: tl -> (backtrack (sl @ [hd]) tl) @ backtrack sl tl + in backtrack [] l + + +(* Zadanie 2 *) + +(* Znalezione tutaj: https://stackoverflow.com/questions/2710233/how-to-get-a-sub-list-from-a-list-in-ocaml *) + +let rec super_sublist b e = function + | [] -> failwith "empty list" + | hd :: tl -> + let tail = if e <= 1 then [] else super_sublist (b - 1) (e - 1) tl in + if b > 0 then tail else hd :: tail + +(* Moje rozwiązanie: *) + +let rec sublist b e l = + let rec suffix idx l = + if idx = 0 then l else suffix (idx - 1) (List.tl l) in + let rec prefix idx l = + if idx = 0 then [] else (List.hd l) :: (prefix (idx - 1) (List.tl l)) in + prefix (e - 1) (suffix b l) + +let cycle_with_sub sublist_fun xs n = + sublist_fun n (n + (List.length xs)) (xs @ xs) + +let super_cycle = cycle_with_sub super_sublist +let cycle = cycle_with_sub sublist diff --git a/semestr-3/anm/pracownia1/doc/sprawozdanie.pdf b/semestr-3/anm/pracownia1/doc/sprawozdanie.pdf new file mode 100644 index 0000000..17e700b Binary files /dev/null and b/semestr-3/anm/pracownia1/doc/sprawozdanie.pdf differ diff --git a/semestr-3/anm/pracownia1/doc/sprawozdanie.tex b/semestr-3/anm/pracownia1/doc/sprawozdanie.tex new file mode 100644 index 0000000..c485314 --- /dev/null +++ b/semestr-3/anm/pracownia1/doc/sprawozdanie.tex @@ -0,0 +1,464 @@ +\documentclass[12pt]{extarticle} +\setlength{\emergencystretch}{2em} +\usepackage{datetime} +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage{ae,aecompl} +\usepackage[activate={true,nocompatibility},final,tracking=true,kerning=true,spacing=true,stretch=10,shrink=10]{microtype} +\frenchspacing +\usepackage[utf8]{inputenc} +\usepackage[polish]{babel} +%%% fix for \lll +\let\babellll\lll +\let\lll\relax +\usepackage{geometry} +\newgeometry{vmargin={25mm}, hmargin={25mm,25mm}} +\usepackage[]{algorithm2e} + + +\usepackage{enumitem} +\usepackage{graphicx} +\usepackage[normalem]{ulem} +\usepackage{tikz} + +\usetikzlibrary{external} +\tikzexternalize[prefix=tikz/] + +\usetikzlibrary{arrows.meta} +\usetikzlibrary{matrix, arrows} +\usepackage{program} +\usepackage{amsfonts} +\usepackage{amssymb} +%%% fix for \lll +\let\mathlll\lll +\let\lll\babellll + +\usepackage{amsmath} +\usepackage{amsthm} +\usepackage{tikz-cd} +\usepackage{float} +\usepackage{hyperref} +\usepackage{multicol} +\usepackage{mathtools} + +\usepackage{array} +\usepackage{wrapfig} +\usepackage{multirow} +\usepackage{tabularx} +\newcommand{\RR}{\mathbb{R}} +\newcommand{\CC}{\mathbb{C}} +\DeclarePairedDelimiter\abs{\lvert}{\rvert}% + +\newcommand{\fC}{{\mathfrak C}} +\newcommand{\cM}{{\mathcal M}} +\newcommand{\cC}{{\mathcal C}} +\newcommand{\cD}{{\mathcal D}} +\newcommand{\bN}{{\mathbf{N}}} +\newcommand{\bR}{{\mathbf{R}}} +\newcommand{\bZ}{{\mathbf{Z}}} +\newcommand{\bF}{{\mathbf{F}}} +\newcommand{\bQ}{{\mathbf{Q}}} +\newcommand{\bC}{{\mathbf{C}}} +\newcommand{\cA}{{\mathcal A}} +\newcommand{\cO}{{\mathcal O}} +\newcommand{\cF}{{\mathcal F}} +\newcommand{\cB}{{\mathcal B}} +\newcommand{\Ob}{{\mathrm{Ob}}} +\newcommand{\topl}{\mathcal T} +\newcommand{\Set}{{\mathrm{Set}}} +\newcommand{\Grp}{{\mathrm{Grp}}} +\newcommand{\AbGrp}{{\mathrm{AbGrp}}} +\newcommand{\Mod}{{\mathrm{Mod}}} +\newcommand{\Ring}{{\mathrm{Ring}}} +\newcommand{\Vect}{{\mathrm{Vect}}} +\newcommand{\Alg}{{\mathrm{Alg}}} +\newcommand{\restr}{\mathord{\upharpoonright}} +\newcommand{\liff}{\mathrel{\leftrightarrow}} +\newcommand{\limplies}{\mathrel{\rightarrow}} +\newcommand{\set}[2]{\left\{{#1} \mid {#2} \right\} } +\newcommand{\fset}[1]{\left\{{#1}\right\}} +\newcommand{\meet}{\mathbin{\wedge}} +\newcommand{\join}{\mathbin{\vee}} +\newcommand{\biglor}{\bigvee} +\newcommand{\bigland}{\bigwedge} + + +\DeclareMathOperator{\round}{{round}} +\DeclareMathOperator{\cl}{{cl}} +\DeclareMathOperator{\Id}{{Id}} +\DeclareMathOperator{\id}{{id}} +\DeclareMathOperator{\Aut}{{Aut}} +\DeclareMathOperator{\End}{{End}} +\DeclareMathOperator{\Ult}{{Ult}} +\DeclareMathOperator{\Homeo}{{Homeo}} +\DeclareMathOperator{\dom}{{dom}} +\DeclareMathOperator{\rng}{{rng}} +\DeclareMathOperator{\Core}{{Core}} +\DeclareMathOperator{\Hom}{{Hom}} +\DeclareMathOperator{\Stab}{{Stab}} +\DeclareMathOperator{\dcl}{{dcl}} +\DeclareMathOperator{\acl}{{acl}} +\DeclareMathOperator{\tp}{{tp}} +\DeclareMathOperator{\characteristic}{{char}} + + + +\newtheorem{twr}{Twierdzenie}[section] +\newtheorem{hip}[twr]{Hipoteza} +\newtheorem{pyt}[twr]{Pytanie} +\newtheorem{problem}[twr]{Problem} +\newtheorem{lem}[twr]{Lemat} +\newtheorem{fkt}[twr]{Fakt} +\newtheorem{wnsk}[twr]{Wniosek} +\newtheorem{stw}[twr]{Stwierdzenie} +\newtheorem{cw}[twr]{Ćwiczenie} + +\theoremstyle{remark} +\newtheorem{uwg}[twr]{Uwaga} +\theoremstyle{definition} +\newtheorem{dfn}[twr]{Definicja} +\newtheorem*{rozw}{Rozwiązanie} +\newtheorem*{sbclm}{Podclaim} +\newtheorem*{clm*}{Claim} +\newtheorem{pd}[twr]{Przykład} +\newcounter{claimcounter}[twr] +\newenvironment{clm}{\stepcounter{claimcounter}{\noindent {\textbf{Claim}} \theclaimcounter:}}{} +\newenvironment{clmproof}[1][\proofname]{\proof[#1]\renewcommand{\qedsymbol}{$\square$(claim)}}{\endproof} +\newenvironment{sbclmproof}[1][\proofname]{\proof[#1]\renewcommand{\qedsymbol}{$\square$(subclaim)}}{\endproof} + +\newcommand{\xqed}[1]{% + \leavevmode\unskip\penalty9999 \hbox{}\nobreak\hfill + \quad\hbox{\ensuremath{#1}}} +\theoremstyle{definition} +\newtheorem{zad}[twr]{Zadanie} + +\title{Pracownia z analizy numerycznej \\ + \large Sprawozdanie do zadania \textbf{P1.10} \\ + Prowadzący: dr Rafał Nowak} +\author{Franciszek Malinka, Kacper Solecki} +\date{Wrocław, Listopad 2020} + +\begin{document} + +\maketitle + +\section{Wstęp} +Funkcje trygonometryczne mają szerokie zastosowania w matematyce, informatyce, inżynierii, architekturze, produkcji muzyki i wielu innych dziedzinach. Nietrudno zatem dojść do wniosku, że ich efektywne i dokładne obliczanie jest problemem bardzo ważnym w kontekście tych zagadnień. + +W niniejszym sprawozdaniu przyjrzymy się dwóm opracowanym przez nas metodom obliczania wybranych funkcji trygonometrycznych używając jednie najprostszych operacji arytmetycznych ($+$, $-$, $*$, $/$, ale też przesunięcia bitowe), ze szczególnym naciskiem na dokładne obliczanie funkcji $\sin$ oraz $\cos$, również w dziedzinie liczb zespolonych. + +Proponowane przez nas metody mają docelowo dawać poprawne obliczenia dla podwójnej precyzji obliczeń, jednakże testy numeryczne przeprowadzamy używając zmiennych typu \texttt{BigFloat} w języku \texttt{Julia} (w którym implementowaliśmy nasze rozwiązania). Typ ten oferuje dowolną dokładność obliczeń. Wyniki naszych funkcji porównujemy z funkcjami bibliotecznymi języka i zakładamy, że dają one dokładne wyniki. + +\section{Algorytm CORDIC} +\subsection{Opis algorytmu} + +Pierwszą proponowaną przez nas metodą obliczania funkcji $\sin$ oraz $\cos$ jest Algorytm CORDIC (\textbf{CO}ordinate \textbf{R}otation \textbf{DI}gital \textbf{C}omputer). Algorytm ten został stworzony z myślą o komputerach o niskiej mocy obliczeniowej, ale również o możliwości ''włożenia'' algorytmu w hardware (tj. pozwala tworzyć mało skomplikowane układy bramek logicznych, które obliczają funkcje trygonometryczne). Jak się przekonamy, proces iteracyjny algorytmu korzysta jedynie z dodawania, odejmowania, przesunięć bitowych i wartości obliczonych podczas preprocessingu oraz nie wykorzystuje liczb zmiennoprzecinkowych. + +Zacznijmy od wprowadzenia zarysu działania algorytmu. Zapomnijmy na razie o analizie numerycznej i przenieśmy się do świata algebry liniowej. Wyobraźmy sobie, że mamy wydajny system który obliczy wektor $(x_r, y_r)$ jako wynik obrotu danego wektora $(x_0, y_0)$ o dany kąt $\theta$ wokół środka układu współrzędnych: +\begin{align} + x_r = x_0\cos\theta - y_0\sin\theta \\ + y_r = x_0\sin\theta + y_0\cos\theta +\end{align} + +Jeśli za $(x_0, y_0)$ weźmiemy punkt $(1, 0)$, to po obrocie dostaniemy: +\begin{align*} + x_r = \cos\theta \\ + y_r = \sin\theta +\end{align*} +Zatem używając obrotu umiemy policzyć wartości funkcji $\cos$ oraz $\sin$. + +Zapiszmy równania $(1), (2)$ w formie macierzowej: +\begin{align} + \begin{bmatrix} + x_r \\ y_r + \end{bmatrix} + = \begin{bmatrix} + \cos\theta & -\sin\theta \\ + \sin\theta & \cos\theta + \end{bmatrix} + \begin{bmatrix} + x_0 \\ y_0 + \end{bmatrix} + = \cos\theta + \begin{bmatrix} + 1 & -\tan\theta \\ + \tan\theta & 1 + \end{bmatrix} + \begin{bmatrix} + x_0 \\ y_0 + \end{bmatrix} +\end{align} + +Powyższa równość pokazuje, że do obliczenia naszego wektora wynikowego (przy założeniu, że znamy wartości $\tan\theta$ oraz $\cos\theta$) wystarczą jedynie 4 mnożenia i kilka dodawań lub odejmowań. Chcielibyśmy pozbyć się tych mnożeń. Skorzystamy tutaj z dwóch obserwacji: +\begin{itemize} + \item Każdy kąt $\theta\in [0^{\circ}, 90^{\circ}]$ możemy zapisać jako sumę \textbf{wcześniej ustalonych}, mniejszych (co do modułu) kątów $\theta_i, i \in \{0, ..., n\}$: + \begin{align} + \theta = \sum_{i=0}^n \sigma_i\theta_i, \; \sigma_i \in \{-1, 1\} + \end{align} + Dla przykładu, kąt $57.353^{\circ}$ jest sumą kątów + $45^{\circ}, 26.565^{\circ}, -14.03^{\circ}$ (dobór tych kątów jest nieprzypadkowy, o czym się zaraz przekonamy). Jeśli $\theta$ nie należy do zadanego przez nas przedziału, to możemy ten kąt zmienić korzystając ze wzorów redukcyjnych (o tym więcej w \textsection3). + \item Jeśli nasze kąty $\theta_i$ będą dobrane tak, że $\tan\theta_i = 2^{-i}$, to mnożenie przez $\tan\theta_i$ jest niczym innym jak przesunięciem bitowym (w liczbach całkowitych). Dodatkowo okazuje się, że dowolny kąt nie większy niż $90^{\circ}$ da się przybliżyć sumą tak dobranych kątów $\theta_i$, więc da się tymi kątami osiągnąć cel założony w pierwszym punkcie. Dodatkowo im więcej takich kątów wybierzemy, tym dokładniejsze będzie to przybliżenie. +\end{itemize} + +Pozostały nam jeszcze mnożenia przez czynnik $\cos\theta$ (który nazwiemy przyrostem). Jeżeli to zignorujemy, to otrzymana rotacja będzie faktycznie obróceniem wektora o kąt $\theta$, ale z dodatkowym przeskalowaniem wektora. + +% \begin{center} +% \begin{tikzpicture} +% \draw [<->,thick] (0,6) node (yaxis) [above] {$y$} +% |- (8,0) node (xaxis) [right] {$x$}; +% \draw [->, thick] (0, 0) -- (6, 2) node (v1) [right] {$(x_0, y_0)$} +% \draw [->, cm={cos(45) ,-sin(45) ,sin(45) ,cos(45) ,(0 cm, 0 cm)}] (0, 0) -- (6,2) +% % \draw[black, thick, ->] (0,0) -- (10,0); +% % \draw[black, thick, ->] (0,0) -- (0,8); +% \end{tikzpicture} +% \end{center} + +Przyjrzyjmy się jak dokładnie będzie wyglądać nasz przyrost, jeśli zastosujemy zaproponowane przez nas punkty do obliczania obrotu. Powiedzmy, że chcemy obrócić wejściowy wektor o kąt $57.353^{\circ} = 45^{\circ} + 26.565^{\circ} - 14.03^{\circ}$. Wartości funkcji $\tan$ tych kątów są odwrotnościami potęg dwójki, zatem te kąty spełniają nasze założenie. Pierwsza rotacja o $45^{\circ}$ daje: +\begin{align} + \begin{bmatrix} + x_1 \\ y_1 + \end{bmatrix} + = \cos 45^{\circ} + \begin{bmatrix} + 1 & -1 \\ + 1 & 1 + \end{bmatrix} + \begin{bmatrix} + x_0 \\ y_0 + \end{bmatrix} +\end{align} +Druga rotacja daje: +\begin{align} + \begin{bmatrix} + x_2 \\ y_2 + \end{bmatrix} + = \cos 26.565^{\circ} + \begin{bmatrix} + 1 & -2^{-1} \\ + 2^{-1} & 1 + \end{bmatrix} + \begin{bmatrix} + x_1 \\ y_1 + \end{bmatrix} +\end{align} +Trzecia rotacja: +\begin{align} + \begin{bmatrix} + x_3 \\ y_3 + \end{bmatrix} + = \cos(-14.03^{\circ}) + \begin{bmatrix} + 1 & 2^{-2} \\ + -2^{-2} & 1 + \end{bmatrix} + \begin{bmatrix} + x_2 \\ y_2 + \end{bmatrix} +\end{align} +Łącząc te równania razem dostajemy: +\begin{align} + \begin{bmatrix} + x_3 \\ y_3 + \end{bmatrix} + = \cos 45^{\circ}\cos 26.565^{\circ}\cos(-14.03^{\circ}) + \begin{bmatrix} + 1 & -1 \\ + 1 & 1 + \end{bmatrix} + \begin{bmatrix} + 1 & -2^{-1} \\ + 2^{-1} & 1 + \end{bmatrix} + \begin{bmatrix} + 1 & 2^{-2} \\ + -2^{-2} & 1 + \end{bmatrix} + \begin{bmatrix} + x_0 \\ y_0 + \end{bmatrix} +\end{align} + +Zauważmy, że dzięki parzystości funkcji $\cos$ znak poszczególnych kątów nie ma znaczenia dla wartości przyrostu. Z tego snujemy wniosek, że przy ustalonej liczbie iteracji przyrost nie zależy od wyboru kąta $\theta$. Możemy go zatem policzyć i wziąć go pod uwagę dopiero na koniec obliczeń. +\begin{align} + P = \cos 45^{\circ}\cdot\cos 26.565^{\circ}\cdot\cos 14.03^{\circ}\cdot\ldots \approx 0.6072 +\end{align} +W takim razie, pomijając przyrost $P$ otrzymujemy następujący proces iteracyjny algorytmu CORDIC: +\begin{align} + x_{i + 1} & = x_{i} - \sigma_i 2^{-i}y_i \\ + y_{i + 1} & = y_i + \sigma_i 2^{-i}y_i +\end{align} + +Pozostaje jedynie problem znajdowania znaków $\sigma_i$ przy kątach $\theta_i$. Okazuje się jednak, że możemy to robić w bardzo prosty sposób. Niech $z_0 = \theta, \sigma_0 = 1$. W każdym kroku iteracyjnym znak $\sigma_{i + 1}$ dobieramy w następujący sposób -- niech $z_{i}$ będzie równe $\theta - \sum_{k=0}^{i - 1}\sigma_k\theta_k$ (czyli $z_i$ mówi jaki jeszcze nam został kąt do obrócenia, potencjalnie obróciliśmy już za dużo, wtedy $z_i < 0$). Wtedy $\sigma_{i + 1} = sgn(z_i)$. Mamy też $z_{i + 1} = z_{i} - \sigma_i\theta_i = z_{i} - \sigma_i\arctan{2^{i}}$. Błąd przybliżenia po $n$ iteracjach możemy wtedy łatwo policzyć ze wzoru +\begin{align} + \theta_{error} = \z_n = \theta - \sum_{i=0}^n\sigma_i \theta_i +\end{align} + +Zbierając wszystko razem, proces iteracyjny algorytmu CORDIC wygląda następująco: +\begin{align*} + x_{i + 1} & = x_{i} - \sigma_i 2^{-i}y_i \\ + y_{i + 1} & = y_i + \sigma_i 2^{-i}y_i \\ + z_{i + 1} & = z_i - \sigma_i \arctan 2^{-1} +\end{align*} + +Kąty $\theta_i = \arctan{2^{-1}}$ możemy policzyć w preprocessingu i używać jako stałych. Wtedy rezultatem naszych obliczeń będzie $\cos\theta \approx P\cdot x_n$ oraz $\sin\theta \approx P\cdot y_n$. Dodatkowo, gdybyśmy przyjęli $x_0 = 1/P$, to pozbylibyśmy się nawet tego ostatniego mnożenia. + +Warto jeszcze zauważyć, że +\begin{align*} + \frac{1}{\cos(\arctan 2^{-i})} = \sqrt{1 + \frac{1}{2^{2i}}} +\end{align*} +Możemy ten fakt wykorzystać do dokładniejszego obliczania wartości $P$. + +Musimy jeszcze zauważyć, że algorytm działa jedynie dla kątów $\theta$ spełniających +\begin{align*} + \abs{\theta} \leq \sum_{i=0}^n\theta_i \approx 99.88^{\circ} +\end{align*} +Zatem dla kątów większych niż $90^{\circ}$ musimy skorzystać ze wzorów redukcyjnych, co dokłada pewnego błędu do naszego wyniku oraz powoduje konieczność wykonania kilku dodatkowych dzieleń i mnożeń. + +\subsection{Niespełniona obietnica} +We wstępie powiedzieliśmy, że algorytm będzie korzystał z dodawań, odejmowań i przesunięć bitowych, a do tego używał liczb całkowitych. Dzięki naszemu ustaleniu, że $\arctan\theta_i = 2^{-i}$, wszystkie mnożenia podczas iteracji naszego algorytmu to mnożenia przez potęgi dwójki. Jak możemy to wykorzystać? + +Ustalmy $M := 2^{K}$ dla pewnego $K$ (potem je wybierzemy). Teraz każdą spreprocessowaną +przez nas wartość $T$ (czyli $T$ jest kątem $\theta_i$ lub przyrostem $P$) przyjmiemy +$T := \round(M \cdot T)$. Chcąc policzyć wartości funkcji trygonometrycznych dla kąta $\theta$, +uruchomimy nas proces iteracyjny dla $x_0 = \round(M/P)$, $y_0 = 0$, $z_0 = \round(M\cdot\theta)$. +Zauważmy, że dzięki temu przeskalowaliśmy wszystkie obliczane przez nas wartości o stałą $M$ +i zaokrągliliśmy je po to, by móc pracować na liczbach całkowitych. To pozawala na wykorzystanie +przesunięć bitowych podczas mnożenia przez potęgi dwójki, dzięki czemu znacznie zwiększyliśmy +wydajność naszego algorytmu. Wtedy, po $n$ iteracjach naszego procesu mamy $\cos\theta \approx x_n/M$ +oraz $\sin\theta\approx y_n/M$ (już w arytmetyce zmiennoprzecinkowej). + +Zostało nam ustalić wartość $K$. Na pewno chcielibyśmy, aby $K$ było nie większe niż +długość mantysy. Ponadto algorytm ma być dostosowany do mało wydajnych maszyn, dlatego +w naszych analizach pracujemy przy użyciu \texttt{Int32}, zatem nie chcemy żeby $2^K\cdot T$ przekroczyło +zakres \texttt{Int32}. Jednakże kąty $\theta_i$ oraz wartość $P$ są niewielkie, zatem $K = 30$ będzie +odpowiednią wartością. + +\section{Wzór Taylora} +\subsection{Opis metody} +Zanim przejdziemy do opisu tej metody, przypomnijmy sobie pewną tożsamość trygonometryczną: +\begin{align} + \sin z = \sin (x + yi) = \sin x\cosh (y) + i\cos x\sinh(y) +\end{align} +Korzystając z tej tożsamości pozbywamy się konieczności pracowania z liczbami zespolonymi i możemy operować jedynie w zbiorze liczb rzeczywistych. + +W tej metodzie wykorzystamy znany analityczny wzór zwany wzorem Taylora. Korzystając z niego możemy wyprowadzić rozwinięcia funkcji trygonometrycznych: + +\begin{align*} + \sin x & = x - \frac{x^3}{3!} + \frac{x^5}{5!} - \frac{x^7}{7!} + \ldots \\ + \sinh x & = x + \frac{x^3}{3!} + \frac{x^5}{5!} + \frac{x^7}{7!} + \ldots \\ + \cos x & = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \frac{x^6}{6!} + \ldots \\ + \cosh x & = 1 + \frac{x^2}{2!} + \frac{x^4}{4!} + \frac{x^6}{6!} + \ldots \\ +\end{align*} + +Obliczanie rozwinięć poszczególnych funkcji jest proste i wyabstrahowaliśmy je do jednej, generycznej funkcji \texttt{TalyorSeries}: +\begin{center} + \begin{algorithm}[H] + \SetAlgoLined + \KwData{x, parity, changeSign, M} + \KwResult{Obliczenie szeregu Taylora odpowiedniej funkcji trygonometrycznej w punkcie x dla jego pierwszych M niezerowych wyrazów} + result := 0\; + elem := 1\; + \If{parity = 1}{ + elem := x\; + } + i := parity + 1\; + \While{i $\le$ 2M + parity}{ + result := result + elem\; + elem := elem * changeSign * x * x / (i * (i + 1))\; + i := i + 2\; + } + \end{algorithm} +\end{center} + +Algorytm oblicza sumę $\sum_{n=0}^M\sigma_n\frac{x^n}{n!}$, gdzie $\sigma_i \in \{-1, 0, 1\}$. Wartość $\sigma_n$ zależy od wartości parametrów podanych w funkcji: gdzy \texttt{parity} jest równe $0$, wtedy mamy $\sigma_{2k + 1} = 0$, a gdy \texttt{parity} jest równe $0$ mamy $\sigma_{2k} = 0$. Odpowiada to odpowiednio szeregom $\cos x, \cosh x$ oraz $\sin x, \sinh x$. Od parametru \texttt{changeSign} zależy czy chcemy, aby kolejne niezerowe wyrazy obliczanego szeregu zmieniały znak (zmieniamy znak, gdy chcemy obliczać zwykłe funkcje trygonometryczne oraz nie zmieniamy gdy obliczamy funkcje hiperboliczne). + +To daje prostą możliwość obliczania pożądanych przez nas funkcji: + +\begin{align*} + \sin x & = \texttt{TaylorSeries}(x, 1, -1, M) \\ + \sinh x & = \texttt{TaylorSeries}(x, 1, 1, M) \\ + \cos x & = \texttt{TaylorSeries}(x, 0, -1, M) \\ + \cosh x & = \texttt{TaylorSeries}(x, 0, 1, M) +\end{align*} + +Zauważmy, że wzór Taylora nadaje się do przybliżania funkcji trygonometrycznych jedynie dla argumentów bliskich $0$. Na szczęście możemy sobie z tym poradzić korzystając ze znanych tożsamości trygonometrycznych oraz okresowości funkcji $\sin$ i $\cos$. Naszym celem przed obliczniem funkcji \texttt{TaylorSeries} będzie sprowadzenie argumentu do przedziału $[0, \pi/4]$, w którym wzór Taylora bardzo dobrze przybliża wartości funkcji trygonometrycznych. Oto tabela która przedstawia jak radzimy sobie z argumentami spoza tego przedziału: +\begin{center} + \begin{tabular}{ |p{4cm}||p{4cm}|p{4cm}| } + \hline + \multicolumn{3}{|c|}{Wzory redukcyjne} \\ + \hline + Warunek na $x$ & $\sin x$ & $\cos x$ \\ + \hline + $x < 0$ & $-\sin (-x)$ & $\cos (-x)$ \\ + $x \ge 2\pi$ & $\sin(x \mod 2\pi)$ & $\cos (x\mod 2\pi)$ \\ + $x > \pi$ & $-\sin(x - \pi)$ & $-\cos(x - \pi)$ \\ + $x > \pi/2$ & $\cos(x - \pi/2)$ & $-\sin(x - \pi/2)$ \\ + $x > \pi/4$ & $\cos(\pi/2 - x)$ & $\sin(\pi/2 - x)$ \\ + \hline + \end{tabular} + \\ +\vspace{0.5cm} +Tabela 2: błędy przy obliczaniu funkcji $\sin(x)$. +\end{center} + +Dla funkcji hiperbolicznych sposób jest prostszy: korzystamy z dwóch własności: +\begin{align*} + \sinh x & = 2\sinh(x/2)\cosh(x/2) \\ + \cosh x & = \cosh^2(x/2) + \sinh^2(x/2) +\end{align*} +Można by przypuszczać, że dla dużych $x$ błąd obliczania tych funkcji będzie duży. Jednakże okazuje się, że funkcje te bardzo szybko rosną i już dla $x = 1000$ wartości obu tych funkcji nie mieszczą się w zakresie \texttt{Float64}, zatem tak naprawdę wykonamy maksymalnie $15$ takich redukcji, co generuje dopuszczalnie mały błąd. + +\section{Analiza błędu} + +\subsection{Wyniki testów} +Dokładność naszych metod porównywaliśmy z funkcjami bibliotecznymi w języku \texttt{Julia}, które domyślnie obsługują obliczanie wartości funkcji trygonometrycznych dla liczb zespolonych. Zakładmy o tych funkcjach bibliotecznych, że dają poprawny wynik. + +Przeprowadziliśmy testy dokładności metody opartej na wzorze Taylora dla liczb rzeczywistych oraz dla liczb zespolonych oraz testy dla metody Taylora, w której nie używaliśmy wzorów redukcyjnych, lecz rozwijaliśmy wzór dopóki wystarczająco dobrze nie przybliżał wartości funkcji dla danego argumentu. Testy dla algorytmu CORDIC przeprowadziliśmy wyłącznie dla liczb rzeczywistych. + +Dla każdej metody przeprowadziliśmy trzy rodzaje testów, w każdym z nich losowaliśmy $10^8$ liczb z różnych przedziałów. Ze względu na podobieństwo funkcji $\sin$ i $\cos$ oraz z faktu, że często wzory redukcyjne powodują faktycznie obliczanie innej funkcji trygonometrycznej, testy przeprowadziliśmy wyłącznie dla funkcji $\sin$. Przedziały i wyniki testów przedstawione są w poniższej tabeli: + +\begin{center} +\resizebox{\textwidth}{!}{% +{\setlength{\extrarowheight}{5pt}% +\begin{tabular}{ |c||c|c|c|c|c| } +\hline +algorytm & przedział argumentu & średni błąd wz. & max błąd wz. & średni błąd bezwz. & max błąd bezwz. \\ +\hline +\multirow{3}{6em}{Taylor dla $\RR$} & $x:$ dowolny Float64 & $1,887 \cdot 10^{-15}$ & $3,167 \cdot 10^{-8}$ & $1,179 \cdot 10^{-16}$ & $8,882 \cdot 10^{-16}$\\ +\cline{2-6} +& $-2\pi \leq x \leq 2\pi$ & $1,472 \cdot 10^{-15}$ +& $1.184 \cdot 10^{-8}$ & $9,766 \cdot 10^{-17}$ & $5,551 \cdot 10^{-16}$\\ +\cline{2-6} +& $0 \leq x \leq 1$ & $8,694 \cdot 10^{-17}$ & $6,661 \cdot 10^{-16}$ & $4,293 \cdot 10^{-17}$ & $4,441 \cdot 10^{-16}$ \\ +\hline +\multirow{3}{6em}{Taylor dla $\CC$} & $-100 \leq \abs{x} \leq 100$ & $4,932 \cdot 10^{-15}$ & $1,311 \cdot 10^{-13}$ & $1,689 \cdot 10^{26}$ & $5,898 \cdot 10^{29}$ \\ +\cline{2-6} +& $-2\pi \leq \abs{x} \leq 2\pi$ & $4,338 \cdot 10^{-16}$ & $1,487 \cdot 10^{-11}$ & $1,364 \cdot 10^{-14}$ & $8,710 \cdot 10^{-13}$ \\ +\cline{2-6} +& $0 \leq \abs{x} \leq 1$ & $1,597 \cdot 10^{-16}$ & $1,099 \cdot 10^{-15}$ & $1,124 \cdot 10^{-16}$ & $1,111\cdot 10^{-15}$ \\ +\hline +\multirow{3}{6em}{Taylor dla $\CC$ bez wzorów redukcyjnych} & $-100 \leq \abs{x} \leq 100$ & $4,77 \cdot 10^{23}$ & $4,488 \cdot 10^{26}$ & $7,759 \cdot 10^{40}$ & $2,208 \cdot 10^{44}$ \\ +\cline{2-6} +& $-2\pi \leq \abs{x} \leq 2\pi$ & $6,333 \cdot 10^{-1}$ & $1,000$ & $2,344 \cdot 10$ & $2,677 \cdot 10^2$ \\ +\cline{2-6} +& $0 \leq \abs{x} \leq 1$ & $1,589 \cdot 10^{-16}$ & $1,291 \cdot 10^{-15}$ & $1,118 \cdot 10^{-16}$ & $1,116 \cdot 10^{-15}$ \\ +\hline +\multirow{3}{6em}{Cordic dla $\RR$} & $x:$ dowolny Float64 & $3,100 \cdot 10^{-8}$ & $4,575 \cdot 10^{-1}$ & $2,459 \cdot 10^{-9}$ & $5,529 \cdot 10^{-3}$ \\ +\cline{2-6} +& $-2\pi \leq x \leq 2\pi$ & $2,770 \cdot 10^{-8}$ & $1,183 \cdot 10^{-1}$ & $2,532 \cdot 10^{-9}$ & $6,042 \cdot 10^{-4}$ \\ +\cline{2-6} +& $0 \leq x \leq 1$ & $4,176 \cdot 10^{-8}$ & $9,182 \cdot 10^{-2}$ & $2,614 \cdot 10^{-9}$ & $5,261 \cdot 10^{-4}$ \\ +\hline +\end{tabular}}} +\\ +\vspace{0.5cm} +Tabela 2: błędy przy obliczaniu funkcji $\sin(x)$. +\end{center} + +\subsection{Wnioski} +Jak widać dla wszystkich testów, zaproponowane przez nas metody sprawdzają się bardzo dobrze dla małych argumentów. Algorytm CORDIC wypada dużo gorzej od metody korzystającej ze wzoru Taylora, lecz nie jest to dla nas nic zaskakującego -- metoda ta tworzy kompromis między wydajnością, a dokładnością obliczeń. Dla obu metod widać, że problemem jest zmiana argumentu na mały, gdyż to generuje największy błąd. W obu przypadkach najgorszy błąd względny generowały argumenty, które są duże i zbliżone do wielokrotności $\pi$, co wynika z konieczności odejmowania, z którego korzysta działanie $\mod$ oraz wzory redukcyjne, co prowadzi do utraty cyfr znaczących. + +Dużym problemem w obliczaniu wartości funkcji trygonometrycznych w dziedzinie liczb zespolonych jest konieczność używa funkcji hiperbolicznych, które rosną w tempie wykładniczym. Jeśli spojrzymy na wzór $(13)$ to zauważmy, że bardzo prawdopodobne jest, że będziemy mnożyć zbliżoną do $0$ wartość funkcji $\sin$ oraz $\cos$ z potencjalnie bardzo dużymi wartościami funkcji $\cosh$ i $\sinh$. + +Mimo to jesteśmy zadowoleni z rezultatów dla losowych testów -- jak widać, średni błąd względny jest rzędu dokładności liczb o precyzji podwójnej w przypadku metody Taylora oraz rzędu pojedynczej precyzji dla algorytmu CORDIC (co wynika z użycia \texttt{Int32} podczas procesu iteracyjnego). +\end{document} \ No newline at end of file diff --git a/semestr-3/anm/pracownia1/prog/program.html b/semestr-3/anm/pracownia1/prog/program.html new file mode 100644 index 0000000..66e1c19 --- /dev/null +++ b/semestr-3/anm/pracownia1/prog/program.html @@ -0,0 +1,16056 @@ + + + + + +program + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/semestr-3/anm/pracownia1/prog/program.ipynb b/semestr-3/anm/pracownia1/prog/program.ipynb new file mode 100644 index 0000000..e5d7c6a --- /dev/null +++ b/semestr-3/anm/pracownia1/prog/program.ipynb @@ -0,0 +1,2042 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 89, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "set_cordic_iterations (generic function with 1 method)" + ] + }, + "execution_count": 89, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "include(\"program.jl\")" + ] + }, + { + "cell_type": "code", + "execution_count": 90, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Plots.PlotlyBackend()" + ] + }, + "execution_count": 90, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "using Plots\n", + "using Random\n", + "using Distributions\n", + "\n", + "plotly()" + ] + }, + { + "cell_type": "code", + "execution_count": 91, + "metadata": {}, + "outputs": [], + "source": [ + "# Zadanie 10, Franiszek malinka, Kacper Solecki\n", + "\n", + "# instrukcja:\n", + "# Nasz program udostępnia funkcje \n", + "\n", + "# -> taylor_sin(a, b) - sinus liczby a+bi liczony za pomocą szeregu Taylora\n", + "# -> taylor_cos(a, b) - cosinus liczby a+bi liczony za pomocą szeregu Taylora\n", + "# -> taylor_sinh(x) - sinus hiperboliczny liczby x liczony za pomocą szeregu Taylora\n", + "# -> taylor_cosh(x) - cosinus hiperboliczny liczby x liczony za pomocą szeregu Taylora\n", + "# -> cordic_sin(x) - sinus (rzeczywistej) liczby x liczony za pomocą algorytmu Cordic\n", + "# -> cordic_cos(x) - cosinus (rzeczywistej) liczby x liczony za pomocą algorytmu Cordic" + ] + }, + { + "cell_type": "code", + "execution_count": 92, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "0.9092974268256817" + ] + }, + "execution_count": 92, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# porównianie na sin(2), cos(2)\n", + "sin(2.0)" + ] + }, + { + "cell_type": "code", + "execution_count": 93, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "(0.9092974268256817, -0.0)" + ] + }, + "execution_count": 93, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "taylor_sin(2.0, 0.0)" + ] + }, + { + "cell_type": "code", + "execution_count": 94, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "0.9092974280938506" + ] + }, + "execution_count": 94, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "cordic_sin(2.0)" + ] + }, + { + "cell_type": "code", + "execution_count": 95, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "-0.4161468365471424" + ] + }, + "execution_count": 95, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "cos(2)" + ] + }, + { + "cell_type": "code", + "execution_count": 96, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "(-0.41614683654714246, -0.0)" + ] + }, + "execution_count": 96, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "taylor_cos(2.0, 0.0)" + ] + }, + { + "cell_type": "code", + "execution_count": 97, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "-0.4161468353122473" + ] + }, + "execution_count": 97, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "cordic_cos(2.0)" + ] + }, + { + "cell_type": "code", + "execution_count": 98, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "-5991.431207677988 - 9240.89014825243im" + ] + }, + "execution_count": 98, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# porównianie na sin(10 + 10i)\n", + "sin(10 + 10im)" + ] + }, + { + "cell_type": "code", + "execution_count": 99, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "(-5991.431207678, -9240.890148252452)" + ] + }, + "execution_count": 99, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "taylor_sin(10, 10)" + ] + }, + { + "cell_type": "code", + "execution_count": 73, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "rel_error (generic function with 1 method)" + ] + }, + "execution_count": 73, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# w ten sposób liczony jest błąd względny zarówno dla liczb rzeczywistych jak i zespolonych\n", + "function rel_error(x, y)\n", + " if x == 0\n", + " return 0\n", + " end\n", + " return abs((x-y)/x)\n", + "end" + ] + }, + { + "cell_type": "code", + "execution_count": 100, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "taylor_error_of_iterations (generic function with 1 method)" + ] + }, + "execution_count": 100, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "function taylor_error_of_iterations(x)\n", + " set_taylor_iterations(x)\n", + " return rel_error(sin(100+100im), taylor_sin(100, 100)[1] + taylor_sin(100, 100)[2]*im)\n", + "end" + ] + }, + { + "cell_type": "code", + "execution_count": 101, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "cordic_error_of_iterations (generic function with 1 method)" + ] + }, + "execution_count": 101, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "function cordic_error_of_iterations(x)\n", + " set_cordic_iterations(x)\n", + " return rel_error(sin(100), cordic_sin(100.0))\n", + "end" + ] + }, + { + "cell_type": "code", + "execution_count": 111, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "taylor_error_of_iterations2 (generic function with 1 method)" + ] + }, + "execution_count": 111, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "function taylor_error_of_iterations2(x)\n", + " set_taylor_iterations(x)\n", + " return rel_error(sin(100), taylor_sin(100.0, 0.0)[1])\n", + "end" + ] + }, + { + "cell_type": "code", + "execution_count": 112, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "1:20" + ] + }, + "execution_count": 112, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "X = 1:20" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Przykładowe błędy w zależności od liczby iteracji:" + ] + }, + { + "cell_type": "code", + "execution_count": 113, + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.plotly.v1+json": { + "data": [ + { + "colorbar": { + "title": "" + }, + "legendgroup": "y1", + "line": { + "color": "rgba(0, 154, 250, 1.000)", + "dash": "solid", + "shape": "linear", + "width": 1 + }, + "mode": "lines", + "name": "y1", + "showlegend": true, + "type": "scatter", + "x": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "xaxis": "x", + "y": [ + 0.9999999999947897, + 0.6604336394521374, + 0.02055234411557763, + 0.00022080130144359062, + 1.4713452359772989e-06, + 6.728428696183563e-09, + 2.238852117625799e-11, + 7.408349671662484e-14, + 2.066101872553143e-14, + 2.066101872553143e-14, + 2.066101872553143e-14, + 2.066101872553143e-14, + 2.066101872553143e-14, + 2.066101872553143e-14, + 2.066101872553143e-14, + 2.066101872553143e-14, + 2.066101872553143e-14, + 2.066101872553143e-14, + 2.066101872553143e-14, + 2.066101872553143e-14 + ], + "yaxis": "y", + "zmax": null, + "zmin": null + } + ], + "layout": { + "annotations": [ + { + "font": { + "color": "rgba(0, 0, 0, 1.000)", + "family": "sans-serif", + "size": 20 + }, + "rotation": 0, + "showarrow": false, + "text": "Taylor relative error calculating sin(100+100i)", + "x": 0.5423611111111111, + "xanchor": "center", + "xref": "paper", + "y": 1, + "yanchor": "top", + "yref": "paper" + } + ], + "height": 400, + "legend": { + "bgcolor": "rgba(255, 255, 255, 1.000)", + "bordercolor": "rgba(0, 0, 0, 1.000)", + "borderwidth": 1, + "font": { + "color": "rgba(0, 0, 0, 1.000)", + "family": "sans-serif", + "size": 11 + }, + "tracegroupgap": 0, + "traceorder": "normal", + "x": 1, + "xanchor": "auto", + "y": 1, + "yanchor": "auto" + }, + "margin": { + "b": 20, + "l": 0, + "r": 0, + "t": 20 + }, + "paper_bgcolor": "rgba(255, 255, 255, 1.000)", + "plot_bgcolor": "rgba(255, 255, 255, 1.000)", + "showlegend": true, + "width": 600, + "xaxis": { + "anchor": "y", + "domain": [ + 0.09128390201224845, + 0.9934383202099738 + ], + "gridcolor": "rgba(0, 0, 0, 0.100)", + "gridwidth": 0.5, + "linecolor": "rgba(0, 0, 0, 1.000)", + "mirror": false, + "range": [ + 0.43000000000000005, + 20.57 + ], + "showgrid": true, + "showline": true, + "showticklabels": true, + "tickangle": 0, + "tickcolor": "rgb(0, 0, 0)", + "tickfont": { + "color": "rgba(0, 0, 0, 1.000)", + "family": "sans-serif", + "size": 11 + }, + "tickmode": "array", + "ticks": "inside", + "ticktext": [ + "5", + "10", + "15", + "20" + ], + "tickvals": [ + 5, + 10, + 15, + 20 + ], + "title": "iterations", + "titlefont": { + "color": "rgba(0, 0, 0, 1.000)", + "family": "sans-serif", + "size": 15 + }, + "type": "-", + "visible": true, + "zeroline": false, + "zerolinecolor": "rgba(0, 0, 0, 1.000)" + }, + "yaxis": { + "anchor": "x", + "domain": [ + 0.07581474190726165, + 0.9415463692038496 + ], + "gridcolor": "rgba(0, 0, 0, 0.100)", + "gridwidth": 0.5, + "linecolor": "rgba(0, 0, 0, 1.000)", + "mirror": false, + "range": [ + -0.029999999999822412, + 1.0299999999946328 + ], + "showgrid": true, + "showline": true, + "showticklabels": true, + "tickangle": 0, + "tickcolor": "rgb(0, 0, 0)", + "tickfont": { + "color": "rgba(0, 0, 0, 1.000)", + "family": "sans-serif", + "size": 11 + }, + "tickmode": "array", + "ticks": "inside", + "ticktext": [ + "0.00", + "0.25", + "0.50", + "0.75", + "1.00" + ], + "tickvals": [ + 0, + 0.25, + 0.5, + 0.75, + 1 + ], + "title": "relative error", + "titlefont": { + "color": "rgba(0, 0, 0, 1.000)", + "family": "sans-serif", + "size": 15 + }, + "type": "-", + "visible": true, + "zeroline": false, + "zerolinecolor": "rgba(0, 0, 0, 1.000)" + } + } + }, + "text/html": [ + "\n", + "\n", + " \n", + " Plots.jl\n", + " \n", + " \n", + " \n", + " \n", + "
\n", + " \n", + "\n", + " \n", + "\n" + ] + }, + "execution_count": 113, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "\n", + "plot(taylor_error_of_iterations, X, title=\"Taylor relative error calculating sin(100+100i)\", xguide = \"iterations\", yguide = \"relative error\")" + ] + }, + { + "cell_type": "code", + "execution_count": 114, + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.plotly.v1+json": { + "data": [ + { + "colorbar": { + "title": "" + }, + "legendgroup": "y1", + "line": { + "color": "rgba(0, 154, 250, 1.000)", + "dash": "solid", + "shape": "linear", + "width": 1 + }, + "mode": "lines", + "name": "y1", + "showlegend": true, + "type": "scatter", + "x": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "xaxis": "x", + "y": [ + 0.04858006105965706, + 0.0006898745020126097, + 4.643725178799385e-06, + 1.8207599251359285e-08, + 4.6699841760941685e-11, + 8.485100007739351e-14, + 2.1925323017414343e-16, + 4.3850646034828687e-16, + 4.3850646034828687e-16, + 4.3850646034828687e-16, + 4.3850646034828687e-16, + 4.3850646034828687e-16, + 4.3850646034828687e-16, + 4.3850646034828687e-16, + 4.3850646034828687e-16, + 4.3850646034828687e-16, + 4.3850646034828687e-16, + 4.3850646034828687e-16, + 4.3850646034828687e-16, + 4.3850646034828687e-16 + ], + "yaxis": "y", + "zmax": null, + "zmin": null + } + ], + "layout": { + "annotations": [ + { + "font": { + "color": "rgba(0, 0, 0, 1.000)", + "family": "sans-serif", + "size": 20 + }, + "rotation": 0, + "showarrow": false, + "text": "Taylor relative error calculating sin(100)", + "x": 0.5423611111111111, + "xanchor": "center", + "xref": "paper", + "y": 1, + "yanchor": "top", + "yref": "paper" + } + ], + "height": 400, + "legend": { + "bgcolor": "rgba(255, 255, 255, 1.000)", + "bordercolor": "rgba(0, 0, 0, 1.000)", + "borderwidth": 1, + "font": { + "color": "rgba(0, 0, 0, 1.000)", + "family": "sans-serif", + "size": 11 + }, + "tracegroupgap": 0, + "traceorder": "normal", + "x": 1, + "xanchor": "auto", + "y": 1, + "yanchor": "auto" + }, + "margin": { + "b": 20, + "l": 0, + "r": 0, + "t": 20 + }, + "paper_bgcolor": "rgba(255, 255, 255, 1.000)", + "plot_bgcolor": "rgba(255, 255, 255, 1.000)", + "showlegend": true, + "width": 600, + "xaxis": { + "anchor": "y", + "domain": [ + 0.09128390201224845, + 0.9934383202099738 + ], + "gridcolor": "rgba(0, 0, 0, 0.100)", + "gridwidth": 0.5, + "linecolor": "rgba(0, 0, 0, 1.000)", + "mirror": false, + "range": [ + 0.43000000000000005, + 20.57 + ], + "showgrid": true, + "showline": true, + "showticklabels": true, + "tickangle": 0, + "tickcolor": "rgb(0, 0, 0)", + "tickfont": { + "color": "rgba(0, 0, 0, 1.000)", + "family": "sans-serif", + "size": 11 + }, + "tickmode": "array", + "ticks": "inside", + "ticktext": [ + "5", + "10", + "15", + "20" + ], + "tickvals": [ + 5, + 10, + 15, + 20 + ], + "title": "iterations", + "titlefont": { + "color": "rgba(0, 0, 0, 1.000)", + "family": "sans-serif", + "size": 15 + }, + "type": "-", + "visible": true, + "zeroline": false, + "zerolinecolor": "rgba(0, 0, 0, 1.000)" + }, + "yaxis": { + "anchor": "x", + "domain": [ + 0.07581474190726165, + 0.9415463692038496 + ], + "gridcolor": "rgba(0, 0, 0, 0.100)", + "gridwidth": 0.5, + "linecolor": "rgba(0, 0, 0, 1.000)", + "mirror": false, + "range": [ + -0.0014574018317894857, + 0.05003746289144676 + ], + "showgrid": true, + "showline": true, + "showticklabels": true, + "tickangle": 0, + "tickcolor": "rgb(0, 0, 0)", + "tickfont": { + "color": "rgba(0, 0, 0, 1.000)", + "family": "sans-serif", + "size": 11 + }, + "tickmode": "array", + "ticks": "inside", + "ticktext": [ + "0.00", + "0.01", + "0.02", + "0.03", + "0.04", + "0.05" + ], + "tickvals": [ + 0, + 0.01, + 0.02, + 0.03, + 0.04, + 0.05 + ], + "title": "relative error", + "titlefont": { + "color": "rgba(0, 0, 0, 1.000)", + "family": "sans-serif", + "size": 15 + }, + "type": "-", + "visible": true, + "zeroline": false, + "zerolinecolor": "rgba(0, 0, 0, 1.000)" + } + } + }, + "text/html": [ + "\n", + "\n", + " \n", + " Plots.jl\n", + " \n", + " \n", + " \n", + " \n", + "
\n", + " \n", + "\n", + " \n", + "\n" + ] + }, + "execution_count": 114, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "plot(taylor_error_of_iterations2, X, title=\"Taylor relative error calculating sin(100)\", xguide = \"iterations\", yguide = \"relative error\")" + ] + }, + { + "cell_type": "code", + "execution_count": 109, + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.plotly.v1+json": { + "data": [ + { + "colorbar": { + "title": "" + }, + "legendgroup": "y1", + "line": { + "color": "rgba(0, 154, 250, 1.000)", + "dash": "solid", + "shape": "linear", + "width": 1 + }, + "mode": "lines", + "name": "y1", + "showlegend": true, + "type": "scatter", + "x": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "xaxis": "x", + "y": [ + 0.19923803206067645, + 0.40038098396966176, + 0.04933327667366985, + 0.15678575968442748, + 0.04552832522388985, + 0.008453488065297705, + 0.018071367045314653, + 0.004685838026992587, + 0.0019769599175434157, + 0.001346845796143942, + 0.0003169671004323271, + 0.0005144620678263349, + 9.862885340066103e-05, + 0.00010925740652706494, + 5.322553095504949e-06, + 4.664671284967571e-05, + 2.066207987708538e-05, + 7.669763390790217e-06, + 1.1736051476426335e-06, + 2.074473973931158e-06 + ], + "yaxis": "y", + "zmax": null, + "zmin": null + } + ], + "layout": { + "annotations": [ + { + "font": { + "color": "rgba(0, 0, 0, 1.000)", + "family": "sans-serif", + "size": 20 + }, + "rotation": 0, + "showarrow": false, + "text": "Cordic relative error calculating sin(100)", + "x": 0.5349537037037038, + "xanchor": "center", + "xref": "paper", + "y": 1, + "yanchor": "top", + "yref": "paper" + } + ], + "height": 400, + "legend": { + "bgcolor": "rgba(255, 255, 255, 1.000)", + "bordercolor": "rgba(0, 0, 0, 1.000)", + "borderwidth": 1, + "font": { + "color": "rgba(0, 0, 0, 1.000)", + "family": "sans-serif", + "size": 11 + }, + "tracegroupgap": 0, + "traceorder": "normal", + "x": 1, + "xanchor": "auto", + "y": 1, + "yanchor": "auto" + }, + "margin": { + "b": 20, + "l": 0, + "r": 0, + "t": 20 + }, + "paper_bgcolor": "rgba(255, 255, 255, 1.000)", + "plot_bgcolor": "rgba(255, 255, 255, 1.000)", + "showlegend": true, + "width": 600, + "xaxis": { + "anchor": "y", + "domain": [ + 0.07646908719743364, + 0.9934383202099737 + ], + "gridcolor": "rgba(0, 0, 0, 0.100)", + "gridwidth": 0.5, + "linecolor": "rgba(0, 0, 0, 1.000)", + "mirror": false, + "range": [ + 0.43000000000000005, + 20.57 + ], + "showgrid": true, + "showline": true, + "showticklabels": true, + "tickangle": 0, + "tickcolor": "rgb(0, 0, 0)", + "tickfont": { + "color": "rgba(0, 0, 0, 1.000)", + "family": "sans-serif", + "size": 11 + }, + "tickmode": "array", + "ticks": "inside", + "ticktext": [ + "5", + "10", + "15", + "20" + ], + "tickvals": [ + 5, + 10, + 15, + 20 + ], + "title": "iterations", + "titlefont": { + "color": "rgba(0, 0, 0, 1.000)", + "family": "sans-serif", + "size": 15 + }, + "type": "-", + "visible": true, + "zeroline": false, + "zerolinecolor": "rgba(0, 0, 0, 1.000)" + }, + "yaxis": { + "anchor": "x", + "domain": [ + 0.07581474190726165, + 0.9415463692038496 + ], + "gridcolor": "rgba(0, 0, 0, 0.100)", + "gridwidth": 0.5, + "linecolor": "rgba(0, 0, 0, 1.000)", + "mirror": false, + "range": [ + -0.012010220705787781, + 0.41239237828059716 + ], + "showgrid": true, + "showline": true, + "showticklabels": true, + "tickangle": 0, + "tickcolor": "rgb(0, 0, 0)", + "tickfont": { + "color": "rgba(0, 0, 0, 1.000)", + "family": "sans-serif", + "size": 11 + }, + "tickmode": "array", + "ticks": "inside", + "ticktext": [ + "0.0", + "0.1", + "0.2", + "0.3", + "0.4" + ], + "tickvals": [ + 0, + 0.1, + 0.2, + 0.30000000000000004, + 0.4 + ], + "title": "relative error", + "titlefont": { + "color": "rgba(0, 0, 0, 1.000)", + "family": "sans-serif", + "size": 15 + }, + "type": "-", + "visible": true, + "zeroline": false, + "zerolinecolor": "rgba(0, 0, 0, 1.000)" + } + } + }, + "text/html": [ + "\n", + "\n", + " \n", + " Plots.jl\n", + " \n", + " \n", + " \n", + " \n", + "
\n", + " \n", + "\n", + " \n", + "\n" + ] + }, + "execution_count": 109, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "plot(cordic_error_of_iterations, X, title=\"Cordic relative error calculating sin(100)\", xguide = \"iterations\", yguide = \"relative error\")" + ] + }, + { + "cell_type": "code", + "execution_count": 106, + "metadata": {}, + "outputs": [], + "source": [ + "# Poniżej znajdują się funkcje testujące, na podstawie których powstała tabelka z błędami w sprawozdaniu" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "MersenneTwister(UInt32[0x00003039], Random.DSFMT.DSFMT_state(Int32[-870096391, 1072918504, -1812426662, 1073255081, -733866021, 1073404543, 807620846, 1073368448, 1919433844, 1072852359 … -362113007, 1073100625, -166402106, 1073460158, -1907020342, 721295190, -750225566, -1300227565, 382, 0]), [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 … 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], UInt128[0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000 … 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000], 1002, 0)" + ] + }, + "execution_count": 18, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "TESTS = 100000000\n", + "\n", + "Random.seed!(12345)" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "taylor_test_error_real (generic function with 3 methods)" + ] + }, + "execution_count": 19, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "function taylor_test_error_real(l::Float64=floatmin(), r::Float64=floatmax())\n", + " res = BigFloat(0)\n", + " abs_res = BigFloat(0)\n", + " maksi_rel = BigFloat(0)\n", + " maksi_abs = BigFloat(0)\n", + " for i = 1:TESTS\n", + " if i % 100000 == 0\n", + " println(i)\n", + " end\n", + " x = rand(Uniform(l, r))\n", + " lib_sin = sin(x)\n", + " if lib_sin == 0\n", + " continue\n", + " end\n", + " my_sin = taylor_sin(x, 0)\n", + " error = rel_error(lib_sin, my_sin[1])\n", + " abs_error = abs(my_sin[1] - lib_sin)\n", + " res += error\n", + " abs_res += abs_error\n", + " maksi_rel = max(maksi_rel, error)\n", + " maksi_abs = max(maksi_abs, abs_error)\n", + " end\n", + " return (res/TESTS, maksi_rel, abs_res/TESTS, maksi_abs)\n", + "end\n", + "\n", + "# (floatmin(), floatmax()):\n", + "# (1.887844299668514797145972383393008309519973773948872165524132116232181033410611e-15, \n", + "# 3.16719187748669057932019506480803006098767582443542778491973876953125e-08,\n", + "# 1.1794041986528804301572959036155385792454808324691839516162872314453125e-16,\n", + "# 8.8817841970012523233890533447265625e-16)\n", + "\n", + "# (-pi/2, pi/2):\n", + "# (1.471587646915289673578957365178574707202863924359834292944840261618821841693717e-15, \n", + "# 1.1848604479598457485905096801294400510329296594136394560337066650390625e-08, \n", + "# 9.765754183892570637182101557852154094518937199609354138374328613281249999999994e-17, \n", + "# 5.5511151231257827021181583404541015625e-16)\n", + "\n", + "# (0, 1):\n", + "# (8.693695902799099432701533207691913249153884601349429181102457242502623557811573e-17,\n", + "# 6.661260307992334044328275268948192015174572739102942797728701407322660088539124e-16,\n", + "# 4.293257315426284893844499634951716871000826358795166015624999999999999999999994e-17,\n", + "# 4.44089209850062616169452667236328125e-16)" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "taylor_test_error_complex (generic function with 3 methods)" + ] + }, + "execution_count": 20, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "function taylor_test_error_complex(l::Float64=-100.0, r::Float64=100.0)\n", + " res = BigFloat(0)\n", + " abs_res = BigFloat(0)\n", + " maksi_rel = BigFloat(0)\n", + " maksi_abs = BigFloat(0)\n", + " for i = 1:TESTS\n", + " if i % 100000 == 0\n", + " println(i)\n", + " end\n", + " x = rand(Uniform(l, r))\n", + " y = rand(Uniform(max(l, -Float64(√(BigFloat(r)*r - BigFloat(x)*x))), \n", + " Float64(√(BigFloat(r)*r - BigFloat(x)*x))))\n", + " lib_sin = sin(x + y*im)\n", + " my_sin = taylor_sin(x, y)\n", + " error = rel_error(lib_sin, my_sin[1] + my_sin[2]*im)\n", + " abs_error = abs(lib_sin - (my_sin[1] + my_sin[2]*im))\n", + " res += error\n", + " abs_res += abs_error\n", + " maksi_rel = max(maksi_rel, error)\n", + " maksi_abs = max(maksi_abs, abs_error)\n", + " end\n", + " return (res/TESTS, maksi_rel, abs_res/TESTS, maksi_abs)\n", + "end\n", + "\n", + "# (-100, 100):\n", + "# (4.932205036590292360305897845543684560590114030155004375572792447173773555907229e-15, \n", + "# 1.3111008357751143737471652583705182364137709072338111582212150096893310546875e-13, \n", + "# 1.688623533003329462861070079404255492323042928202526655997186385923664654746476e+26, \n", + "# 5.89784569029861503624382775296e+29)\n", + "\n", + "# (-2pi, 2pi):\n", + "# (4.338436856498561167962902801400526155223569336855327458414068651872587652334067e-16, \n", + "# 1.48720543982594402760972427363260419015678071019692652043886482715606689453125e-11, \n", + "# 1.364745868545483273874507699553481910023596725366415789061836204439613629002538e-14, \n", + "# 8.7095846425677781478128738959826782468909289747216462274082005023956298828125e-13)\n", + "\n", + "# (0, 1):\n", + "# (1.596935223079780368874812440778376297707878344605454825588075017177200118204992e-16, \n", + "# 1.098997011961567777204023105931451003520679665648174250236479565501213073730469e-15, \n", + "# 1.124298405324025732059699593805301650508046127888472394113736655893442950571177e-16, \n", + "# 1.110569915127177230816030746289393434073728902933275719533412484452128410339355e-15)" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "cordic_test_error (generic function with 3 methods)" + ] + }, + "execution_count": 21, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "function cordic_test_error(l::Float64=floatmin(), r::Float64=floatmax())\n", + " res = BigFloat(0)\n", + " abs_res = BigFloat(0)\n", + " maksi_rel = BigFloat(0)\n", + " maksi_abs = BigFloat(0)\n", + " for i = 1:TESTS\n", + " if i % 100000 == 0\n", + " println(i)\n", + " end\n", + " x = rand(Uniform(l, r))\n", + " lib_sin = sin(x)\n", + " my_sin = cordic_sin(x)\n", + " error = rel_error(lib_sin, my_sin)\n", + " abs_error = abs(lib_sin - my_sin)\n", + " res += error\n", + " abs_res += abs_error\n", + " if error > maksi_rel\n", + " worst_rel = x\n", + " end\n", + " maksi_rel = max(maksi_rel, error)\n", + " maksi_abs = max(maksi_abs, abs_error)\n", + " end\n", + " return (res/TESTS, maksi_rel, abs_res/TESTS, maksi_abs)\n", + "end\n", + "\n", + "# (floatmin(), floatmax()):\n", + "# (3.099880824631376815575307358441341907045753361742215192539218280437518515668677e-08, \n", + "# 0.457561153670805575988111968399607576429843902587890625, \n", + "# 2.459716652636021482355597144179802356154379561203882076370064169168472290039072e-09, \n", + "# 0.0006041780891818948617810747236944735050201416015625)\n", + "\n", + "# (-2pi, 2pi):\n", + "# (2.769658715752475495709394998775060901506630522496771093654899307916206208091117e-08, \n", + "# 0.11834204003306579566778822254491387866437435150146484375, \n", + "# 2.532059440779907667675144447194875727078638982803227008844260126352310180664052e-09,\n", + "# 0.00552917548107156875403234153054654598236083984375)\n", + "\n", + "# (0, 1):\n", + "# (4.176404604808155838824592152607760760141260709650975486490997166423577713345588e-08, \n", + "# 0.091828765031669201679420666550868190824985504150390625, \n", + "# 2.613683444981852927700279986835644064485650872597943816799670457839965820312493e-09, \n", + "# 0.00052619288922584050993691562325693666934967041015625)" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "taylor_without_reduction_test_error (generic function with 3 methods)" + ] + }, + "execution_count": 22, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "function taylor_without_reduction_test_error(l::Float64=-100.0, r::Float64=100.0)\n", + " res = BigFloat(0)\n", + " abs_res = BigFloat(0)\n", + " maksi_rel = BigFloat(0)\n", + " maksi_abs = BigFloat(0)\n", + " for i = 1:TESTS\n", + " if i % 1000000 == 0\n", + " println(i)\n", + " end\n", + " x = rand(Uniform(l, r))\n", + " y = rand(Uniform(max(l, -Float64(√(BigFloat(r)*r - BigFloat(x)*x))), \n", + " Float64(√(BigFloat(r)*r - BigFloat(x)*x))))\n", + " lib_sin = sin(x + y*im)\n", + " my_sin = taylor_sin_no_reduction(x, y)\n", + " error = rel_error(lib_sin, my_sin[1] + my_sin[2]*im)\n", + " abs_error = abs(lib_sin - (my_sin[1] + my_sin[2]*im))\n", + " res += error\n", + " abs_res += abs_error\n", + " maksi_rel = max(maksi_rel, error)\n", + " maksi_abs = max(maksi_abs, abs_error)\n", + " end\n", + " return (res/TESTS, maksi_rel, abs_res/TESTS, maksi_abs)\n", + "end\n", + "\n", + "# (-100, 100)\n", + "# (4.774091809397734982069398193189465079787514988283523440828527859306283137571149e+23, \n", + "# 4.48814142545670189837451264e+26, \n", + "# 7.758560481134976967771949796127369173267383351574525337904198599731007318070319e+40, \n", + "# 2.20832987186165589366506156220211970162294784e+44)\n", + "\n", + "# (-2pi, 2pi)\n", + "# (0.6332711088634405192103194531076134843075526902544601426097735760298574150340518, \n", + "# 1.0, \n", + "# 23.44057586605533515691829807979128873527513778367553433852055381911453864572971, \n", + "# 267.74654227273646256435313262045383453369140625)\n", + "\n", + "# (0, 1)\n", + "# (1.589482169544726703219739509256918022523030217883325972454504856003547167066932e-16, \n", + "# 1.291897416767691567199962520855285151964115327068161054313577551511116325855255e-15, \n", + "# 1.118367257755837281340217148887719929595000777959128862241583039814976641146415e-16, \n", + "# 1.115760330918745818020084658567032229219617364690542160587938269600272178649902e-15)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Julia 1.4.1", + "language": "julia", + "name": "julia-1.4" + }, + "language_info": { + "file_extension": ".jl", + "mimetype": "application/julia", + "name": "julia", + "version": "1.4.1" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/semestr-3/anm/pracownia1/prog/program.jl b/semestr-3/anm/pracownia1/prog/program.jl new file mode 100644 index 0000000..8e2d8b4 --- /dev/null +++ b/semestr-3/anm/pracownia1/prog/program.jl @@ -0,0 +1,247 @@ +using Printf + +global C_ITERATIONS = 30 +global CORDIC_MUL_POW = 30 +global CORDIC_MUL = 2.0^CORDIC_MUL_POW +global CORDIC_ATANS = [843314857, 497837829, 263043837, 133525159, 67021687, 33543516, 16775851, + 8388437, 4194283, 2097149, 1048576, 524288, 262144, 131072, 65536, 32768, 16384, 8192, 4096, + 2048, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2] +global CORDIC_F = 1768195363 +global CORDIC_F_INV = 652032874 + +global T_ITERATIONS = 15 +global HYPERBOLIC_MAX = 1 + +# liczenie szeregu Taylora +function series(x, parity, change_sign, iterations) + res = zero(x) + elem = one(x) + if parity == 1 + elem = x + end + i = parity + 1 + while i <= 2*iterations + parity + res += elem + elem *= change_sign*x*x/(i*(i+1)) + i += 2 + end + return res +end + +# generyczna funkcja stosująca wzory redukcyjne, licząca sinusa +function gen_sin(x, iterations, sin_fun, cos_fun) + if x < 0 + return -gen_sin(-x, iterations, sin_fun, cos_fun) + end + x = mod2pi(x) + if x > pi + return -gen_sin(x-pi, iterations, sin_fun, cos_fun) + end + if x > pi/2 + return gen_cos(x-pi/2, iterations, sin_fun, cos_fun) + end + if x > pi/4 + return gen_cos(pi/2-x, iterations, sin_fun, cos_fun) + end + return sin_fun(x, iterations) +end + +# generyczna funkcja stosująca wzory redukcyjne, licząca cosinusa +function gen_cos(x, iterations, sin_fun, cos_fun) + if x < 0 + return gen_cos(-x, iterations, sin_fun, cos_fun) + end + x = mod2pi(x) + if x > pi + return -gen_cos(x-pi, iterations, sin_fun, cos_fun) + end + if x > pi/2 + return -gen_sin(x-pi/2, iterations, sin_fun, cos_fun) + end + if x > pi/4 + return gen_sin(pi/2-x, iterations, sin_fun, cos_fun) + end + return cos_fun(x, iterations) +end + +# sin dla liczb rzeczywistych [taylor] +function real_sin(r, iterations) + return series(r, 1, -1, iterations) +end + +# cos dla liczb rzeczywistych [taylor] +function real_cos(r, iterations) + return series(r, 0, -1, iterations) +end + +# sinh [taylor] +function real_sinh(r, iterations) + if r > 1000 + return Inf + end + if r < -1000 + return -Inf + end + if r == 0 + return Float64(0) + end + if abs(r) > HYPERBOLIC_MAX + return 2*real_sinh(r/2, iterations)*real_cosh(r/2, iterations) + end + return series(r, 1, 1, iterations) +end + +# cosh [taylor] +function real_cosh(r, iterations) + if abs(r) > 1000 + return Inf + end + if r == 1 + return Float64(1) + end + if abs(r) > HYPERBOLIC_MAX + s = real_sinh(r/2, iterations) + c = real_cosh(r/2, iterations) + return s*s+c*c + end + return series(r, 0, 1, iterations) +end + +# sin dla liczb zespolonych [taylor] +function complex_sin(a, b, iterations) + return (gen_sin(a, iterations, real_sin, real_cos)*real_cosh(b, iterations), + gen_cos(a, iterations, real_sin, real_cos)*real_sinh(b, iterations)) +end + +# cos dla liczb zespolonych [taylor] +function complex_cos(a, b, iterations) + return (real_cos(a, iterations)*real_cosh(b, iterations), + -real_sin(a, iterations)*real_sinh(b, iterations)) +end + +# funkcja dla użytkownika [taylor] +function taylor_sin(a, b) + return complex_sin(a, b, T_ITERATIONS) +end + +# funkcja dla użytkownika [taylor] +function taylor_cos(a, b) + return complex_cos(a, b, T_ITERATIONS) +end + +# funkcja dla użytkownika [taylor] +function taylor_sinh(r) + return real_sinh(r, T_ITERATIONS) +end + +# funkcja dla użytkownika [taylor] +function taylor_cosh(r) + return real_cosh(r, T_ITERATIONS) +end + +# preprocesing [cordic] +function preprocess_atan(iterations) + global CORDIC_MUL + atan2pow = Array{Float64}(undef, iterations) + @printf("CORDIC_ATANS = [") + for i in 1:iterations + atan2pow[i] = round(atan(1.0 / Float64(BigInt(2)^(i - 1))) * CORDIC_MUL) + @printf("%d", atan2pow[i]) + if i < iterations + @printf(", ") + end + end + @printf("]\n") +end + + +# preprocesing [cordic] +function preprocess_scaling_factor(iterations) + CORDIC_F = 1.0 + for i in 0:iterations + CORDIC_F *= sqrt(1. + 1. / Float64(BigInt(2)^(2 * i))) + end + @printf("CORDIC_F = %d\nCORDIC_F_INV = %d\n", round(CORDIC_F * CORDIC_MUL), round(CORDIC_MUL / CORDIC_F)) +end + + +# funkcja licząca zarówno sin oraz cos [cordic] +function approx_trig(x, iterations) + global CORDIC_ATANS + global CORDIC_F_INV + X = CORDIC_F_INV + Y = 0 + Z = round(x * CORDIC_MUL) + s = 1 + for i in 0:(iterations - 1) + tempX = X + if Z == 0 + break + end + if Z >= 0 + X -= s * (Y >> i) + Y += s * (tempX >> i) + Z -= s * CORDIC_ATANS[i + 1] + else + X += s * (Y >> i) + Y -= s * (tempX >> i) + Z += s * CORDIC_ATANS[i + 1] + end + end + + return (Float64(X) / CORDIC_MUL, Float64(Y) / CORDIC_MUL) +end + +# wyciąganie sin z approx_trig [cordic] +function approx_sin(x, iterations) + return approx_trig(x, iterations)[2] +end + + +# wyciąganie cos z approx_trig [cordic] +function approx_cos(x, iterations) + return approx_trig(x, iterations)[1] +end + +# funkcja dla użytkownika [cordic] +function cordic_sin(x) + return gen_sin(x, C_ITERATIONS, approx_sin, approx_cos) +end + +# funkcja dla użytkownika [cordic] +function cordic_cos(x) + return gen_cos(x, C_ITERATIONS, approx_sin, approx_cos) +end + +# uruchamianie preprocesingu [cordic] +function preprocess_cordic() + println("Preprocessing CORDIC constants.") + preprocess_atan(CORDIC_MUL_POW) + preprocess_scaling_factor(CORDIC_MUL_POW) +end + +# sinh bez stosowania wzorów redukcyjnych [taylor] +function sinh_no_reduction(x, iterations) + return series(x, 1, 1, iterations) +end + +# cosh bez stosowania wzorów redukcyjnych [taylor] +function cosh_no_reduction(x, iterations) + return series(x, 0, 1, iterations) +end + +# sin bez stosowania wzorów redukcyjnych [taylor] +function taylor_sin_no_reduction(x, y) + return (real_sin(x, 10*round(x)+10) * cosh_no_reduction(y, 10*round(y)+10), + real_cos(x, 10*round(x)+10) * sinh_no_reduction(y, 10*round(x)+10)) +end + +# zmiana liczby iteracji [taylor] +function set_taylor_iterations(x) + global T_ITERATIONS = x +end + +# zmiana liczby iteracji [cordic] +function set_cordic_iterations(x) + global C_ITERATIONS = x +end \ No newline at end of file diff --git a/semestr-3/anm/pracownia2/brut.jl b/semestr-3/anm/pracownia2/brut.jl new file mode 100644 index 0000000..d8eb0a1 --- /dev/null +++ b/semestr-3/anm/pracownia2/brut.jl @@ -0,0 +1,177 @@ +using LinearAlgebra +using Polynomials +using Printf +using OffsetArrays +using FFTW + +function emptyArray(type, size) + return OffsetVector{type}(undef, 0:(size - 1)) +end + +function naive_cc(f, N) + a = emptyArray(Float64, Int(N) + 1) + for j in 0.0:1.0:N + for k in 0.0:1.0:N + u = cos(k * pi / N) + uj = cos(j * k * pi / N) + val = f(u) * uj + if k == 0 || k == N + val /= 2.0 + end + a[Int(j)] += val + end + end + return a * (2.0 / N) +end + +function naive_approx(f, N) + b = emptyArray(Float64, N) + a = naive_cc(f, N) + a[0] /= 2.0 + a[N] /= 2.0 + + print(a) + result = 0.0 + + for k in 0:2:N + result += a[k] / Float64(1 - k * k) + end + return result * 2.0 +end + +function naive_approx2(f, N) + b = emptyArray(Float64, N) + N = Float64(N) + a = naive_cc(f, N) + result = 0.0 + + for k in 1:1:Int(floor(N / 2.0)) + b[2 * k - 1] = a[2 * k - 2] - a[2 * k] + b[2 * k - 1] /= (Float64(k) * 4.0 - 2.0) + result += b[2 * k - 1] + end + return result * 2.0 +end + +function smart_cc(f, N) + x = [cos(pi * i / N) for i in 0:N] + fx = f.(x) / (2 * N) + g = real(fft(vcat(fx, fx[N:-1:2]))) + a = [g[1] * 2; g[2:N] + g[(2 * N):-1:(N + 2)]; g[N + 1] * 2] + return a +end + +function clenshaw_curtis_coeffs(f, N) + x = [cos(pi * i / N) for i in 0:N] + fx = f.(x) / (2 * N) + g = real(fft(vcat(fx, fx[N:-1:2]))) + return [g[1]; g[2:N] + g[(2 * N):-1:(N + 2)]; g[N + 1]] +end + +function clenshaw_curtis(f, N) + a = clenshaw_curtis_coeffs(f, N) + w = zeros(length(a)) + w[1:2:end] = 2 ./ (1 .- (0:2:N).^2 ) + # w oraz a są malejące, więc lepiej dodawać ich iloczyny od końca + LinearAlgebra.dot(reverse(w), reverse(a)) +end + +global MAX_ITER = 2^18 + +function clenshaw_curtis_with_eps(f, eps) + N = 4 + while N <= MAX_ITER + res1 = clenshaw_curtis(f, N) + res2 = clenshaw_curtis(f, N - 1) + if abs(res1 - res2) < eps * res1 || N >= MAX_ITER + return res1 + end + N *= 2 + end +end + + +# zera n-tego wielomianu Czebyszewa +function chebyshev_nodes(n) + return [cos((2.0 * k - 1.0) * pi / (2.0 * n)) for k in 1:n] +end + +# kwadratura Czebyszewa-Gaussa +# współczynniki stałe równe π/N +# węzły to zera n-tego wielomianu Czebyszewa +function gauss_chebyshev(f, N) + x = chebyshev_nodes(N) + res = 0.0 + for i in 1:N + res += f(x[i]) * sqrt(1.0 - x[i] * x[i]) + end + return res * pi / N +end + +# kwadratura Gaussa-Legendre'a: +# współczynniki w_i = 2(q_1,i)^2, gdzie q_1,i to pierwsza współrzędna +# i-tego wektora własnego macierzy trójprzekątniowej +# węzły x_i to zera N-tego wielomianu Legendre'a +function gauss_legendre(f, N) + # wyliczanie wartości i wektorów własnych macierzy trójprzekątniowej + # (Golub-Welsch algorithm) + # wartości własne to zera wielomianu Legendre'a + X, Q = eigen(SymTridiagonal(zeros(N), [n / sqrt(4.0n^2 - 1.0) for n = 1:N - 1])) + + res = 0.0 + for i in 1:N + w = 2.0 * (Q[1, i])^2 + res += f(X[i]) * w + end + + return res +end + +# uruchamianie kwadratury dla funkcji f, N węzłów, +# na przedziale (a, b) +function quadrature(f, quadrature_fun, N=ITER, a=-1.0, b=1.0) + return (b - a) / 2 * quadrature_fun(x -> f(x * (b - a) / 2 + (a + b) / 2), N) +end + +# Testowanie------------------------------------------------------------- + +funs = [exp, x -> 1.0 / ((x - 1.01) * (x - 1.01)), x -> 10x^4 + 4x^3 + 2x - 1, x -> cos(1000.0x), + x -> (3x^2 + 4) / (x - 1.1), abs, x -> 1.0, x -> cos(100.0x) * cos(100.0x), x -> 1 / (x^4 + x^2 + 0.9), + x -> 1.0 / (1.0 + x^4), x -> 2.0 / (2.0 + sin(10pi * x))] + +# f - całka nieoznaczona +# obliczanie całki oznaczonej na przedziale (a, b) +function definete(f) + return (a, b) -> f(b) - f(a) +end + + +# ręcznie policzone całki oznaczone (lub obliczone wyniki) +# dla testowanych funkcji +results = [definete(exp), definete(x -> 1.0 / (1.01 - x)), definete(x -> 2x^5 + x^4 + x^2 - x), definete(x -> sin(1000.0x) / 1000.0), + definete(x -> 1.5x^2 + 3.3x + 7.63log(abs(x - 1.1))), definete(x -> (x >= 0) ? ((x^2) / 2.0) : (-(x^2) / 2.0)), definete(x -> x), + definete(x -> (200.0x + sin(200.0x)) / 400.0), definete(x -> -0.278185log(x^2 - 0.947294x + 0.948683) + + 0.278185log(x^2 + 0.947294x + 0.948683) + 0.309633atan(0.587487 * (2x - 0.947294)) + 0.309633atan(0.587487 * (2.0x + 0.947294))), + definete(x -> 1.0 / (4.0 * sqrt(2)) * (-log(abs(x^2 - sqrt(2)x + 1)) + log(abs(x^2 + sqrt(2)x + 1)) - 2.0atan(1 - sqrt(2)x) + + 2.0atan(1 + sqrt(2)x))), (a, b) -> 4.0 / sqrt(3)] + + +function rel_error(a, b) + return abs((a - b) / a) +end + +function test(quadrature_fun, fun_nr, a=-1.0, b=1.0, N=ITER) + my_res = quadrature(funs[fun_nr], quadrature_fun, N, a, b) + rel_e = rel_error(results[fun_nr](a, b), my_res) + abs_e = abs(results[fun_nr](a, b) - my_res) + + return (rel_e, abs_e) +end + +function print_coefficients_of_cc(f, N, ile_pierwszych) + a = clenshaw_curtis_coeffs(f, N) + for i in 1:ile_pierwszych + # println(string(i - 1, " & ", a[i], " \\\\")) + @printf("%d & %.20f \\\\\n", i - 1, a[i]) + end +end \ No newline at end of file diff --git a/semestr-3/anm/pracowniaPOP/diff/program.diff b/semestr-3/anm/pracowniaPOP/diff/program.diff new file mode 100644 index 0000000..269ac85 --- /dev/null +++ b/semestr-3/anm/pracowniaPOP/diff/program.diff @@ -0,0 +1,148 @@ +2a3 +> # stałe dla CORDIC'A +11a13 +> # stałe dla obliczania szeregiem Taylora +31c33,34 +< # generyczna funkcja stosująca wzory redukcyjne, licząca sinusa +--- +> # generyczna funkcja stosująca wzory redukcyjne, licząca sin(x) +> # za pomocą podanych funkcji sin_fun, cos_fun +32a36 +> # sin(-x) = sin(x) +36a41 +> # sin(π + x) = -sin(x) +39a45 +> # sin(π/2 + x) = cos(x) +42a49 +> # sin(π/2 - x) = cos(x) +49c56,57 +< # generyczna funkcja stosująca wzory redukcyjne, licząca cosinusa +--- +> # generyczna funkcja stosująca wzory redukcyjne, licząca cos(x) +> # za pomocą podanych funkcji sin_fun, cos_fun +50a59 +> # cos(-x) = cos(x) +54a64 +> # cos(π + x) = -cos(x) +57a68 +> # cos(π/2 + x) = -sin(x) +60a72 +> # cos(π/2 - x) = sin(x) +67c79 +< # sin dla liczb rzeczywistych [taylor] +--- +> # sin dla liczb rzeczywistych [Taylor] +72c84 +< # cos dla liczb rzeczywistych [taylor] +--- +> # cos dla liczb rzeczywistych [Taylor] +77c89 +< # sinh [taylor] +--- +> # sinh [Taylor] +78a91 +> # sinh(1000) jest za duży by reprezentować go we Float64 +87a101,102 +> # dla dużych liczb korzystamy ze wzoru: +> # sinh(2r) = 2 * cosh(r) * sinh(r) +94c109 +< # cosh [taylor] +--- +> # cosh [Taylor] +95a111 +> # cosh(1000) jest za duży by reprezentować go we Float64 +101a118,119 +> # dla dużych liczb korzystamy ze wzoru: +> # cosh(2r) = cosh(r)^2 + sinh(r)^2 +110c128 +< # sin dla liczb zespolonych [taylor] +--- +> # sin dla liczb zespolonych [Taylor] +111a130 +> # sin(a + bi) = sin(a) * cosh(b) + i(cos(a) * sinh(b)) +116c135 +< # cos dla liczb zespolonych [taylor] +--- +> # cos dla liczb zespolonych [Taylor] +117a137 +> # cos(a + bi) = cos(a) * cosh(b) - i(sin(a) * sinh(b)) +122c142 +< # funkcja dla użytkownika [taylor] +--- +> # funkcja sin dla użytkownika [Taylor] +127c147 +< # funkcja dla użytkownika [taylor] +--- +> # funkcja cos dla użytkownika [Taylor] +132c152 +< # funkcja dla użytkownika [taylor] +--- +> # funkcja sinh dla użytkownika [Taylor] +137c157 +< # funkcja dla użytkownika [taylor] +--- +> # funkcja cosh dla użytkownika [Taylor] +142c162 +< # preprocesing [cordic] +--- +> # preprocesing [CORDIC] +158c178 +< # preprocesing [cordic] +--- +> # preprocesing [CORDIC] +168c188 +< # funkcja licząca zarówno sin oraz cos [cordic] +--- +> # funkcja licząca zarówno cosx oraz sinx algorytmem CORDIC +175a196 +> # Proces iteracyjny algorytmu CORDIC +195c216 +< # wyciąganie sin z approx_trig [cordic] +--- +> # wyciąganie sin z approx_trig [CORDIC] +201c222 +< # wyciąganie cos z approx_trig [cordic] +--- +> # wyciąganie cos z approx_trig [CORDIC] +206c227 +< # funkcja dla użytkownika [cordic] +--- +> # funkcja sin dla użytkownika [CORDIC] +211c232 +< # funkcja dla użytkownika [cordic] +--- +> # funkcja cos dla użytkownika [CORDIC] +216c237,239 +< # uruchamianie preprocesingu [cordic] +--- +> # uruchamianie preprocesingu [CORDIC] +> # funkcja wypisuje kod w języku Julia na ekran, który potem po prostu wkleiliśmy do pliku źródłowego +> # oblicza stałe potrzebne do obliczania funkcji trygonometrycznych metodą CORDIC +223c246 +< # sinh bez stosowania wzorów redukcyjnych [taylor] +--- +> # sinh bez stosowania wzorów redukcyjnych [Taylor] +228c251 +< # cosh bez stosowania wzorów redukcyjnych [taylor] +--- +> # cosh bez stosowania wzorów redukcyjnych [Taylor] +233c256 +< # sin bez stosowania wzorów redukcyjnych [taylor] +--- +> # sin bez stosowania wzorów redukcyjnych [Taylor] +234a258,260 +> # sin(a + bi) = sin(a) * cosh(b) + i(cos(a) * sinh(b)) +> # wykonujemy odpowiednio (10a + 10), (10b + 10) iteracji - szereg Tylora +> # powinien dobrze przybliżać funkcje trygonometryczne dla takiej liczby wyrazów +236c262 +< real_cos(x, 10*round(x)+10) * sinh_no_reduction(y, 10*round(x)+10)) +--- +> real_cos(x, 10*round(x)+10) * sinh_no_reduction(y, 10*round(y)+10)) +239c265 +< # zmiana liczby iteracji [taylor] +--- +> # zmiana liczby iteracji [Taylor] +244c270 +< # zmiana liczby iteracji [cordic] +--- +> # zmiana liczby iteracji [CORDIC] diff --git a/semestr-3/anm/pracowniaPOP/diff/sprawozdanie.diff b/semestr-3/anm/pracowniaPOP/diff/sprawozdanie.diff new file mode 100644 index 0000000..7f898c2 --- /dev/null +++ b/semestr-3/anm/pracowniaPOP/diff/sprawozdanie.diff @@ -0,0 +1,213 @@ +1c1,3 +< \documentclass[12pt]{extarticle} +--- +> \documentclass{mwart} +> \usepackage{polski} +> +4,5d5 +< \usepackage[utf8]{inputenc} +< \usepackage[T1]{fontenc} +9,10c9 +< \usepackage[utf8]{inputenc} +< \usepackage[polish]{babel} +--- +> +12,13c11,12 +< \let\babellll\lll +< \let\lll\relax +--- +> % \let\babellll\lll +> % \let\lll\relax +78d76 +< \newcommand{\set}[2]{\left\{{#1} \mid {#2} \right\} } +81d78 +< \newcommand{\join}{\mathbin{\vee}} +159,160c156,157 +< x_r = x_0\cos\theta - y_0\sin\theta \\ +< y_r = x_0\sin\theta + y_0\cos\theta +--- +> x_r = x_0\cos\theta - y_0\sin\theta, \\ +> y_r = x_0\sin\theta + y_0\cos\theta. +165,166c162,163 +< x_r = \cos\theta \\ +< y_r = \sin\theta +--- +> x_r = \cos\theta, \\ +> y_r = \sin\theta. +189c186 +< \end{bmatrix} +--- +> \end{bmatrix}. +196c193 +< \theta = \sum_{i=0}^n \sigma_i\theta_i, \; \sigma_i \in \{-1, 1\} +--- +> \theta = \sum_{i=0}^n \sigma_i\theta_i, \; \sigma_i \in \{-1, 1\}. +199c196,198 +< $45^{\circ}, 26.565^{\circ}, -14.03^{\circ}$ (dobór tych kątów jest nieprzypadkowy, o czym się zaraz przekonamy). Jeśli $\theta$ nie należy do zadanego przez nas przedziału, to możemy ten kąt zmienić korzystając ze wzorów redukcyjnych (o tym więcej w \textsection3). +--- +> $45^{\circ}, 26.565^{\circ}, -14.03^{\circ}$ (dobór tych kątów jest nieprzypadkowy, o czym się zaraz przekonamy). +> Jeśli $\theta$ nie należy do zadanego przez nas przedziału, to możemy ten kąt zmienić korzystając ze wzorów redukcyjnych +> (o tym więcej w \textsection 3). +228c227 +< \end{bmatrix} +--- +> \end{bmatrix}. +242c241 +< \end{bmatrix} +--- +> \end{bmatrix}. +256c255 +< \end{bmatrix} +--- +> \end{bmatrix}. +278c277 +< \end{bmatrix} +--- +> \end{bmatrix}. +283c282 +< P = \cos 45^{\circ}\cdot\cos 26.565^{\circ}\cdot\cos 14.03^{\circ}\cdot\ldots \approx 0.6072 +--- +> P = \cos 45^{\circ}\cdot\cos 26.565^{\circ}\cdot\cos 14.03^{\circ}\cdot\ldots \approx 0.6072. +287,288c286,287 +< x_{i + 1} & = x_{i} - \sigma_i 2^{-i}y_i \\ +< y_{i + 1} & = y_i + \sigma_i 2^{-i}y_i +--- +> x_{i + 1} & = x_{i} - \sigma_i 2^{-i}y_i, \\ +> y_{i + 1} & = y_i + \sigma_i 2^{-i}y_i. +293c292 +< \theta_{error} = \z_n = \theta - \sum_{i=0}^n\sigma_i \theta_i +--- +> \theta_{error} = z_n = \theta - \sum_{i=0}^n\sigma_i \theta_i. +298,300c297,299 +< x_{i + 1} & = x_{i} - \sigma_i 2^{-i}y_i \\ +< y_{i + 1} & = y_i + \sigma_i 2^{-i}y_i \\ +< z_{i + 1} & = z_i - \sigma_i \arctan 2^{-1} +--- +> x_{i + 1} & = x_{i} - \sigma_i 2^{-i}y_i, \\ +> y_{i + 1} & = y_i + \sigma_i 2^{-i}y_i, \\ +> z_{i + 1} & = z_i - \sigma_i \arctan 2^{-1}. +307c306 +< \frac{1}{\cos(\arctan 2^{-i})} = \sqrt{1 + \frac{1}{2^{2i}}} +--- +> \frac{1}{\cos(\arctan 2^{-i})} = \sqrt{1 + \frac{1}{2^{2i}}}. +313c312 +< \abs{\theta} \leq \sum_{i=0}^n\theta_i \approx 99.88^{\circ} +--- +> \abs{\theta} \leq \sum_{i=0}^n\theta_i \approx 99.88^{\circ}. +340c339 +< \sin z = \sin (x + yi) = \sin x\cosh (y) + i\cos x\sinh(y) +--- +> \sin z = \sin (x + yi) = \sin x\cosh (y) + i\cos x\sinh(y). +347,350c346,349 +< \sin x & = x - \frac{x^3}{3!} + \frac{x^5}{5!} - \frac{x^7}{7!} + \ldots \\ +< \sinh x & = x + \frac{x^3}{3!} + \frac{x^5}{5!} + \frac{x^7}{7!} + \ldots \\ +< \cos x & = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \frac{x^6}{6!} + \ldots \\ +< \cosh x & = 1 + \frac{x^2}{2!} + \frac{x^4}{4!} + \frac{x^6}{6!} + \ldots \\ +--- +> \sin x & = x - \frac{x^3}{3!} + \frac{x^5}{5!} - \frac{x^7}{7!} + \ldots, \\ +> \sinh x & = x + \frac{x^3}{3!} + \frac{x^5}{5!} + \frac{x^7}{7!} + \ldots, \\ +> \cos x & = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \frac{x^6}{6!} + \ldots, \\ +> \cosh x & = 1 + \frac{x^2}{2!} + \frac{x^4}{4!} + \frac{x^6}{6!} + \ldots. \\ +378,381c377,380 +< \sin x & = \texttt{TaylorSeries}(x, 1, -1, M) \\ +< \sinh x & = \texttt{TaylorSeries}(x, 1, 1, M) \\ +< \cos x & = \texttt{TaylorSeries}(x, 0, -1, M) \\ +< \cosh x & = \texttt{TaylorSeries}(x, 0, 1, M) +--- +> \sin x & = \texttt{TaylorSeries}(x, 1, -1, M), \\ +> \sinh x & = \texttt{TaylorSeries}(x, 1, 1, M), \\ +> \cos x & = \texttt{TaylorSeries}(x, 0, -1, M), \\ +> \cosh x & = \texttt{TaylorSeries}(x, 0, 1, M). +384,385c383,389 +< Zauważmy, że wzór Taylora nadaje się do przybliżania funkcji trygonometrycznych jedynie dla argumentów bliskich $0$. Na szczęście możemy sobie z tym poradzić korzystając ze znanych tożsamości trygonometrycznych oraz okresowości funkcji $\sin$ i $\cos$. Naszym celem przed obliczniem funkcji \texttt{TaylorSeries} będzie sprowadzenie argumentu do przedziału $[0, \pi/4]$, w którym wzór Taylora bardzo dobrze przybliża wartości funkcji trygonometrycznych. Oto tabela która przedstawia jak radzimy sobie z argumentami spoza tego przedziału: +< \begin{center} +--- +> Zauważmy, że wzór Taylora nadaje się do przybliżania funkcji trygonometrycznych jedynie dla argumentów bliskich $0$. +> Na szczęście możemy sobie z tym poradzić korzystając ze znanych tożsamości trygonometrycznych oraz okresowości funkcji $\sin$ i $\cos$. +> Naszym celem przed obliczniem funkcji \texttt{TaylorSeries} będzie sprowadzenie argumentu do przedziału $[0, \pi/4]$, +> w którym wzór Taylora bardzo dobrze przybliża wartości funkcji trygonometrycznych. +> Oto tabela która przedstawia jak radzimy sobie z argumentami spoza tego przedziału: +> \begin{table}[H] +> \centering +399,402c403,405 +< \\ +< \vspace{0.5cm} +< Tabela 2: błędy przy obliczaniu funkcji $\sin(x)$. +< \end{center} +--- +> \caption{Wzory redukcyjne.} +> \label{tab:reduk} +> \end{table} +406,407c409,410 +< \sinh x & = 2\sinh(x/2)\cosh(x/2) \\ +< \cosh x & = \cosh^2(x/2) + \sinh^2(x/2) +--- +> \sinh x & = 2\sinh(x/2)\cosh(x/2), \\ +> \cosh x & = \cosh^2(x/2) + \sinh^2(x/2). +418c421 +< Dla każdej metody przeprowadziliśmy trzy rodzaje testów, w każdym z nich losowaliśmy $10^8$ liczb z różnych przedziałów. Ze względu na podobieństwo funkcji $\sin$ i $\cos$ oraz z faktu, że często wzory redukcyjne powodują faktycznie obliczanie innej funkcji trygonometrycznej, testy przeprowadziliśmy wyłącznie dla funkcji $\sin$. Przedziały i wyniki testów przedstawione są w poniższej tabeli: +--- +> Dla każdej metody przeprowadziliśmy trzy rodzaje testów, w każdym z nich losowaliśmy $10^8$ liczb z różnych przedziałów. Ze względu na podobieństwo funkcji $\sin$ i $\cos$ oraz z faktu, że często wzory redukcyjne powodują faktycznie obliczanie innej funkcji trygonometrycznej, testy przeprowadziliśmy wyłącznie dla funkcji $\sin$. Przedziały i wyniki testów przedstawione są w poniższej tabeli oraz na wykresach: +420c423,424 +< \begin{center} +--- +> \begin{table}[H] +> \centering +452,456c456,481 +< \end{tabular}}} +< \\ +< \vspace{0.5cm} +< Tabela 2: błędy przy obliczaniu funkcji $\sin(x)$. +< \end{center} +--- +> \end{tabular} +> }} +> \caption{Błędy przy obliczaniu funkcji $\sin(x)$.} +> \label{tab:2} +> \end{table} +> \clearpage +> % \begin{center} +> +> Poniższe wykresy obrazują wielkości błędów względnych obu algorytmów\newline przy liczeniu sinusa w przedziale $[0, 2\pi]$: +> \begin{figure}[H] +> \centering +> \includegraphics[scale = 0.6]{cordic error.png} +> \caption{Błąd względny algorytmu CORDIC dla wartości funkcji $\sin$} +> \label{rys:1} +> \end{figure} +> % \end{center} +> +> % \begin{center} +> \begin{figure}[H] +> \centering +> \includegraphics[scale = 0.9]{taylor error.png} +> \caption{Błąd względny metody Taylora dla wartości funkcji $\sin$} +> \label{rys:2} +> \end{figure} +> % \end{center} +> +459c484,491 +< Jak widać dla wszystkich testów, zaproponowane przez nas metody sprawdzają się bardzo dobrze dla małych argumentów. Algorytm CORDIC wypada dużo gorzej od metody korzystającej ze wzoru Taylora, lecz nie jest to dla nas nic zaskakującego -- metoda ta tworzy kompromis między wydajnością, a dokładnością obliczeń. Dla obu metod widać, że problemem jest zmiana argumentu na mały, gdyż to generuje największy błąd. W obu przypadkach najgorszy błąd względny generowały argumenty, które są duże i zbliżone do wielokrotności $\pi$, co wynika z konieczności odejmowania, z którego korzysta działanie $\mod$ oraz wzory redukcyjne, co prowadzi do utraty cyfr znaczących. +--- +> Jak widać w tabeli \ref{tab:2}, dla wszystkich testów zaproponowane przez nas metody sprawdzają +> się bardzo dobrze dla małych argumentów. Algorytm CORDIC wypada dużo gorzej od metody korzystającej +> ze wzoru Taylora, lecz nie jest to dla nas nic zaskakującego -- metoda ta tworzy kompromis +> między wydajnością, a dokładnością obliczeń. Dla obu metod widać, że problemem jest zmiana +> argumentu na mały, gdyż to generuje duży błąd obliczeń. W obu przypadkach największy błąd względny +> generowały argumenty zbliżone do wielokrotności $\pi$, jak widać na rysunkach \ref{rys:1} i \ref{rys:2}. Wynika to z konieczności odejmowania, +> z którego korzysta wbudowana w \texttt{Julia} funkcja \texttt{mod2pi} oraz wzory redukcyjne. +> Prowadzi do utraty cyfr znaczących, tym samym obniżając dokładność obliczeń. +463a496,508 +> +> \begin{thebibliography}{9} +> \bibitem{CORDIC tutorial} +> Steve Arar. +> \textit{An Introduction to the CORDIC Algorithm}. +> \\\texttt{\url{https://www.allaboutcircuits.com/technical-articles/an-introduction-to-the-cordic-algorithm/}} +> +> \bibitem{CORDIC ints} +> Andrea Vitali. +> \textit{Coordinate rotation digital computer algorithm (CORDIC) +> to compute trigonometric and hyperbolic functions}. +> \\\texttt{\url{https://bit.ly/3lVQxbJ}} +> \end{thebibliography} diff --git a/semestr-3/anm/pracowniaPOP/diff/sprawozdaniepdfdiff.pdf b/semestr-3/anm/pracowniaPOP/diff/sprawozdaniepdfdiff.pdf new file mode 100644 index 0000000..9fa6b12 Binary files /dev/null and b/semestr-3/anm/pracowniaPOP/diff/sprawozdaniepdfdiff.pdf differ diff --git a/semestr-3/anm/pracowniaPOP/doc/cordic error.png b/semestr-3/anm/pracowniaPOP/doc/cordic error.png new file mode 100644 index 0000000..5689b77 Binary files /dev/null and b/semestr-3/anm/pracowniaPOP/doc/cordic error.png differ diff --git a/semestr-3/anm/pracowniaPOP/doc/sprawozdanie.pdf b/semestr-3/anm/pracowniaPOP/doc/sprawozdanie.pdf new file mode 100644 index 0000000..23f6746 Binary files /dev/null and b/semestr-3/anm/pracowniaPOP/doc/sprawozdanie.pdf differ diff --git a/semestr-3/anm/pracowniaPOP/doc/sprawozdanie.tex b/semestr-3/anm/pracowniaPOP/doc/sprawozdanie.tex new file mode 100644 index 0000000..6be19b7 --- /dev/null +++ b/semestr-3/anm/pracowniaPOP/doc/sprawozdanie.tex @@ -0,0 +1,509 @@ +\documentclass{mwart} +\usepackage{polski} + +\setlength{\emergencystretch}{2em} +\usepackage{datetime} +\usepackage{ae,aecompl} +\usepackage[activate={true,nocompatibility},final,tracking=true,kerning=true,spacing=true,stretch=10,shrink=10]{microtype} +\frenchspacing + +%%% fix for \lll +% \let\babellll\lll +% \let\lll\relax +\usepackage{geometry} +\newgeometry{vmargin={25mm}, hmargin={25mm,25mm}} +\usepackage[]{algorithm2e} + + +\usepackage{enumitem} +\usepackage{graphicx} +\usepackage[normalem]{ulem} +\usepackage{tikz} + +\usetikzlibrary{external} +\tikzexternalize[prefix=tikz/] + +\usetikzlibrary{arrows.meta} +\usetikzlibrary{matrix, arrows} +\usepackage{program} +\usepackage{amsfonts} +\usepackage{amssymb} +%%% fix for \lll +\let\mathlll\lll +\let\lll\babellll + +\usepackage{amsmath} +\usepackage{amsthm} +\usepackage{tikz-cd} +\usepackage{float} +\usepackage{hyperref} +\usepackage{multicol} +\usepackage{mathtools} + +\usepackage{array} +\usepackage{wrapfig} +\usepackage{multirow} +\usepackage{tabularx} +\newcommand{\RR}{\mathbb{R}} +\newcommand{\CC}{\mathbb{C}} +\DeclarePairedDelimiter\abs{\lvert}{\rvert}% + +\newcommand{\fC}{{\mathfrak C}} +\newcommand{\cM}{{\mathcal M}} +\newcommand{\cC}{{\mathcal C}} +\newcommand{\cD}{{\mathcal D}} +\newcommand{\bN}{{\mathbf{N}}} +\newcommand{\bR}{{\mathbf{R}}} +\newcommand{\bZ}{{\mathbf{Z}}} +\newcommand{\bF}{{\mathbf{F}}} +\newcommand{\bQ}{{\mathbf{Q}}} +\newcommand{\bC}{{\mathbf{C}}} +\newcommand{\cA}{{\mathcal A}} +\newcommand{\cO}{{\mathcal O}} +\newcommand{\cF}{{\mathcal F}} +\newcommand{\cB}{{\mathcal B}} +\newcommand{\Ob}{{\mathrm{Ob}}} +\newcommand{\topl}{\mathcal T} +\newcommand{\Set}{{\mathrm{Set}}} +\newcommand{\Grp}{{\mathrm{Grp}}} +\newcommand{\AbGrp}{{\mathrm{AbGrp}}} +\newcommand{\Mod}{{\mathrm{Mod}}} +\newcommand{\Ring}{{\mathrm{Ring}}} +\newcommand{\Vect}{{\mathrm{Vect}}} +\newcommand{\Alg}{{\mathrm{Alg}}} +\newcommand{\restr}{\mathord{\upharpoonright}} +\newcommand{\liff}{\mathrel{\leftrightarrow}} +\newcommand{\limplies}{\mathrel{\rightarrow}} +\newcommand{\fset}[1]{\left\{{#1}\right\}} +\newcommand{\meet}{\mathbin{\wedge}} +\newcommand{\biglor}{\bigvee} +\newcommand{\bigland}{\bigwedge} + + +\DeclareMathOperator{\round}{{round}} +\DeclareMathOperator{\cl}{{cl}} +\DeclareMathOperator{\Id}{{Id}} +\DeclareMathOperator{\id}{{id}} +\DeclareMathOperator{\Aut}{{Aut}} +\DeclareMathOperator{\End}{{End}} +\DeclareMathOperator{\Ult}{{Ult}} +\DeclareMathOperator{\Homeo}{{Homeo}} +\DeclareMathOperator{\dom}{{dom}} +\DeclareMathOperator{\rng}{{rng}} +\DeclareMathOperator{\Core}{{Core}} +\DeclareMathOperator{\Hom}{{Hom}} +\DeclareMathOperator{\Stab}{{Stab}} +\DeclareMathOperator{\dcl}{{dcl}} +\DeclareMathOperator{\acl}{{acl}} +\DeclareMathOperator{\tp}{{tp}} +\DeclareMathOperator{\characteristic}{{char}} + + + +\newtheorem{twr}{Twierdzenie}[section] +\newtheorem{hip}[twr]{Hipoteza} +\newtheorem{pyt}[twr]{Pytanie} +\newtheorem{problem}[twr]{Problem} +\newtheorem{lem}[twr]{Lemat} +\newtheorem{fkt}[twr]{Fakt} +\newtheorem{wnsk}[twr]{Wniosek} +\newtheorem{stw}[twr]{Stwierdzenie} +\newtheorem{cw}[twr]{Ćwiczenie} + +\theoremstyle{remark} +\newtheorem{uwg}[twr]{Uwaga} +\theoremstyle{definition} +\newtheorem{dfn}[twr]{Definicja} +\newtheorem*{rozw}{Rozwiązanie} +\newtheorem*{sbclm}{Podclaim} +\newtheorem*{clm*}{Claim} +\newtheorem{pd}[twr]{Przykład} +\newcounter{claimcounter}[twr] +\newenvironment{clm}{\stepcounter{claimcounter}{\noindent {\textbf{Claim}} \theclaimcounter:}}{} +\newenvironment{clmproof}[1][\proofname]{\proof[#1]\renewcommand{\qedsymbol}{$\square$(claim)}}{\endproof} +\newenvironment{sbclmproof}[1][\proofname]{\proof[#1]\renewcommand{\qedsymbol}{$\square$(subclaim)}}{\endproof} + +\newcommand{\xqed}[1]{% + \leavevmode\unskip\penalty9999 \hbox{}\nobreak\hfill + \quad\hbox{\ensuremath{#1}}} +\theoremstyle{definition} +\newtheorem{zad}[twr]{Zadanie} + +\title{Pracownia z analizy numerycznej \\ + \large Sprawozdanie do zadania \textbf{P1.10} \\ + Prowadzący: dr Rafał Nowak} +\author{Franciszek Malinka, Kacper Solecki} +\date{Wrocław, Listopad 2020} + +\begin{document} + +\maketitle + +\section{Wstęp} +Funkcje trygonometryczne mają szerokie zastosowania w matematyce, informatyce, inżynierii, architekturze, produkcji muzyki i wielu innych dziedzinach. Nietrudno zatem dojść do wniosku, że ich efektywne i dokładne obliczanie jest problemem bardzo ważnym w kontekście tych zagadnień. + +W niniejszym sprawozdaniu przyjrzymy się dwóm opracowanym przez nas metodom obliczania wybranych funkcji trygonometrycznych używając jednie najprostszych operacji arytmetycznych ($+$, $-$, $*$, $/$, ale też przesunięcia bitowe), ze szczególnym naciskiem na dokładne obliczanie funkcji $\sin$ oraz $\cos$, również w dziedzinie liczb zespolonych. + +Proponowane przez nas metody mają docelowo dawać poprawne obliczenia dla podwójnej precyzji obliczeń, jednakże testy numeryczne przeprowadzamy używając zmiennych typu \texttt{BigFloat} w języku \texttt{Julia} (w którym implementowaliśmy nasze rozwiązania). Typ ten oferuje dowolną dokładność obliczeń. Wyniki naszych funkcji porównujemy z funkcjami bibliotecznymi języka i zakładamy, że dają one dokładne wyniki. + +\section{Algorytm CORDIC} +\subsection{Opis algorytmu} + +Pierwszą proponowaną przez nas metodą obliczania funkcji $\sin$ oraz $\cos$ jest Algorytm CORDIC (\textbf{CO}ordinate \textbf{R}otation \textbf{DI}gital \textbf{C}omputer). Algorytm ten został stworzony z myślą o komputerach o niskiej mocy obliczeniowej, ale również o możliwości ''włożenia'' algorytmu w hardware (tj. pozwala tworzyć mało skomplikowane układy bramek logicznych, które obliczają funkcje trygonometryczne). Jak się przekonamy, proces iteracyjny algorytmu korzysta jedynie z dodawania, odejmowania, przesunięć bitowych i wartości obliczonych podczas preprocessingu oraz nie wykorzystuje liczb zmiennoprzecinkowych. + +Zacznijmy od wprowadzenia zarysu działania algorytmu. Zapomnijmy na razie o analizie numerycznej i przenieśmy się do świata algebry liniowej. Wyobraźmy sobie, że mamy wydajny system który obliczy wektor $(x_r, y_r)$ jako wynik obrotu danego wektora $(x_0, y_0)$ o dany kąt $\theta$ wokół środka układu współrzędnych: +\begin{align} + x_r = x_0\cos\theta - y_0\sin\theta, \\ + y_r = x_0\sin\theta + y_0\cos\theta. +\end{align} + +Jeśli za $(x_0, y_0)$ weźmiemy punkt $(1, 0)$, to po obrocie dostaniemy: +\begin{align*} + x_r = \cos\theta, \\ + y_r = \sin\theta. +\end{align*} +Zatem używając obrotu umiemy policzyć wartości funkcji $\cos$ oraz $\sin$. + +Zapiszmy równania $(1), (2)$ w formie macierzowej: +\begin{align} + \begin{bmatrix} + x_r \\ y_r + \end{bmatrix} + = \begin{bmatrix} + \cos\theta & -\sin\theta \\ + \sin\theta & \cos\theta + \end{bmatrix} + \begin{bmatrix} + x_0 \\ y_0 + \end{bmatrix} + = \cos\theta + \begin{bmatrix} + 1 & -\tan\theta \\ + \tan\theta & 1 + \end{bmatrix} + \begin{bmatrix} + x_0 \\ y_0 + \end{bmatrix}. +\end{align} + +Powyższa równość pokazuje, że do obliczenia naszego wektora wynikowego (przy założeniu, że znamy wartości $\tan\theta$ oraz $\cos\theta$) wystarczą jedynie 4 mnożenia i kilka dodawań lub odejmowań. Chcielibyśmy pozbyć się tych mnożeń. Skorzystamy tutaj z dwóch obserwacji: +\begin{itemize} + \item Każdy kąt $\theta\in [0^{\circ}, 90^{\circ}]$ możemy zapisać jako sumę \textbf{wcześniej ustalonych}, mniejszych (co do modułu) kątów $\theta_i, i \in \{0, ..., n\}$: + \begin{align} + \theta = \sum_{i=0}^n \sigma_i\theta_i, \; \sigma_i \in \{-1, 1\}. + \end{align} + Dla przykładu, kąt $57.353^{\circ}$ jest sumą kątów + $45^{\circ}, 26.565^{\circ}, -14.03^{\circ}$ (dobór tych kątów jest nieprzypadkowy, o czym się zaraz przekonamy). + Jeśli $\theta$ nie należy do zadanego przez nas przedziału, to możemy ten kąt zmienić korzystając ze wzorów redukcyjnych + (o tym więcej w \textsection 3). + \item Jeśli nasze kąty $\theta_i$ będą dobrane tak, że $\tan\theta_i = 2^{-i}$, to mnożenie przez $\tan\theta_i$ jest niczym innym jak przesunięciem bitowym (w liczbach całkowitych). Dodatkowo okazuje się, że dowolny kąt nie większy niż $90^{\circ}$ da się przybliżyć sumą tak dobranych kątów $\theta_i$, więc da się tymi kątami osiągnąć cel założony w pierwszym punkcie. Dodatkowo im więcej takich kątów wybierzemy, tym dokładniejsze będzie to przybliżenie. +\end{itemize} + +Pozostały nam jeszcze mnożenia przez czynnik $\cos\theta$ (który nazwiemy przyrostem). Jeżeli to zignorujemy, to otrzymana rotacja będzie faktycznie obróceniem wektora o kąt $\theta$, ale z dodatkowym przeskalowaniem wektora. + +% \begin{center} +% \begin{tikzpicture} +% \draw [<->,thick] (0,6) node (yaxis) [above] {$y$} +% |- (8,0) node (xaxis) [right] {$x$}; +% \draw [->, thick] (0, 0) -- (6, 2) node (v1) [right] {$(x_0, y_0)$} +% \draw [->, cm={cos(45) ,-sin(45) ,sin(45) ,cos(45) ,(0 cm, 0 cm)}] (0, 0) -- (6,2) +% % \draw[black, thick, ->] (0,0) -- (10,0); +% % \draw[black, thick, ->] (0,0) -- (0,8); +% \end{tikzpicture} +% \end{center} + +Przyjrzyjmy się jak dokładnie będzie wyglądać nasz przyrost, jeśli zastosujemy zaproponowane przez nas punkty do obliczania obrotu. Powiedzmy, że chcemy obrócić wejściowy wektor o kąt $57.353^{\circ} = 45^{\circ} + 26.565^{\circ} - 14.03^{\circ}$. Wartości funkcji $\tan$ tych kątów są odwrotnościami potęg dwójki, zatem te kąty spełniają nasze założenie. Pierwsza rotacja o $45^{\circ}$ daje: +\begin{align} + \begin{bmatrix} + x_1 \\ y_1 + \end{bmatrix} + = \cos 45^{\circ} + \begin{bmatrix} + 1 & -1 \\ + 1 & 1 + \end{bmatrix} + \begin{bmatrix} + x_0 \\ y_0 + \end{bmatrix}. +\end{align} +Druga rotacja daje: +\begin{align} + \begin{bmatrix} + x_2 \\ y_2 + \end{bmatrix} + = \cos 26.565^{\circ} + \begin{bmatrix} + 1 & -2^{-1} \\ + 2^{-1} & 1 + \end{bmatrix} + \begin{bmatrix} + x_1 \\ y_1 + \end{bmatrix}. +\end{align} +Trzecia rotacja: +\begin{align} + \begin{bmatrix} + x_3 \\ y_3 + \end{bmatrix} + = \cos(-14.03^{\circ}) + \begin{bmatrix} + 1 & 2^{-2} \\ + -2^{-2} & 1 + \end{bmatrix} + \begin{bmatrix} + x_2 \\ y_2 + \end{bmatrix}. +\end{align} +Łącząc te równania razem dostajemy: +\begin{align} + \begin{bmatrix} + x_3 \\ y_3 + \end{bmatrix} + = \cos 45^{\circ}\cos 26.565^{\circ}\cos(-14.03^{\circ}) + \begin{bmatrix} + 1 & -1 \\ + 1 & 1 + \end{bmatrix} + \begin{bmatrix} + 1 & -2^{-1} \\ + 2^{-1} & 1 + \end{bmatrix} + \begin{bmatrix} + 1 & 2^{-2} \\ + -2^{-2} & 1 + \end{bmatrix} + \begin{bmatrix} + x_0 \\ y_0 + \end{bmatrix}. +\end{align} + +Zauważmy, że dzięki parzystości funkcji $\cos$ znak poszczególnych kątów nie ma znaczenia dla wartości przyrostu. Z tego snujemy wniosek, że przy ustalonej liczbie iteracji przyrost nie zależy od wyboru kąta $\theta$. Możemy go zatem policzyć i wziąć go pod uwagę dopiero na koniec obliczeń. +\begin{align} + P = \cos 45^{\circ}\cdot\cos 26.565^{\circ}\cdot\cos 14.03^{\circ}\cdot\ldots \approx 0.6072. +\end{align} +W takim razie, pomijając przyrost $P$ otrzymujemy następujący proces iteracyjny algorytmu CORDIC: +\begin{align} + x_{i + 1} & = x_{i} - \sigma_i 2^{-i}y_i, \\ + y_{i + 1} & = y_i + \sigma_i 2^{-i}y_i. +\end{align} + +Pozostaje jedynie problem znajdowania znaków $\sigma_i$ przy kątach $\theta_i$. Okazuje się jednak, że możemy to robić w bardzo prosty sposób. Niech $z_0 = \theta, \sigma_0 = 1$. W każdym kroku iteracyjnym znak $\sigma_{i + 1}$ dobieramy w następujący sposób -- niech $z_{i}$ będzie równe $\theta - \sum_{k=0}^{i - 1}\sigma_k\theta_k$ (czyli $z_i$ mówi jaki jeszcze nam został kąt do obrócenia, potencjalnie obróciliśmy już za dużo, wtedy $z_i < 0$). Wtedy $\sigma_{i + 1} = sgn(z_i)$. Mamy też $z_{i + 1} = z_{i} - \sigma_i\theta_i = z_{i} - \sigma_i\arctan{2^{i}}$. Błąd przybliżenia po $n$ iteracjach możemy wtedy łatwo policzyć ze wzoru +\begin{align} + \theta_{error} = z_n = \theta - \sum_{i=0}^n\sigma_i \theta_i. +\end{align} + +Zbierając wszystko razem, proces iteracyjny algorytmu CORDIC wygląda następująco: +\begin{align*} + x_{i + 1} & = x_{i} - \sigma_i 2^{-i}y_i, \\ + y_{i + 1} & = y_i + \sigma_i 2^{-i}y_i, \\ + z_{i + 1} & = z_i - \sigma_i \arctan 2^{-1}. +\end{align*} + +Kąty $\theta_i = \arctan{2^{-1}}$ możemy policzyć w preprocessingu i używać jako stałych. Wtedy rezultatem naszych obliczeń będzie $\cos\theta \approx P\cdot x_n$ oraz $\sin\theta \approx P\cdot y_n$. Dodatkowo, gdybyśmy przyjęli $x_0 = 1/P$, to pozbylibyśmy się nawet tego ostatniego mnożenia. + +Warto jeszcze zauważyć, że +\begin{align*} + \frac{1}{\cos(\arctan 2^{-i})} = \sqrt{1 + \frac{1}{2^{2i}}}. +\end{align*} +Możemy ten fakt wykorzystać do dokładniejszego obliczania wartości $P$. + +Musimy jeszcze zauważyć, że algorytm działa jedynie dla kątów $\theta$ spełniających +\begin{align*} + \abs{\theta} \leq \sum_{i=0}^n\theta_i \approx 99.88^{\circ}. +\end{align*} +Zatem dla kątów większych niż $90^{\circ}$ musimy skorzystać ze wzorów redukcyjnych, co dokłada pewnego błędu do naszego wyniku oraz powoduje konieczność wykonania kilku dodatkowych dzieleń i mnożeń. + +\subsection{Niespełniona obietnica} +We wstępie powiedzieliśmy, że algorytm będzie korzystał z dodawań, odejmowań i przesunięć bitowych, a do tego używał liczb całkowitych. Dzięki naszemu ustaleniu, że $\arctan\theta_i = 2^{-i}$, wszystkie mnożenia podczas iteracji naszego algorytmu to mnożenia przez potęgi dwójki. Jak możemy to wykorzystać? + +Ustalmy $M := 2^{K}$ dla pewnego $K$ (potem je wybierzemy). Teraz każdą spreprocessowaną +przez nas wartość $T$ (czyli $T$ jest kątem $\theta_i$ lub przyrostem $P$) przyjmiemy +$T := \round(M \cdot T)$. Chcąc policzyć wartości funkcji trygonometrycznych dla kąta $\theta$, +uruchomimy nas proces iteracyjny dla $x_0 = \round(M/P)$, $y_0 = 0$, $z_0 = \round(M\cdot\theta)$. +Zauważmy, że dzięki temu przeskalowaliśmy wszystkie obliczane przez nas wartości o stałą $M$ +i zaokrągliliśmy je po to, by móc pracować na liczbach całkowitych. To pozawala na wykorzystanie +przesunięć bitowych podczas mnożenia przez potęgi dwójki, dzięki czemu znacznie zwiększyliśmy +wydajność naszego algorytmu. Wtedy, po $n$ iteracjach naszego procesu mamy $\cos\theta \approx x_n/M$ +oraz $\sin\theta\approx y_n/M$ (już w arytmetyce zmiennoprzecinkowej). + +Zostało nam ustalić wartość $K$. Na pewno chcielibyśmy, aby $K$ było nie większe niż +długość mantysy. Ponadto algorytm ma być dostosowany do mało wydajnych maszyn, dlatego +w naszych analizach pracujemy przy użyciu \texttt{Int32}, zatem nie chcemy żeby $2^K\cdot T$ przekroczyło +zakres \texttt{Int32}. Jednakże kąty $\theta_i$ oraz wartość $P$ są niewielkie, zatem $K = 30$ będzie +odpowiednią wartością. + +\section{Wzór Taylora} +\subsection{Opis metody} +Zanim przejdziemy do opisu tej metody, przypomnijmy sobie pewną tożsamość trygonometryczną: +\begin{align} + \sin z = \sin (x + yi) = \sin x\cosh (y) + i\cos x\sinh(y). +\end{align} +Korzystając z tej tożsamości pozbywamy się konieczności pracowania z liczbami zespolonymi i możemy operować jedynie w zbiorze liczb rzeczywistych. + +W tej metodzie wykorzystamy znany analityczny wzór zwany wzorem Taylora. Korzystając z niego możemy wyprowadzić rozwinięcia funkcji trygonometrycznych: + +\begin{align*} + \sin x & = x - \frac{x^3}{3!} + \frac{x^5}{5!} - \frac{x^7}{7!} + \ldots, \\ + \sinh x & = x + \frac{x^3}{3!} + \frac{x^5}{5!} + \frac{x^7}{7!} + \ldots, \\ + \cos x & = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \frac{x^6}{6!} + \ldots, \\ + \cosh x & = 1 + \frac{x^2}{2!} + \frac{x^4}{4!} + \frac{x^6}{6!} + \ldots. \\ +\end{align*} + +Obliczanie rozwinięć poszczególnych funkcji jest proste i wyabstrahowaliśmy je do jednej, generycznej funkcji \texttt{TalyorSeries}: +\begin{center} + \begin{algorithm}[H] + \SetAlgoLined + \KwData{x, parity, changeSign, M} + \KwResult{Obliczenie szeregu Taylora odpowiedniej funkcji trygonometrycznej w punkcie x dla jego pierwszych M niezerowych wyrazów} + result := 0\; + elem := 1\; + \If{parity = 1}{ + elem := x\; + } + i := parity + 1\; + \While{i $\le$ 2M + parity}{ + result := result + elem\; + elem := elem * changeSign * x * x / (i * (i + 1))\; + i := i + 2\; + } + \end{algorithm} +\end{center} + +Algorytm oblicza sumę $\sum_{n=0}^M\sigma_n\frac{x^n}{n!}$, gdzie $\sigma_i \in \{-1, 0, 1\}$. Wartość $\sigma_n$ zależy od wartości parametrów podanych w funkcji: gdzy \texttt{parity} jest równe $0$, wtedy mamy $\sigma_{2k + 1} = 0$, a gdy \texttt{parity} jest równe $0$ mamy $\sigma_{2k} = 0$. Odpowiada to odpowiednio szeregom $\cos x, \cosh x$ oraz $\sin x, \sinh x$. Od parametru \texttt{changeSign} zależy czy chcemy, aby kolejne niezerowe wyrazy obliczanego szeregu zmieniały znak (zmieniamy znak, gdy chcemy obliczać zwykłe funkcje trygonometryczne oraz nie zmieniamy gdy obliczamy funkcje hiperboliczne). + +To daje prostą możliwość obliczania pożądanych przez nas funkcji: + +\begin{align*} + \sin x & = \texttt{TaylorSeries}(x, 1, -1, M), \\ + \sinh x & = \texttt{TaylorSeries}(x, 1, 1, M), \\ + \cos x & = \texttt{TaylorSeries}(x, 0, -1, M), \\ + \cosh x & = \texttt{TaylorSeries}(x, 0, 1, M). +\end{align*} + +Zauważmy, że wzór Taylora nadaje się do przybliżania funkcji trygonometrycznych jedynie dla argumentów bliskich $0$. +Na szczęście możemy sobie z tym poradzić korzystając ze znanych tożsamości trygonometrycznych oraz okresowości funkcji $\sin$ i $\cos$. +Naszym celem przed obliczniem funkcji \texttt{TaylorSeries} będzie sprowadzenie argumentu do przedziału $[0, \pi/4]$, +w którym wzór Taylora bardzo dobrze przybliża wartości funkcji trygonometrycznych. +Oto tabela która przedstawia jak radzimy sobie z argumentami spoza tego przedziału: +\begin{table}[H] + \centering + \begin{tabular}{ |p{4cm}||p{4cm}|p{4cm}| } + \hline + \multicolumn{3}{|c|}{Wzory redukcyjne} \\ + \hline + Warunek na $x$ & $\sin x$ & $\cos x$ \\ + \hline + $x < 0$ & $-\sin (-x)$ & $\cos (-x)$ \\ + $x \ge 2\pi$ & $\sin(x \mod 2\pi)$ & $\cos (x\mod 2\pi)$ \\ + $x > \pi$ & $-\sin(x - \pi)$ & $-\cos(x - \pi)$ \\ + $x > \pi/2$ & $\cos(x - \pi/2)$ & $-\sin(x - \pi/2)$ \\ + $x > \pi/4$ & $\cos(\pi/2 - x)$ & $\sin(\pi/2 - x)$ \\ + \hline + \end{tabular} + \caption{Wzory redukcyjne.} + \label{tab:reduk} +\end{table} + +Dla funkcji hiperbolicznych sposób jest prostszy: korzystamy z dwóch własności: +\begin{align*} + \sinh x & = 2\sinh(x/2)\cosh(x/2), \\ + \cosh x & = \cosh^2(x/2) + \sinh^2(x/2). +\end{align*} +Można by przypuszczać, że dla dużych $x$ błąd obliczania tych funkcji będzie duży. Jednakże okazuje się, że funkcje te bardzo szybko rosną i już dla $x = 1000$ wartości obu tych funkcji nie mieszczą się w zakresie \texttt{Float64}, zatem tak naprawdę wykonamy maksymalnie $15$ takich redukcji, co generuje dopuszczalnie mały błąd. + +\section{Analiza błędu} + +\subsection{Wyniki testów} +Dokładność naszych metod porównywaliśmy z funkcjami bibliotecznymi w języku \texttt{Julia}, które domyślnie obsługują obliczanie wartości funkcji trygonometrycznych dla liczb zespolonych. Zakładmy o tych funkcjach bibliotecznych, że dają poprawny wynik. + +Przeprowadziliśmy testy dokładności metody opartej na wzorze Taylora dla liczb rzeczywistych oraz dla liczb zespolonych oraz testy dla metody Taylora, w której nie używaliśmy wzorów redukcyjnych, lecz rozwijaliśmy wzór dopóki wystarczająco dobrze nie przybliżał wartości funkcji dla danego argumentu. Testy dla algorytmu CORDIC przeprowadziliśmy wyłącznie dla liczb rzeczywistych. + +Dla każdej metody przeprowadziliśmy trzy rodzaje testów, w każdym z nich losowaliśmy $10^8$ liczb z różnych przedziałów. Ze względu na podobieństwo funkcji $\sin$ i $\cos$ oraz z faktu, że często wzory redukcyjne powodują faktycznie obliczanie innej funkcji trygonometrycznej, testy przeprowadziliśmy wyłącznie dla funkcji $\sin$. Przedziały i wyniki testów przedstawione są w poniższej tabeli oraz na wykresach: + +\begin{table}[H] + \centering + \resizebox{\textwidth}{!}{% + {\setlength{\extrarowheight}{5pt}% + \begin{tabular}{ |c||c|c|c|c|c| } + \hline + algorytm & przedział argumentu & średni błąd wz. & max błąd wz. & średni błąd bezwz. & max błąd bezwz. \\ + \hline + \multirow{3}{6em}{Taylor dla $\RR$} & $x:$ dowolny Float64 & $1,887 \cdot 10^{-15}$ & $3,167 \cdot 10^{-8}$ & $1,179 \cdot 10^{-16}$ & $8,882 \cdot 10^{-16}$ \\ + \cline{2-6} + & $-2\pi \leq x \leq 2\pi$ & $1,472 \cdot 10^{-15}$ + & $1.184 \cdot 10^{-8}$ & $9,766 \cdot 10^{-17}$ & $5,551 \cdot 10^{-16}$ \\ + \cline{2-6} + & $0 \leq x \leq 1$ & $8,694 \cdot 10^{-17}$ & $6,661 \cdot 10^{-16}$ & $4,293 \cdot 10^{-17}$ & $4,441 \cdot 10^{-16}$ \\ + \hline + \multirow{3}{6em}{Taylor dla $\CC$} & $-100 \leq \abs{x} \leq 100$ & $4,932 \cdot 10^{-15}$ & $1,311 \cdot 10^{-13}$ & $1,689 \cdot 10^{26}$ & $5,898 \cdot 10^{29}$ \\ + \cline{2-6} + & $-2\pi \leq \abs{x} \leq 2\pi$ & $4,338 \cdot 10^{-16}$ & $1,487 \cdot 10^{-11}$ & $1,364 \cdot 10^{-14}$ & $8,710 \cdot 10^{-13}$ \\ + \cline{2-6} + & $0 \leq \abs{x} \leq 1$ & $1,597 \cdot 10^{-16}$ & $1,099 \cdot 10^{-15}$ & $1,124 \cdot 10^{-16}$ & $1,111\cdot 10^{-15}$ \\ + \hline + \multirow{3}{6em}{Taylor dla $\CC$ bez wzorów redukcyjnych} & $-100 \leq \abs{x} \leq 100$ & $4,77 \cdot 10^{23}$ & $4,488 \cdot 10^{26}$ & $7,759 \cdot 10^{40}$ & $2,208 \cdot 10^{44}$ \\ + \cline{2-6} + & $-2\pi \leq \abs{x} \leq 2\pi$ & $6,333 \cdot 10^{-1}$ & $1,000$ & $2,344 \cdot 10$ & $2,677 \cdot 10^2$ \\ + \cline{2-6} + & $0 \leq \abs{x} \leq 1$ & $1,589 \cdot 10^{-16}$ & $1,291 \cdot 10^{-15}$ & $1,118 \cdot 10^{-16}$ & $1,116 \cdot 10^{-15}$ \\ + \hline + \multirow{3}{6em}{Cordic dla $\RR$} & $x:$ dowolny Float64 & $3,100 \cdot 10^{-8}$ & $4,575 \cdot 10^{-1}$ & $2,459 \cdot 10^{-9}$ & $5,529 \cdot 10^{-3}$ \\ + \cline{2-6} + & $-2\pi \leq x \leq 2\pi$ & $2,770 \cdot 10^{-8}$ & $1,183 \cdot 10^{-1}$ & $2,532 \cdot 10^{-9}$ & $6,042 \cdot 10^{-4}$ \\ + \cline{2-6} + & $0 \leq x \leq 1$ & $4,176 \cdot 10^{-8}$ & $9,182 \cdot 10^{-2}$ & $2,614 \cdot 10^{-9}$ & $5,261 \cdot 10^{-4}$ \\ + \hline + \end{tabular} + }} + \caption{Błędy przy obliczaniu funkcji $\sin(x)$.} + \label{tab:2} +\end{table} +\clearpage +% \begin{center} + +Poniższe wykresy obrazują wielkości błędów względnych obu algorytmów\newline przy liczeniu sinusa w przedziale $[0, 2\pi]$: +\begin{figure}[H] +\centering + \includegraphics[scale = 0.6]{cordic error.png} + \caption{Błąd względny algorytmu CORDIC dla wartości funkcji $\sin$} + \label{rys:1} +\end{figure} +% \end{center} + +% \begin{center} +\begin{figure}[H] +\centering + \includegraphics[scale = 0.9]{taylor error.png} +\caption{Błąd względny metody Taylora dla wartości funkcji $\sin$} +\label{rys:2} +\end{figure} +% \end{center} + + +\subsection{Wnioski} +Jak widać w tabeli \ref{tab:2}, dla wszystkich testów zaproponowane przez nas metody sprawdzają +się bardzo dobrze dla małych argumentów. Algorytm CORDIC wypada dużo gorzej od metody korzystającej +ze wzoru Taylora, lecz nie jest to dla nas nic zaskakującego -- metoda ta tworzy kompromis +między wydajnością, a dokładnością obliczeń. Dla obu metod widać, że problemem jest zmiana +argumentu na mały, gdyż to generuje duży błąd obliczeń. W obu przypadkach największy błąd względny +generowały argumenty zbliżone do wielokrotności $\pi$, jak widać na rysunkach \ref{rys:1} i \ref{rys:2}. Wynika to z konieczności odejmowania, +z którego korzysta wbudowana w \texttt{Julia} funkcja \texttt{mod2pi} oraz wzory redukcyjne. +Prowadzi do utraty cyfr znaczących, tym samym obniżając dokładność obliczeń. + +Dużym problemem w obliczaniu wartości funkcji trygonometrycznych w dziedzinie liczb zespolonych jest konieczność używa funkcji hiperbolicznych, które rosną w tempie wykładniczym. Jeśli spojrzymy na wzór $(13)$ to zauważmy, że bardzo prawdopodobne jest, że będziemy mnożyć zbliżoną do $0$ wartość funkcji $\sin$ oraz $\cos$ z potencjalnie bardzo dużymi wartościami funkcji $\cosh$ i $\sinh$. + +Mimo to jesteśmy zadowoleni z rezultatów dla losowych testów -- jak widać, średni błąd względny jest rzędu dokładności liczb o precyzji podwójnej w przypadku metody Taylora oraz rzędu pojedynczej precyzji dla algorytmu CORDIC (co wynika z użycia \texttt{Int32} podczas procesu iteracyjnego). + +\begin{thebibliography}{9} + \bibitem{CORDIC tutorial} + Steve Arar. + \textit{An Introduction to the CORDIC Algorithm}. + \\\texttt{\url{https://www.allaboutcircuits.com/technical-articles/an-introduction-to-the-cordic-algorithm/}} + + \bibitem{CORDIC ints} + Andrea Vitali. + \textit{Coordinate rotation digital computer algorithm (CORDIC) + to compute trigonometric and hyperbolic functions}. + \\\texttt{\url{https://bit.ly/3lVQxbJ}} +\end{thebibliography} +\end{document} \ No newline at end of file diff --git a/semestr-3/anm/pracowniaPOP/doc/taylor error.png b/semestr-3/anm/pracowniaPOP/doc/taylor error.png new file mode 100644 index 0000000..f731416 Binary files /dev/null and b/semestr-3/anm/pracowniaPOP/doc/taylor error.png differ diff --git a/semestr-3/anm/pracowniaPOP/prog/program.html b/semestr-3/anm/pracowniaPOP/prog/program.html new file mode 100644 index 0000000..3525493 --- /dev/null +++ b/semestr-3/anm/pracowniaPOP/prog/program.html @@ -0,0 +1,19173 @@ + + + + + +program + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/semestr-3/anm/pracowniaPOP/prog/program.ipynb b/semestr-3/anm/pracowniaPOP/prog/program.ipynb new file mode 100644 index 0000000..f8cb21c --- /dev/null +++ b/semestr-3/anm/pracowniaPOP/prog/program.ipynb @@ -0,0 +1,7922 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "set_cordic_iterations (generic function with 1 method)" + ] + }, + "execution_count": 1, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "include(\"program.jl\")" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Plots.PlotlyBackend()" + ] + }, + "execution_count": 2, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "using Plots\n", + "using Random\n", + "using Distributions\n", + "\n", + "plotly()" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [], + "source": [ + "# Zadanie 10, Franiszek malinka, Kacper Solecki\n", + "\n", + "# instrukcja:\n", + "# Nasz program udostępnia funkcje \n", + "\n", + "# -> taylor_sin(a, b) - sinus liczby a+bi liczony za pomocą szeregu Taylora\n", + "# -> taylor_cos(a, b) - cosinus liczby a+bi liczony za pomocą szeregu Taylora\n", + "# -> taylor_sinh(x) - sinus hiperboliczny liczby x liczony za pomocą szeregu Taylora\n", + "# -> taylor_cosh(x) - cosinus hiperboliczny liczby x liczony za pomocą szeregu Taylora\n", + "# -> cordic_sin(x) - sinus (rzeczywistej) liczby x liczony za pomocą algorytmu Cordic\n", + "# -> cordic_cos(x) - cosinus (rzeczywistej) liczby x liczony za pomocą algorytmu Cordic" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "0.9092974268256817" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# porównianie na sin(2), cos(2)\n", + "sin(2.0)" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "(0.9092974268256817, -0.0)" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "taylor_sin(2.0, 0.0)" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "0.9092974280938506" + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "cordic_sin(2.0)" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "-0.4161468365471424" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "cos(2)" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "(-0.41614683654714246, -0.0)" + ] + }, + "execution_count": 8, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "taylor_cos(2.0, 0.0)" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "-0.4161468353122473" + ] + }, + "execution_count": 9, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "cordic_cos(2.0)" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "-5991.431207677988 - 9240.89014825243im" + ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# porównianie na sin(10 + 10i)\n", + "sin(10 + 10im)" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "(-5991.431207678, -9240.890148252452)" + ] + }, + "execution_count": 11, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "taylor_sin(10, 10)" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "rel_error (generic function with 1 method)" + ] + }, + "execution_count": 12, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# w ten sposób liczony jest błąd względny zarówno dla liczb rzeczywistych jak i zespolonych\n", + "function rel_error(x, y)\n", + " if x == 0\n", + " return 0\n", + " end\n", + " return abs((x-y)/x)\n", + "end" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": {}, + "outputs": [], + "source": [ + "# Funkcje użyte w wykresach błędów od liczby iteracji:" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "taylor_error_of_iterations (generic function with 1 method)" + ] + }, + "execution_count": 14, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# błąd przy liczeniu sin(100 + 100i) szeregiem Taylora przy x iteracjach\n", + "function taylor_error_of_iterations(x)\n", + " set_taylor_iterations(x)\n", + " return rel_error(sin(100+100im), taylor_sin(100, 100)[1] + taylor_sin(100, 100)[2]*im)\n", + "end" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "cordic_error_of_iterations (generic function with 1 method)" + ] + }, + "execution_count": 15, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# błąd przy liczeniu sin(100) Cordicem przy x iteracjach\n", + "function cordic_error_of_iterations(x)\n", + " set_cordic_iterations(x)\n", + " return rel_error(sin(100), cordic_sin(100.0))\n", + "end" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "taylor_error_of_iterations2 (generic function with 1 method)" + ] + }, + "execution_count": 16, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# błąd przy liczeniu sin(100) szeregiem Taylora przy x iteracjach\n", + "function taylor_error_of_iterations2(x)\n", + " set_taylor_iterations(x)\n", + " return rel_error(sin(100), taylor_sin(100.0, 0.0)[1])\n", + "end" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "1:20" + ] + }, + "execution_count": 17, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "X = 1:20" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": {}, + "outputs": [], + "source": [ + "# Przykładowe błędy w zależności od liczby iteracji\n", + "# obrazują jak szybko zbiega metoda:" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + " \n" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.plotly.v1+json": { + "data": [ + { + "colorbar": { + "title": "" + }, + "legendgroup": "y1", + "line": { + "color": "rgba(0, 154, 250, 1.000)", + "dash": "solid", + "shape": "linear", + "width": 1 + }, + "mode": "lines", + "name": "y1", + "showlegend": true, + "type": "scatter", + "x": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "xaxis": "x", + "y": [ + 0.9999999999947897, + 0.6604336394521374, + 0.02055234411557763, + 0.00022080130144359062, + 1.4713452359772989e-06, + 6.728428696183563e-09, + 2.238852117625799e-11, + 7.408349671662484e-14, + 2.066101872553143e-14, + 2.066101872553143e-14, + 2.066101872553143e-14, + 2.066101872553143e-14, + 2.066101872553143e-14, + 2.066101872553143e-14, + 2.066101872553143e-14, + 2.066101872553143e-14, + 2.066101872553143e-14, + 2.066101872553143e-14, + 2.066101872553143e-14, + 2.066101872553143e-14 + ], + "yaxis": "y", + "zmax": null, + "zmin": null + } + ], + "layout": { + "annotations": [ + { + "font": { + "color": "rgba(0, 0, 0, 1.000)", + "family": "sans-serif", + "size": 20 + }, + "rotation": 0, + "showarrow": false, + "text": "Taylor relative error calculating sin(100+100i)", + "x": 0.5423611111111111, + "xanchor": "center", + "xref": "paper", + "y": 1, + "yanchor": "top", + "yref": "paper" + } + ], + "height": 400, + "legend": { + "bgcolor": "rgba(255, 255, 255, 1.000)", + "bordercolor": "rgba(0, 0, 0, 1.000)", + "borderwidth": 1, + "font": { + "color": "rgba(0, 0, 0, 1.000)", + "family": "sans-serif", + "size": 11 + }, + "tracegroupgap": 0, + "traceorder": "normal", + "x": 1, + "xanchor": "auto", + "y": 1, + "yanchor": "auto" + }, + "margin": { + "b": 20, + "l": 0, + "r": 0, + "t": 20 + }, + "paper_bgcolor": "rgba(255, 255, 255, 1.000)", + "plot_bgcolor": "rgba(255, 255, 255, 1.000)", + "showlegend": true, + "width": 600, + "xaxis": { + "anchor": "y", + "domain": [ + 0.09128390201224845, + 0.9934383202099738 + ], + "gridcolor": "rgba(0, 0, 0, 0.100)", + "gridwidth": 0.5, + "linecolor": "rgba(0, 0, 0, 1.000)", + "mirror": false, + "range": [ + 0.43000000000000005, + 20.57 + ], + "showgrid": true, + "showline": true, + "showticklabels": true, + "tickangle": 0, + "tickcolor": "rgb(0, 0, 0)", + "tickfont": { + "color": "rgba(0, 0, 0, 1.000)", + "family": "sans-serif", + "size": 11 + }, + "tickmode": "array", + "ticks": "inside", + "ticktext": [ + "5", + "10", + "15", + "20" + ], + "tickvals": [ + 5, + 10, + 15, + 20 + ], + "title": "iterations", + "titlefont": { + "color": "rgba(0, 0, 0, 1.000)", + "family": "sans-serif", + "size": 15 + }, + "type": "-", + "visible": true, + "zeroline": false, + "zerolinecolor": "rgba(0, 0, 0, 1.000)" + }, + "yaxis": { + "anchor": "x", + "domain": [ + 0.07581474190726165, + 0.9415463692038496 + ], + "gridcolor": "rgba(0, 0, 0, 0.100)", + "gridwidth": 0.5, + "linecolor": "rgba(0, 0, 0, 1.000)", + "mirror": false, + "range": [ + -0.029999999999822412, + 1.0299999999946328 + ], + "showgrid": true, + "showline": true, + "showticklabels": true, + "tickangle": 0, + "tickcolor": "rgb(0, 0, 0)", + "tickfont": { + "color": "rgba(0, 0, 0, 1.000)", + "family": "sans-serif", + "size": 11 + }, + "tickmode": "array", + "ticks": "inside", + "ticktext": [ + "0.00", + "0.25", + "0.50", + "0.75", + "1.00" + ], + "tickvals": [ + 0, + 0.25, + 0.5, + 0.75, + 1 + ], + "title": "relative error", + "titlefont": { + "color": "rgba(0, 0, 0, 1.000)", + "family": "sans-serif", + "size": 15 + }, + "type": "-", + "visible": true, + "zeroline": false, + "zerolinecolor": "rgba(0, 0, 0, 1.000)" + } + } + }, + "text/html": [ + "\n", + "\n", + " \n", + " Plots.jl\n", + " \n", + " \n", + " \n", + " \n", + "
\n", + " \n", + "\n", + " \n", + "\n" + ] + }, + "execution_count": 19, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "plot(taylor_error_of_iterations, X, title=\"Taylor relative error calculating sin(100+100i)\", xguide = \"iterations\", yguide = \"relative error\")" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "data": { + "application/vnd.plotly.v1+json": { + "data": [ + { + "colorbar": { + "title": "" + }, + "legendgroup": "y1", + "line": { + "color": "rgba(0, 154, 250, 1.000)", + "dash": "solid", + "shape": "linear", + "width": 1 + }, + "mode": "lines", + "name": "y1", + "showlegend": true, + "type": "scatter", + "x": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "xaxis": "x", + "y": [ + 0.04858006105965706, + 0.0006898745020126097, + 4.643725178799385e-06, + 1.8207599251359285e-08, + 4.6699841760941685e-11, + 8.485100007739351e-14, + 2.1925323017414343e-16, + 4.3850646034828687e-16, + 4.3850646034828687e-16, + 4.3850646034828687e-16, + 4.3850646034828687e-16, + 4.3850646034828687e-16, + 4.3850646034828687e-16, + 4.3850646034828687e-16, + 4.3850646034828687e-16, + 4.3850646034828687e-16, + 4.3850646034828687e-16, + 4.3850646034828687e-16, + 4.3850646034828687e-16, + 4.3850646034828687e-16 + ], + "yaxis": "y", + "zmax": null, + "zmin": null + } + ], + "layout": { + "annotations": [ + { + "font": { + "color": "rgba(0, 0, 0, 1.000)", + "family": "sans-serif", + "size": 20 + }, + "rotation": 0, + "showarrow": false, + "text": "Taylor relative error calculating sin(100)", + "x": 0.5423611111111111, + "xanchor": "center", + "xref": "paper", + "y": 1, + "yanchor": "top", + "yref": "paper" + } + ], + "height": 400, + "legend": { + "bgcolor": "rgba(255, 255, 255, 1.000)", + "bordercolor": "rgba(0, 0, 0, 1.000)", + "borderwidth": 1, + "font": { + "color": "rgba(0, 0, 0, 1.000)", + "family": "sans-serif", + "size": 11 + }, + "tracegroupgap": 0, + "traceorder": "normal", + "x": 1, + "xanchor": "auto", + "y": 1, + "yanchor": "auto" + }, + "margin": { + "b": 20, + "l": 0, + "r": 0, + "t": 20 + }, + "paper_bgcolor": "rgba(255, 255, 255, 1.000)", + "plot_bgcolor": "rgba(255, 255, 255, 1.000)", + "showlegend": true, + "width": 600, + "xaxis": { + "anchor": "y", + "domain": [ + 0.09128390201224845, + 0.9934383202099738 + ], + "gridcolor": "rgba(0, 0, 0, 0.100)", + "gridwidth": 0.5, + "linecolor": "rgba(0, 0, 0, 1.000)", + "mirror": false, + "range": [ + 0.43000000000000005, + 20.57 + ], + "showgrid": true, + "showline": true, + "showticklabels": true, + "tickangle": 0, + "tickcolor": "rgb(0, 0, 0)", + "tickfont": { + "color": "rgba(0, 0, 0, 1.000)", + "family": "sans-serif", + "size": 11 + }, + "tickmode": "array", + "ticks": "inside", + "ticktext": [ + "5", + "10", + "15", + "20" + ], + "tickvals": [ + 5, + 10, + 15, + 20 + ], + "title": "iterations", + "titlefont": { + "color": "rgba(0, 0, 0, 1.000)", + "family": "sans-serif", + "size": 15 + }, + "type": "-", + "visible": true, + "zeroline": false, + "zerolinecolor": "rgba(0, 0, 0, 1.000)" + }, + "yaxis": { + "anchor": "x", + "domain": [ + 0.07581474190726165, + 0.9415463692038496 + ], + "gridcolor": "rgba(0, 0, 0, 0.100)", + "gridwidth": 0.5, + "linecolor": "rgba(0, 0, 0, 1.000)", + "mirror": false, + "range": [ + -0.0014574018317894857, + 0.05003746289144676 + ], + "showgrid": true, + "showline": true, + "showticklabels": true, + "tickangle": 0, + "tickcolor": "rgb(0, 0, 0)", + "tickfont": { + "color": "rgba(0, 0, 0, 1.000)", + "family": "sans-serif", + "size": 11 + }, + "tickmode": "array", + "ticks": "inside", + "ticktext": [ + "0.00", + "0.01", + "0.02", + "0.03", + "0.04", + "0.05" + ], + "tickvals": [ + 0, + 0.01, + 0.02, + 0.03, + 0.04, + 0.05 + ], + "title": "relative error", + "titlefont": { + "color": "rgba(0, 0, 0, 1.000)", + "family": "sans-serif", + "size": 15 + }, + "type": "-", + "visible": true, + "zeroline": false, + "zerolinecolor": "rgba(0, 0, 0, 1.000)" + } + } + }, + "text/html": [ + "\n", + "\n", + " \n", + " Plots.jl\n", + " \n", + " \n", + " \n", + " \n", + "
\n", + " \n", + "\n", + " \n", + "\n" + ] + }, + "execution_count": 20, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "plot(taylor_error_of_iterations2, X, title=\"Taylor relative error calculating sin(100)\", xguide = \"iterations\", yguide = \"relative error\")" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.plotly.v1+json": { + "data": [ + { + "colorbar": { + "title": "" + }, + "legendgroup": "y1", + "line": { + "color": "rgba(0, 154, 250, 1.000)", + "dash": "solid", + "shape": "linear", + "width": 1 + }, + "mode": "lines", + "name": "y1", + "showlegend": true, + "type": "scatter", + "x": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20 + ], + "xaxis": "x", + "y": [ + 0.19923803206067645, + 0.40038098396966176, + 0.04933327667366985, + 0.15678575968442748, + 0.04552832522388985, + 0.008453488065297705, + 0.018071367045314653, + 0.004685838026992587, + 0.0019769599175434157, + 0.001346845796143942, + 0.0003169671004323271, + 0.0005144620678263349, + 9.862885340066103e-05, + 0.00010925740652706494, + 5.322553095504949e-06, + 4.664671284967571e-05, + 2.066207987708538e-05, + 7.669763390790217e-06, + 1.1736051476426335e-06, + 2.074473973931158e-06 + ], + "yaxis": "y", + "zmax": null, + "zmin": null + } + ], + "layout": { + "annotations": [ + { + "font": { + "color": "rgba(0, 0, 0, 1.000)", + "family": "sans-serif", + "size": 20 + }, + "rotation": 0, + "showarrow": false, + "text": "CORDIC relative error calculating sin(100)", + "x": 0.5349537037037038, + "xanchor": "center", + "xref": "paper", + "y": 1, + "yanchor": "top", + "yref": "paper" + } + ], + "height": 400, + "legend": { + "bgcolor": "rgba(255, 255, 255, 1.000)", + "bordercolor": "rgba(0, 0, 0, 1.000)", + "borderwidth": 1, + "font": { + "color": "rgba(0, 0, 0, 1.000)", + "family": "sans-serif", + "size": 11 + }, + "tracegroupgap": 0, + "traceorder": "normal", + "x": 1, + "xanchor": "auto", + "y": 1, + "yanchor": "auto" + }, + "margin": { + "b": 20, + "l": 0, + "r": 0, + "t": 20 + }, + "paper_bgcolor": "rgba(255, 255, 255, 1.000)", + "plot_bgcolor": "rgba(255, 255, 255, 1.000)", + "showlegend": true, + "width": 600, + "xaxis": { + "anchor": "y", + "domain": [ + 0.07646908719743364, + 0.9934383202099737 + ], + "gridcolor": "rgba(0, 0, 0, 0.100)", + "gridwidth": 0.5, + "linecolor": "rgba(0, 0, 0, 1.000)", + "mirror": false, + "range": [ + 0.43000000000000005, + 20.57 + ], + "showgrid": true, + "showline": true, + "showticklabels": true, + "tickangle": 0, + "tickcolor": "rgb(0, 0, 0)", + "tickfont": { + "color": "rgba(0, 0, 0, 1.000)", + "family": "sans-serif", + "size": 11 + }, + "tickmode": "array", + "ticks": "inside", + "ticktext": [ + "5", + "10", + "15", + "20" + ], + "tickvals": [ + 5, + 10, + 15, + 20 + ], + "title": "iterations", + "titlefont": { + "color": "rgba(0, 0, 0, 1.000)", + "family": "sans-serif", + "size": 15 + }, + "type": "-", + "visible": true, + "zeroline": false, + "zerolinecolor": "rgba(0, 0, 0, 1.000)" + }, + "yaxis": { + "anchor": "x", + "domain": [ + 0.07581474190726165, + 0.9415463692038496 + ], + "gridcolor": "rgba(0, 0, 0, 0.100)", + "gridwidth": 0.5, + "linecolor": "rgba(0, 0, 0, 1.000)", + "mirror": false, + "range": [ + -0.012010220705787781, + 0.41239237828059716 + ], + "showgrid": true, + "showline": true, + "showticklabels": true, + "tickangle": 0, + "tickcolor": "rgb(0, 0, 0)", + "tickfont": { + "color": "rgba(0, 0, 0, 1.000)", + "family": "sans-serif", + "size": 11 + }, + "tickmode": "array", + "ticks": "inside", + "ticktext": [ + "0.0", + "0.1", + "0.2", + "0.3", + "0.4" + ], + "tickvals": [ + 0, + 0.1, + 0.2, + 0.30000000000000004, + 0.4 + ], + "title": "relative error", + "titlefont": { + "color": "rgba(0, 0, 0, 1.000)", + "family": "sans-serif", + "size": 15 + }, + "type": "-", + "visible": true, + "zeroline": false, + "zerolinecolor": "rgba(0, 0, 0, 1.000)" + } + } + }, + "text/html": [ + "\n", + "\n", + " \n", + " Plots.jl\n", + " \n", + " \n", + " \n", + " \n", + "
\n", + " \n", + "\n", + " \n", + "\n" + ] + }, + "execution_count": 21, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "plot(cordic_error_of_iterations, X, title=\"CORDIC relative error calculating sin(100)\", xguide = \"iterations\", yguide = \"relative error\")" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "rel_error_cordic (generic function with 1 method)" + ] + }, + "execution_count": 22, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# funkcje do kolejnych wykresów, pokaujących błąd względny liczenia sinusa w przedziale [0, 2pi]:\n", + "\n", + "function rel_error_cordic(x)\n", + " return rel_error(sin(x), cordic_sin(x)) \n", + "end" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "rel_error_taylor (generic function with 1 method)" + ] + }, + "execution_count": 23, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "function rel_error_taylor(x)\n", + " return rel_error(sin(x), taylor_sin(x, 0.0)[1]) \n", + "end" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "631-element Array{Real,1}:\n", + " 0\n", + " 0.0\n", + " 0.0\n", + " 1.1566558078817942e-16\n", + " 0.0\n", + " 1.3883571906382453e-16\n", + " 0.0\n", + " 0.0\n", + " 1.7365752302283546e-16\n", + " 1.5440600601196135e-16\n", + " 1.3900944467230525e-16\n", + " 0.0\n", + " 1.1592625449066459e-16\n", + " ⋮\n", + " 2.684565604502478e-15\n", + " 2.839380050077419e-15\n", + " 3.0367153263107948e-15\n", + " 3.956085449056853e-15\n", + " 4.6990042927913394e-15\n", + " 5.625450115568505e-15\n", + " 7.319681171152798e-15\n", + " 1.062538454174323e-14\n", + " 1.8551186877114254e-14\n", + " 7.69251100506661e-14\n", + " 1.2727917079577463e-16\n", + " 2.0634396850290369e-16" + ] + }, + "execution_count": 24, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "xs = range(0, stop = 6.3, step = 0.01)\n", + "OX = [x for x in xs]\n", + "\n", + "# rysowane zbiory punktów:\n", + "res_cordic = [rel_error_cordic(x) for x in xs]\n", + "res_taylor = [rel_error_taylor(x) for x in xs]" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.plotly.v1+json": { + "data": [ + { + "colorbar": { + "title": "" + }, + "legendgroup": "cordic_sin", + "line": { + "color": "rgba(0, 154, 250, 1.000)", + "dash": "solid", + "shape": "linear", + "width": 1 + }, + "mode": "lines", + "name": "cordic_sin", + "showlegend": true, + "type": "scatter", + "x": [ + 0, + 0.01, + 0.02, + 0.03, + 0.04, + 0.05, + 0.06, + 0.07, + 0.08, + 0.09, + 0.1, + 0.11, + 0.12, + 0.13, + 0.14, + 0.15, + 0.16, + 0.17, + 0.18, + 0.19, + 0.2, + 0.21, + 0.22, + 0.23, + 0.24, + 0.25, + 0.26, + 0.27, + 0.28, + 0.29, + 0.3, + 0.31, + 0.32, + 0.33, + 0.34, + 0.35, + 0.36, + 0.37, + 0.38, + 0.39, + 0.4, + 0.41, + 0.42, + 0.43, + 0.44, + 0.45, + 0.46, + 0.47, + 0.48, + 0.49, + 0.5, + 0.51, + 0.52, + 0.53, + 0.54, + 0.55, + 0.56, + 0.57, + 0.58, + 0.59, + 0.6, + 0.61, + 0.62, + 0.63, + 0.64, + 0.65, + 0.66, + 0.67, + 0.68, + 0.69, + 0.7, + 0.71, + 0.72, + 0.73, + 0.74, + 0.75, + 0.76, + 0.77, + 0.78, + 0.79, + 0.8, + 0.81, + 0.82, + 0.83, + 0.84, + 0.85, + 0.86, + 0.87, + 0.88, + 0.89, + 0.9, + 0.91, + 0.92, + 0.93, + 0.94, + 0.95, + 0.96, + 0.97, + 0.98, + 0.99, + 1, + 1.01, + 1.02, + 1.03, + 1.04, + 1.05, + 1.06, + 1.07, + 1.08, + 1.09, + 1.1, + 1.11, + 1.12, + 1.13, + 1.14, + 1.15, + 1.16, + 1.17, + 1.18, + 1.19, + 1.2, + 1.21, + 1.22, + 1.23, + 1.24, + 1.25, + 1.26, + 1.27, + 1.28, + 1.29, + 1.3, + 1.31, + 1.32, + 1.33, + 1.34, + 1.35, + 1.36, + 1.37, + 1.38, + 1.39, + 1.4, + 1.41, + 1.42, + 1.43, + 1.44, + 1.45, + 1.46, + 1.47, + 1.48, + 1.49, + 1.5, + 1.51, + 1.52, + 1.53, + 1.54, + 1.55, + 1.56, + 1.57, + 1.58, + 1.59, + 1.6, + 1.61, + 1.62, + 1.63, + 1.64, + 1.65, + 1.66, + 1.67, + 1.68, + 1.69, + 1.7, + 1.71, + 1.72, + 1.73, + 1.74, + 1.75, + 1.76, + 1.77, + 1.78, + 1.79, + 1.8, + 1.81, + 1.82, + 1.83, + 1.84, + 1.85, + 1.86, + 1.87, + 1.88, + 1.89, + 1.9, + 1.91, + 1.92, + 1.93, + 1.94, + 1.95, + 1.96, + 1.97, + 1.98, + 1.99, + 2, + 2.01, + 2.02, + 2.03, + 2.04, + 2.05, + 2.06, + 2.07, + 2.08, + 2.09, + 2.1, + 2.11, + 2.12, + 2.13, + 2.14, + 2.15, + 2.16, + 2.17, + 2.18, + 2.19, + 2.2, + 2.21, + 2.22, + 2.23, + 2.24, + 2.25, + 2.26, + 2.27, + 2.28, + 2.29, + 2.3, + 2.31, + 2.32, + 2.33, + 2.34, + 2.35, + 2.36, + 2.37, + 2.38, + 2.39, + 2.4, + 2.41, + 2.42, + 2.43, + 2.44, + 2.45, + 2.46, + 2.47, + 2.48, + 2.49, + 2.5, + 2.51, + 2.52, + 2.53, + 2.54, + 2.55, + 2.56, + 2.57, + 2.58, + 2.59, + 2.6, + 2.61, + 2.62, + 2.63, + 2.64, + 2.65, + 2.66, + 2.67, + 2.68, + 2.69, + 2.7, + 2.71, + 2.72, + 2.73, + 2.74, + 2.75, + 2.76, + 2.77, + 2.78, + 2.79, + 2.8, + 2.81, + 2.82, + 2.83, + 2.84, + 2.85, + 2.86, + 2.87, + 2.88, + 2.89, + 2.9, + 2.91, + 2.92, + 2.93, + 2.94, + 2.95, + 2.96, + 2.97, + 2.98, + 2.99, + 3, + 3.01, + 3.02, + 3.03, + 3.04, + 3.05, + 3.06, + 3.07, + 3.08, + 3.09, + 3.1, + 3.11, + 3.12, + 3.13, + 3.14, + 3.15, + 3.16, + 3.17, + 3.18, + 3.19, + 3.2, + 3.21, + 3.22, + 3.23, + 3.24, + 3.25, + 3.26, + 3.27, + 3.28, + 3.29, + 3.3, + 3.31, + 3.32, + 3.33, + 3.34, + 3.35, + 3.36, + 3.37, + 3.38, + 3.39, + 3.4, + 3.41, + 3.42, + 3.43, + 3.44, + 3.45, + 3.46, + 3.47, + 3.48, + 3.49, + 3.5, + 3.51, + 3.52, + 3.53, + 3.54, + 3.55, + 3.56, + 3.57, + 3.58, + 3.59, + 3.6, + 3.61, + 3.62, + 3.63, + 3.64, + 3.65, + 3.66, + 3.67, + 3.68, + 3.69, + 3.7, + 3.71, + 3.72, + 3.73, + 3.74, + 3.75, + 3.76, + 3.77, + 3.78, + 3.79, + 3.8, + 3.81, + 3.82, + 3.83, + 3.84, + 3.85, + 3.86, + 3.87, + 3.88, + 3.89, + 3.9, + 3.91, + 3.92, + 3.93, + 3.94, + 3.95, + 3.96, + 3.97, + 3.98, + 3.99, + 4, + 4.01, + 4.02, + 4.03, + 4.04, + 4.05, + 4.06, + 4.07, + 4.08, + 4.09, + 4.1, + 4.11, + 4.12, + 4.13, + 4.14, + 4.15, + 4.16, + 4.17, + 4.18, + 4.19, + 4.2, + 4.21, + 4.22, + 4.23, + 4.24, + 4.25, + 4.26, + 4.27, + 4.28, + 4.29, + 4.3, + 4.31, + 4.32, + 4.33, + 4.34, + 4.35, + 4.36, + 4.37, + 4.38, + 4.39, + 4.4, + 4.41, + 4.42, + 4.43, + 4.44, + 4.45, + 4.46, + 4.47, + 4.48, + 4.49, + 4.5, + 4.51, + 4.52, + 4.53, + 4.54, + 4.55, + 4.56, + 4.57, + 4.58, + 4.59, + 4.6, + 4.61, + 4.62, + 4.63, + 4.64, + 4.65, + 4.66, + 4.67, + 4.68, + 4.69, + 4.7, + 4.71, + 4.72, + 4.73, + 4.74, + 4.75, + 4.76, + 4.77, + 4.78, + 4.79, + 4.8, + 4.81, + 4.82, + 4.83, + 4.84, + 4.85, + 4.86, + 4.87, + 4.88, + 4.89, + 4.9, + 4.91, + 4.92, + 4.93, + 4.94, + 4.95, + 4.96, + 4.97, + 4.98, + 4.99, + 5, + 5.01, + 5.02, + 5.03, + 5.04, + 5.05, + 5.06, + 5.07, + 5.08, + 5.09, + 5.1, + 5.11, + 5.12, + 5.13, + 5.14, + 5.15, + 5.16, + 5.17, + 5.18, + 5.19, + 5.2, + 5.21, + 5.22, + 5.23, + 5.24, + 5.25, + 5.26, + 5.27, + 5.28, + 5.29, + 5.3, + 5.31, + 5.32, + 5.33, + 5.34, + 5.35, + 5.36, + 5.37, + 5.38, + 5.39, + 5.4, + 5.41, + 5.42, + 5.43, + 5.44, + 5.45, + 5.46, + 5.47, + 5.48, + 5.49, + 5.5, + 5.51, + 5.52, + 5.53, + 5.54, + 5.55, + 5.56, + 5.57, + 5.58, + 5.59, + 5.6, + 5.61, + 5.62, + 5.63, + 5.64, + 5.65, + 5.66, + 5.67, + 5.68, + 5.69, + 5.7, + 5.71, + 5.72, + 5.73, + 5.74, + 5.75, + 5.76, + 5.77, + 5.78, + 5.79, + 5.8, + 5.81, + 5.82, + 5.83, + 5.84, + 5.85, + 5.86, + 5.87, + 5.88, + 5.89, + 5.9, + 5.91, + 5.92, + 5.93, + 5.94, + 5.95, + 5.96, + 5.97, + 5.98, + 5.99, + 6, + 6.01, + 6.02, + 6.03, + 6.04, + 6.05, + 6.06, + 6.07, + 6.08, + 6.09, + 6.1, + 6.11, + 6.12, + 6.13, + 6.14, + 6.15, + 6.16, + 6.17, + 6.18, + 6.19, + 6.2, + 6.21, + 6.22, + 6.23, + 6.24, + 6.25, + 6.26, + 6.27, + 6.28, + 6.29, + 6.3 + ], + "xaxis": "x", + "y": [ + 0, + 0.00016677621020938347, + 8.136330239480024e-05, + 3.1390036932902063e-06, + 4.3233507831440966e-05, + 3.3571872735614436e-05, + 6.630584034559424e-07, + 2.5506121816963454e-05, + 2.3042987121599685e-05, + 2.73189933923778e-06, + 1.7387761015487547e-05, + 1.622905631078576e-05, + 2.4754202598377782e-06, + 1.269274692074359e-05, + 1.2276610127581432e-05, + 2.418469066019671e-06, + 9.918746110841466e-06, + 9.782526483496634e-06, + 2.2695537474389798e-06, + 8.034939038575458e-06, + 2.6925764599116515e-06, + 3.922173541669577e-06, + 5.029558937496937e-06, + 4.1302849221522485e-06, + 3.7429998547060105e-06, + 4.202835570400495e-06, + 3.826632029978928e-06, + 3.546260872387151e-06, + 3.508730935892312e-06, + 3.638754591578394e-06, + 3.331954809314995e-06, + 2.1453600656640507e-06, + 3.426762875544479e-06, + 5.162888936079118e-07, + 5.036864880984133e-06, + 5.093171504887845e-06, + 6.086293275469183e-07, + 4.467130417358192e-06, + 4.505420244303924e-06, + 7.120645611256103e-07, + 3.9369354085236545e-06, + 9.838858437848442e-07, + 7.77418578690557e-07, + 3.51593352124834e-06, + 1.0076909122430796e-06, + 1.655158311995286e-06, + 2.4043822254662743e-06, + 1.7703119172759281e-06, + 1.6291193397887973e-06, + 2.140353871487183e-06, + 1.7477529186408324e-06, + 1.6301702379807873e-06, + 1.4104744250895807e-06, + 1.731946581448855e-06, + 1.6113385332296432e-06, + 1.2375890499695025e-06, + 1.7058808494438454e-06, + 1.9600509995603334e-06, + 7.145830791281689e-07, + 2.0262457900948957e-06, + 1.9078783511076866e-06, + 5.942311085682186e-07, + 2.0162739733958558e-06, + 1.8811682445964538e-06, + 4.748548450715459e-07, + 1.9710949121281292e-06, + 1.8350042720552876e-06, + 3.7853504295425717e-07, + 1.921721227254371e-06, + 2.0203008726931996e-07, + 1.4232904296101666e-07, + 2.1377895923441237e-06, + 2.8756659510980317e-07, + 2.2727723705575575e-07, + 1.9531920056448033e-06, + 3.2859969611650417e-07, + 2.8244905664856816e-07, + 1.7764930557950882e-06, + 3.782687870872815e-07, + 1.3037407793856227e-06, + 7.562428766961543e-07, + 1.1517435527049867e-06, + 1.1665589692723913e-06, + 7.718802095392873e-07, + 9.991396451326738e-07, + 1.0481845922212602e-06, + 7.658733146296648e-07, + 9.028695233238258e-07, + 6.400108386993461e-07, + 1.067184758690287e-06, + 5.13299710298778e-07, + 1.125945954653286e-06, + 1.0433750814731784e-06, + 4.37393920569202e-07, + 1.092463736780041e-06, + 1.0261270610232113e-06, + 3.6806826159369194e-07, + 1.0720933846894787e-06, + 1.0155213292289535e-06, + 3.1211025961174296e-07, + 1.038080622692402e-06, + 1.133358220154902e-06, + 1.1556219672455318e-07, + 1.1435251933148351e-06, + 1.0853293553008166e-06, + 7.469569308172553e-08, + 1.0428158421681541e-06, + 1.0377824005839457e-06, + 1.0215927043495327e-07, + 9.331099222543582e-07, + 9.367014931935066e-07, + 1.2527539449564007e-07, + 8.293700305166013e-07, + 6.722973556330139e-07, + 3.0496259831710155e-07, + 5.755661706218008e-07, + 5.975777994927455e-07, + 3.041907552177807e-07, + 5.099218360758454e-07, + 3.428481963718889e-07, + 3.045599449936168e-07, + 4.4004290757728077e-07, + 3.344361113581753e-07, + 2.9715154282543336e-07, + 3.856900311337885e-07, + 5.779055118798982e-07, + 3.920394806861428e-09, + 5.716259302950991e-07, + 5.373507344029019e-07, + 1.9963592243478292e-08, + 5.272117775293123e-07, + 4.96161097507389e-07, + 3.7939407172573845e-08, + 4.4946334855629977e-07, + 4.492272658549481e-07, + 4.0134392134995915e-08, + 3.7986072515472317e-07, + 2.9861996526012693e-07, + 1.1514945599244228e-07, + 2.472596866977524e-07, + 1.2707638303389167e-07, + 1.0101683861908647e-07, + 1.9795947937788527e-07, + 1.0857965381340321e-07, + 9.655786186190439e-08, + 1.5170517635756876e-07, + 9.15089264175772e-08, + 7.949869072810901e-08, + 1.0801315162126919e-07, + 7.201338636425357e-08, + 7.530250679868071e-08, + 5.360316800541461e-08, + 6.095019097460274e-08, + 4.843356488266589e-08, + 1.9091332503951412e-08, + 2.4623657666393807e-08, + 1.5299334820649933e-08, + 4.184901531050682e-10, + 5.843648817360347e-09, + 1.32812232699413e-08, + 3.097778673579372e-08, + 2.9584889621572948e-08, + 3.7248187345509306e-08, + 5.8951187874844764e-08, + 5.649112025685202e-08, + 8.308664418800058e-08, + 6.201118127497604e-08, + 1.1423629772877784e-07, + 1.1998264064133654e-07, + 7.467994129291393e-08, + 1.571873667710581e-07, + 1.6368068361431314e-07, + 8.468085985132633e-08, + 1.9975572469275567e-07, + 7.555246887154466e-08, + 9.806778597773041e-08, + 2.531176187765936e-07, + 8.328594611592928e-08, + 2.2064785239322082e-08, + 3.9036648135312413e-07, + 5.238057399383078e-09, + 6.125737041506026e-09, + 4.571511566609404e-07, + 1.864896655056474e-08, + 8.302553503456434e-09, + 5.346147164397727e-07, + 4.250570248570329e-08, + 2.7745708880905565e-08, + 5.227345654431287e-07, + 6.4704613530997e-08, + 2.586357796387307e-07, + 3.872281281805299e-07, + 3.7051704553938665e-07, + 2.6786272347036687e-07, + 4.386372659046718e-07, + 2.2977218046915754e-07, + 2.678405862825747e-07, + 5.094642458537421e-07, + 2.2382578501459784e-07, + 2.664513264974218e-07, + 5.762666292911002e-07, + 2.2087115826361445e-07, + 6.770720063221348e-08, + 8.306921804074056e-07, + 2.13505643220662e-08, + 4.8021337987529953e-08, + 9.231098709152851e-07, + 6.800716322105629e-09, + 1.598798349995861e-08, + 1.0024772605874508e-06, + 4.6219775968058614e-08, + 1.2588494303194095e-08, + 1.0412039174972583e-06, + 9.473809826842581e-08, + 2.0131257939343222e-07, + 9.223819493862206e-07, + 2.9866983962347206e-07, + 2.4781101602778816e-07, + 9.498415955148546e-07, + 3.5131966648986526e-07, + 3.0794797357366016e-07, + 9.636607159482467e-07, + 4.2218146388662263e-07, + 9.03925746048819e-07, + 9.84390951254022e-07, + 4.915100587218641e-07, + 9.13526431200576e-07, + 6.914921097749508e-07, + 8.894983742138714e-07, + 6.049099099788847e-07, + 6.610646303786138e-07, + 9.857698054286815e-07, + 5.91046215479638e-07, + 6.415662310110644e-07, + 1.1152953851316633e-06, + 5.634574682705778e-07, + 1.5686851206750682e-06, + 1.7294887784038136e-07, + 1.7714006072746958e-06, + 1.730807210270564e-06, + 1.1370912493636692e-07, + 1.9550687670502676e-06, + 1.9004281422602033e-06, + 6.169515151094907e-08, + 2.1346605559649647e-06, + 1.0156726576107437e-07, + 4.59471018255886e-07, + 1.9971877127367594e-06, + 6.49095594909011e-07, + 5.580124089269955e-07, + 2.0516141421743213e-06, + 7.586500089476397e-07, + 7.305469093531957e-07, + 2.09912280446682e-06, + 9.053717555265411e-07, + 8.432196642332121e-07, + 2.1558567855673484e-06, + 1.0443759587273774e-06, + 1.3640706883984284e-06, + 1.8317419696168569e-06, + 1.6029438530035396e-06, + 1.5508927949937706e-06, + 1.4116660095779266e-06, + 1.8041486808219034e-06, + 1.7812805373664235e-06, + 1.3981003550027754e-06, + 2.1205826278387086e-06, + 2.01837435276314e-06, + 1.4069046489670083e-06, + 2.3869364199054503e-06, + 3.055472779889327e-06, + 5.9525278057603e-07, + 3.5275017088594584e-06, + 3.2451697405909503e-07, + 5.206740016662081e-07, + 3.957380844175005e-06, + 2.1045316756134873e-07, + 3.995349236020163e-07, + 4.497519386231671e-06, + 7.110066670940273e-08, + 2.0749269980682052e-07, + 5.087159697949744e-06, + 2.3684663439354745e-06, + 2.8857187504666256e-06, + 2.8793476715228005e-06, + 2.813076818257833e-06, + 3.0369214769282343e-06, + 3.519693799152605e-06, + 3.3966848454070925e-06, + 3.180636263123593e-06, + 4.216328071726493e-06, + 4.0555015342576406e-06, + 3.3786228223701446e-06, + 5.086239683434251e-06, + 3.083720091452432e-06, + 1.7670118840319036e-06, + 8.24643024824966e-06, + 1.1984652016920644e-06, + 1.7813870207188e-06, + 1.0255544061830541e-05, + 1.1030608723380003e-06, + 1.481504318993448e-06, + 1.3336355554527497e-05, + 8.290889308929516e-07, + 1.3901794832688515e-06, + 1.832596420123065e-05, + 5.131738016905805e-07, + 1.995222992217299e-06, + 2.9945361668663875e-05, + 4.807132363976872e-06, + 4.688438992266793e-06, + 4.824133555540869e-05, + 1.396092878441276e-05, + 2.2833140359470374e-05, + 0.0009162939252287975, + 2.6267555460253545e-05, + 1.4044966400875843e-05, + 6.447328501756225e-05, + 4.0995280450886906e-06, + 4.262067089241002e-06, + 3.220806629035887e-05, + 1.1201119861059786e-06, + 1.001301644934874e-06, + 1.8534568946130973e-05, + 2.158866885356622e-06, + 1.1956388277094093e-06, + 1.3352638857834146e-05, + 2.0570861326432168e-06, + 1.0462916551747843e-05, + 1.0196982769604098e-05, + 2.0465596292309897e-06, + 8.19624262246364e-06, + 8.175017954978889e-06, + 2.0006451794667927e-06, + 6.658052733939689e-06, + 4.822907663164333e-06, + 3.61899120512606e-06, + 3.954743020567983e-06, + 4.005966844965583e-06, + 3.3625420622151497e-06, + 3.2873397026217485e-06, + 3.305983763685475e-06, + 4.148578293435779e-06, + 2.7222396550992205e-06, + 2.7756930305496353e-06, + 3.879677496428694e-06, + 2.2804646305679867e-06, + 5.018238351694565e-06, + 4.0805779507409517e-07, + 4.347856314313516e-06, + 4.4251302377706235e-06, + 5.04583277085943e-07, + 3.836018227892394e-06, + 3.896304562934789e-06, + 6.163513316330261e-07, + 3.375757717404599e-06, + 3.3986542643076634e-06, + 6.915592968933292e-07, + 3.005778672939432e-06, + 2.2681131838795328e-06, + 1.4859629015025608e-06, + 1.949838890730368e-06, + 2.0090380645775204e-06, + 1.986834457572499e-06, + 1.7226285234092275e-06, + 1.7487197709525904e-06, + 1.9547860750073204e-06, + 1.4921552434383949e-06, + 1.5444957899764357e-06, + 1.914601191900645e-06, + 1.264459609441954e-06, + 9.848234452063935e-07, + 2.234998440843193e-06, + 7.481312408358838e-07, + 8.490097705138624e-07, + 2.1689190074666352e-06, + 6.327367039752739e-07, + 2.2616472531561394e-06, + 2.119452681413545e-06, + 5.114710425662731e-07, + 2.201217811496104e-06, + 2.059034261620805e-06, + 4.0908094309487583e-07, + 2.140352606776852e-06, + 2.061257949573939e-06, + 1.0247215376214176e-07, + 1.8648661373086343e-06, + 1.887077311004228e-06, + 1.5877067119790254e-07, + 1.7019552093789325e-06, + 1.710597505763873e-06, + 4.92810059656002e-07, + 1.5343415199685513e-06, + 6.059462603123253e-07, + 1.0829064471685249e-06, + 7.128600803509171e-07, + 6.365731024612185e-07, + 9.57756516473787e-07, + 7.302766113638304e-07, + 8.05125478385067e-07, + 8.586151586514856e-07, + 7.290279407799948e-07, + 7.16455518140869e-07, + 4.657120386904872e-07, + 1.0213885739977663e-06, + 3.4364837794771835e-07, + 3.7429386287717867e-07, + 1.0013736219850955e-06, + 2.847647688737152e-07, + 3.0829797466031765e-07, + 9.824837392870833e-07, + 2.2433546871339207e-07, + 2.517783048808815e-07, + 1.128294750188373e-06, + 1.7642364675183023e-07, + 5.0934221055954684e-08, + 1.1161814365581977e-06, + 6.311459513195471e-09, + 2.3015511602970997e-08, + 1.0132834558390009e-06, + 3.886790357451061e-08, + 1.8704563664921285e-08, + 9.094312233805292e-07, + 8.452385079865297e-08, + 4.301701755712191e-08, + 8.18912778542283e-07, + 1.0343393315847527e-07, + 7.163637255801159e-07, + 5.616308845324068e-07, + 2.8536390428618235e-07, + 4.757546091790386e-07, + 4.946994330915469e-07, + 2.859286173694266e-07, + 4.217731838016017e-07, + 4.166072650637562e-07, + 2.8370025285791154e-07, + 3.5523151711040205e-07, + 3.653514083601695e-07, + 2.786078248160347e-07, + 3.0896165467210857e-07, + 6.053586593679036e-07, + 1.3447001654204897e-08, + 2.57782116256493e-08, + 5.276054740913599e-07, + 6.628983542078349e-09, + 7.406879953632981e-09, + 4.5395549576686275e-07, + 2.423065465542607e-08, + 3.866642901383941e-07, + 3.850923501930089e-07, + 3.1862487695475616e-08, + 3.2342231229948956e-07, + 2.48689910697336e-07, + 1.0631111690031574e-07, + 2.052096534466154e-07, + 2.006694486392371e-07, + 9.27927010605262e-08, + 1.565944576295951e-07, + 1.5475468335068268e-07, + 8.606391704832061e-08, + 1.1971665101309176e-07, + 1.1264370236996784e-07, + 9.077683600735547e-08, + 8.336950459274067e-08, + 5.6409644619865374e-08, + 8.069380774109636e-08, + 3.4740763775934173e-08, + 3.0766812476665594e-08, + 4.572964385573037e-08, + 1.1988311290631891e-08, + 5.063895784809524e-09, + 5.6278649133510036e-09, + 7.920037535984654e-09, + 2.1556471266115275e-08, + 2.3833802023791726e-08, + 4.199092915875403e-08, + 5.31872902277771e-08, + 5.53685538557165e-08, + 6.944798944105674e-08, + 6.456420091904043e-08, + 1.0853878097426772e-07, + 7.220565757094848e-08, + 8.298595126383666e-08, + 1.526666354146231e-07, + 8.484078569134354e-08, + 1.9301191262483898e-07, + 2.03085300315276e-07, + 9.763678185806494e-08, + 2.510941593394132e-07, + 2.5512528481343864e-07, + 1.0496458006111885e-07, + 3.0465017587011186e-07, + 3.888842803827447e-07, + 3.15977907899036e-08, + 4.300444487191299e-07, + 4.5947022525802873e-07, + 4.457358351319885e-08, + 4.788229184872339e-07, + 5.078125138403814e-07, + 6.690656819358082e-08, + 5.19838810060751e-07, + 5.527621816662534e-07, + 9.11221885823643e-08, + 5.501908702910252e-07, + 3.9482578008442074e-07, + 2.76871433675417e-07, + 4.662333038511122e-07, + 4.559936537230247e-07, + 2.8620533561917043e-07, + 5.332890700312287e-07, + 5.348517020233348e-07, + 2.835033564484093e-07, + 6.107220931107148e-07, + 6.057075682971134e-07, + 2.873389312475139e-07, + 6.845123029909193e-07, + 8.534060298010892e-07, + 2.9207088538187996e-08, + 9.509902727269769e-07, + 9.515111331562438e-07, + 5.7404725068603334e-08, + 1.0205031574441393e-06, + 1.0562907048235364e-06, + 1.005384109996792e-07, + 1.039464975621465e-06, + 1.1139116336251914e-06, + 1.36414534167152e-07, + 1.0775332335147047e-06, + 1.0052119324302351e-06, + 3.3541729890938936e-07, + 9.618306543775862e-07, + 1.0354124374508527e-06, + 3.94521951820584e-07, + 9.930902089692318e-07, + 5.050364753963192e-07, + 4.668265763819949e-07, + 1.0054530103180947e-06, + 5.88467012946433e-07, + 5.62248046394485e-07, + 1.0238335250566913e-06, + 6.645267727829921e-07, + 9.52709522879686e-07, + 7.341953243087967e-07, + 1.0817970046836948e-06, + 1.0544745942687076e-06, + 4.866717243418797e-07, + 1.193160402425052e-06, + 1.1835608470314852e-06, + 4.5626633773964563e-07, + 1.334307392340307e-06, + 3.312130948484368e-07, + 1.8055919043728453e-06, + 2.06774261109133e-07, + 2.836015693609774e-07, + 1.9864739426616124e-06, + 1.4605625775180768e-07, + 2.103407559202128e-06, + 2.17030350341847e-06, + 9.315494412835267e-08, + 2.174560512392218e-06, + 1.8601184364824968e-06, + 4.25979002097143e-07, + 1.7713014101550298e-06, + 1.8698835504719406e-06, + 5.198324048482947e-07, + 1.8118587603422188e-06, + 1.906184442626963e-06, + 1.0266800482336264e-06, + 1.8377179548226696e-06, + 1.956918135623305e-06, + 1.1736278415310166e-06, + 1.8828777561955507e-06, + 1.6266560602723885e-06, + 1.7207352496750878e-06, + 1.5351365186696437e-06, + 1.653151707950917e-06, + 1.93280717443021e-06, + 1.5007195270023523e-06, + 1.6601359462348644e-06, + 2.196477641939507e-06, + 1.480250500561593e-06, + 1.6743668109827781e-06, + 2.4621954448640057e-06, + 1.50091403140485e-06, + 2.87581473136407e-06, + 3.565786788860893e-06, + 6.786619509708832e-07, + 4.069863882813699e-06, + 4.002430698566922e-06, + 6.108526007401109e-07, + 4.551150710923135e-06, + 4.593017026756196e-06, + 5.046942983055157e-07, + 5.1621753681482535e-06, + 5.1778510726075526e-06, + 3.743637173893063e-07, + 5.541757288214633e-06, + 3.0786181268314195e-06, + 3.0758118249191078e-06, + 3.4580035041185573e-06, + 3.605391636253404e-06, + 3.24586102323824e-06, + 3.6286138811564624e-06, + 4.2983929320823735e-06, + 3.4190614871136356e-06, + 5.247080316631971e-06, + 5.121680773962285e-06, + 3.658639119748256e-06, + 6.290949921962391e-06, + 8.098307662173378e-06, + 2.011285907818575e-06, + 9.81150348802739e-06, + 1.0121101560280998e-05, + 2.0836875586024124e-06, + 1.2289029141254689e-05, + 1.291463852107093e-05, + 6.539491072073676e-08, + 1.6140902382078228e-05, + 1.7234689161566977e-05, + 6.715634932876199e-07, + 2.2595986357094136e-05, + 2.377734868469825e-05, + 5.506161673691973e-06, + 3.080678784177108e-05, + 3.913736395244706e-05, + 1.202761233704277e-05, + 6.706121953572653e-05, + 0.00012328971426099088, + 0.00014728921364518045, + 0.0002543247898438008, + 9.919388454847705e-05 + ], + "yaxis": "y", + "zmax": null, + "zmin": null + } + ], + "layout": { + "annotations": [], + "height": 400, + "legend": { + "bgcolor": "rgba(255, 255, 255, 1.000)", + "bordercolor": "rgba(0, 0, 0, 1.000)", + "borderwidth": 1, + "font": { + "color": "rgba(0, 0, 0, 1.000)", + "family": "sans-serif", + "size": 11 + }, + "tracegroupgap": 0, + "traceorder": "normal", + "x": 1, + "xanchor": "auto", + "y": 1, + "yanchor": "auto" + }, + "margin": { + "b": 20, + "l": 0, + "r": 0, + "t": 20 + }, + "paper_bgcolor": "rgba(255, 255, 255, 1.000)", + "plot_bgcolor": "rgba(255, 255, 255, 1.000)", + "showlegend": true, + "width": 600, + "xaxis": { + "anchor": "y", + "domain": [ + 0.1209135316418781, + 0.9934383202099738 + ], + "gridcolor": "rgba(0, 0, 0, 0.100)", + "gridwidth": 0.5, + "linecolor": "rgba(0, 0, 0, 1.000)", + "mirror": false, + "range": [ + -0.189, + 6.489 + ], + "showgrid": true, + "showline": true, + "showticklabels": true, + "tickangle": 0, + "tickcolor": "rgb(0, 0, 0)", + "tickfont": { + "color": "rgba(0, 0, 0, 1.000)", + "family": "sans-serif", + "size": 11 + }, + "tickmode": "array", + "ticks": "inside", + "ticktext": [ + "0", + "1", + "2", + "3", + "4", + "5", + "6" + ], + "tickvals": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6 + ], + "title": "x", + "titlefont": { + "color": "rgba(0, 0, 0, 1.000)", + "family": "sans-serif", + "size": 15 + }, + "type": "-", + "visible": true, + "zeroline": false, + "zerolinecolor": "rgba(0, 0, 0, 1.000)" + }, + "yaxis": { + "anchor": "x", + "domain": [ + 0.07581474190726165, + 0.9901574803149606 + ], + "gridcolor": "rgba(0, 0, 0, 0.100)", + "gridwidth": 0.5, + "linecolor": "rgba(0, 0, 0, 1.000)", + "mirror": false, + "range": [ + -2.7488817756863925e-05, + 0.0009437827429856615 + ], + "showgrid": true, + "showline": true, + "showticklabels": true, + "tickangle": 0, + "tickcolor": "rgb(0, 0, 0)", + "tickfont": { + "color": "rgba(0, 0, 0, 1.000)", + "family": "sans-serif", + "size": 11 + }, + "tickmode": "array", + "ticks": "inside", + "ticktext": [ + "0.0000", + "0.0002", + "0.0004", + "0.0006", + "0.0008" + ], + "tickvals": [ + 0, + 0.0002, + 0.0004, + 0.0006000000000000001, + 0.0008 + ], + "title": "relative error", + "titlefont": { + "color": "rgba(0, 0, 0, 1.000)", + "family": "sans-serif", + "size": 15 + }, + "type": "-", + "visible": true, + "zeroline": false, + "zerolinecolor": "rgba(0, 0, 0, 1.000)" + } + } + }, + "text/html": [ + "\n", + "\n", + " \n", + " Plots.jl\n", + " \n", + " \n", + " \n", + " \n", + "
\n", + " \n", + "\n", + " \n", + "\n" + ] + }, + "execution_count": 33, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Błąd względny obliczania sinusa Cordicem na przedziale (0, 6.3)\n", + "plot(OX, res_cordic, xguide = \"x\", yguide = \"relative error\", label = \"cordic_sin\")" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.plotly.v1+json": { + "data": [ + { + "colorbar": { + "title": "" + }, + "legendgroup": "taylor_sin", + "line": { + "color": "rgba(0, 154, 250, 1.000)", + "dash": "solid", + "shape": "linear", + "width": 1 + }, + "mode": "lines", + "name": "taylor_sin", + "showlegend": true, + "type": "scatter", + "x": [ + 0, + 0.01, + 0.02, + 0.03, + 0.04, + 0.05, + 0.06, + 0.07, + 0.08, + 0.09, + 0.1, + 0.11, + 0.12, + 0.13, + 0.14, + 0.15, + 0.16, + 0.17, + 0.18, + 0.19, + 0.2, + 0.21, + 0.22, + 0.23, + 0.24, + 0.25, + 0.26, + 0.27, + 0.28, + 0.29, + 0.3, + 0.31, + 0.32, + 0.33, + 0.34, + 0.35, + 0.36, + 0.37, + 0.38, + 0.39, + 0.4, + 0.41, + 0.42, + 0.43, + 0.44, + 0.45, + 0.46, + 0.47, + 0.48, + 0.49, + 0.5, + 0.51, + 0.52, + 0.53, + 0.54, + 0.55, + 0.56, + 0.57, + 0.58, + 0.59, + 0.6, + 0.61, + 0.62, + 0.63, + 0.64, + 0.65, + 0.66, + 0.67, + 0.68, + 0.69, + 0.7, + 0.71, + 0.72, + 0.73, + 0.74, + 0.75, + 0.76, + 0.77, + 0.78, + 0.79, + 0.8, + 0.81, + 0.82, + 0.83, + 0.84, + 0.85, + 0.86, + 0.87, + 0.88, + 0.89, + 0.9, + 0.91, + 0.92, + 0.93, + 0.94, + 0.95, + 0.96, + 0.97, + 0.98, + 0.99, + 1, + 1.01, + 1.02, + 1.03, + 1.04, + 1.05, + 1.06, + 1.07, + 1.08, + 1.09, + 1.1, + 1.11, + 1.12, + 1.13, + 1.14, + 1.15, + 1.16, + 1.17, + 1.18, + 1.19, + 1.2, + 1.21, + 1.22, + 1.23, + 1.24, + 1.25, + 1.26, + 1.27, + 1.28, + 1.29, + 1.3, + 1.31, + 1.32, + 1.33, + 1.34, + 1.35, + 1.36, + 1.37, + 1.38, + 1.39, + 1.4, + 1.41, + 1.42, + 1.43, + 1.44, + 1.45, + 1.46, + 1.47, + 1.48, + 1.49, + 1.5, + 1.51, + 1.52, + 1.53, + 1.54, + 1.55, + 1.56, + 1.57, + 1.58, + 1.59, + 1.6, + 1.61, + 1.62, + 1.63, + 1.64, + 1.65, + 1.66, + 1.67, + 1.68, + 1.69, + 1.7, + 1.71, + 1.72, + 1.73, + 1.74, + 1.75, + 1.76, + 1.77, + 1.78, + 1.79, + 1.8, + 1.81, + 1.82, + 1.83, + 1.84, + 1.85, + 1.86, + 1.87, + 1.88, + 1.89, + 1.9, + 1.91, + 1.92, + 1.93, + 1.94, + 1.95, + 1.96, + 1.97, + 1.98, + 1.99, + 2, + 2.01, + 2.02, + 2.03, + 2.04, + 2.05, + 2.06, + 2.07, + 2.08, + 2.09, + 2.1, + 2.11, + 2.12, + 2.13, + 2.14, + 2.15, + 2.16, + 2.17, + 2.18, + 2.19, + 2.2, + 2.21, + 2.22, + 2.23, + 2.24, + 2.25, + 2.26, + 2.27, + 2.28, + 2.29, + 2.3, + 2.31, + 2.32, + 2.33, + 2.34, + 2.35, + 2.36, + 2.37, + 2.38, + 2.39, + 2.4, + 2.41, + 2.42, + 2.43, + 2.44, + 2.45, + 2.46, + 2.47, + 2.48, + 2.49, + 2.5, + 2.51, + 2.52, + 2.53, + 2.54, + 2.55, + 2.56, + 2.57, + 2.58, + 2.59, + 2.6, + 2.61, + 2.62, + 2.63, + 2.64, + 2.65, + 2.66, + 2.67, + 2.68, + 2.69, + 2.7, + 2.71, + 2.72, + 2.73, + 2.74, + 2.75, + 2.76, + 2.77, + 2.78, + 2.79, + 2.8, + 2.81, + 2.82, + 2.83, + 2.84, + 2.85, + 2.86, + 2.87, + 2.88, + 2.89, + 2.9, + 2.91, + 2.92, + 2.93, + 2.94, + 2.95, + 2.96, + 2.97, + 2.98, + 2.99, + 3, + 3.01, + 3.02, + 3.03, + 3.04, + 3.05, + 3.06, + 3.07, + 3.08, + 3.09, + 3.1, + 3.11, + 3.12, + 3.13, + 3.14, + 3.15, + 3.16, + 3.17, + 3.18, + 3.19, + 3.2, + 3.21, + 3.22, + 3.23, + 3.24, + 3.25, + 3.26, + 3.27, + 3.28, + 3.29, + 3.3, + 3.31, + 3.32, + 3.33, + 3.34, + 3.35, + 3.36, + 3.37, + 3.38, + 3.39, + 3.4, + 3.41, + 3.42, + 3.43, + 3.44, + 3.45, + 3.46, + 3.47, + 3.48, + 3.49, + 3.5, + 3.51, + 3.52, + 3.53, + 3.54, + 3.55, + 3.56, + 3.57, + 3.58, + 3.59, + 3.6, + 3.61, + 3.62, + 3.63, + 3.64, + 3.65, + 3.66, + 3.67, + 3.68, + 3.69, + 3.7, + 3.71, + 3.72, + 3.73, + 3.74, + 3.75, + 3.76, + 3.77, + 3.78, + 3.79, + 3.8, + 3.81, + 3.82, + 3.83, + 3.84, + 3.85, + 3.86, + 3.87, + 3.88, + 3.89, + 3.9, + 3.91, + 3.92, + 3.93, + 3.94, + 3.95, + 3.96, + 3.97, + 3.98, + 3.99, + 4, + 4.01, + 4.02, + 4.03, + 4.04, + 4.05, + 4.06, + 4.07, + 4.08, + 4.09, + 4.1, + 4.11, + 4.12, + 4.13, + 4.14, + 4.15, + 4.16, + 4.17, + 4.18, + 4.19, + 4.2, + 4.21, + 4.22, + 4.23, + 4.24, + 4.25, + 4.26, + 4.27, + 4.28, + 4.29, + 4.3, + 4.31, + 4.32, + 4.33, + 4.34, + 4.35, + 4.36, + 4.37, + 4.38, + 4.39, + 4.4, + 4.41, + 4.42, + 4.43, + 4.44, + 4.45, + 4.46, + 4.47, + 4.48, + 4.49, + 4.5, + 4.51, + 4.52, + 4.53, + 4.54, + 4.55, + 4.56, + 4.57, + 4.58, + 4.59, + 4.6, + 4.61, + 4.62, + 4.63, + 4.64, + 4.65, + 4.66, + 4.67, + 4.68, + 4.69, + 4.7, + 4.71, + 4.72, + 4.73, + 4.74, + 4.75, + 4.76, + 4.77, + 4.78, + 4.79, + 4.8, + 4.81, + 4.82, + 4.83, + 4.84, + 4.85, + 4.86, + 4.87, + 4.88, + 4.89, + 4.9, + 4.91, + 4.92, + 4.93, + 4.94, + 4.95, + 4.96, + 4.97, + 4.98, + 4.99, + 5, + 5.01, + 5.02, + 5.03, + 5.04, + 5.05, + 5.06, + 5.07, + 5.08, + 5.09, + 5.1, + 5.11, + 5.12, + 5.13, + 5.14, + 5.15, + 5.16, + 5.17, + 5.18, + 5.19, + 5.2, + 5.21, + 5.22, + 5.23, + 5.24, + 5.25, + 5.26, + 5.27, + 5.28, + 5.29, + 5.3, + 5.31, + 5.32, + 5.33, + 5.34, + 5.35, + 5.36, + 5.37, + 5.38, + 5.39, + 5.4, + 5.41, + 5.42, + 5.43, + 5.44, + 5.45, + 5.46, + 5.47, + 5.48, + 5.49, + 5.5, + 5.51, + 5.52, + 5.53, + 5.54, + 5.55, + 5.56, + 5.57, + 5.58, + 5.59, + 5.6, + 5.61, + 5.62, + 5.63, + 5.64, + 5.65, + 5.66, + 5.67, + 5.68, + 5.69, + 5.7, + 5.71, + 5.72, + 5.73, + 5.74, + 5.75, + 5.76, + 5.77, + 5.78, + 5.79, + 5.8, + 5.81, + 5.82, + 5.83, + 5.84, + 5.85, + 5.86, + 5.87, + 5.88, + 5.89, + 5.9, + 5.91, + 5.92, + 5.93, + 5.94, + 5.95, + 5.96, + 5.97, + 5.98, + 5.99, + 6, + 6.01, + 6.02, + 6.03, + 6.04, + 6.05, + 6.06, + 6.07, + 6.08, + 6.09, + 6.1, + 6.11, + 6.12, + 6.13, + 6.14, + 6.15, + 6.16, + 6.17, + 6.18, + 6.19, + 6.2, + 6.21, + 6.22, + 6.23, + 6.24, + 6.25, + 6.26, + 6.27, + 6.28, + 6.29, + 6.3 + ], + "xaxis": "x", + "y": [ + 0, + 0, + 0, + 1.1566558078817942e-16, + 0, + 1.3883571906382453e-16, + 0, + 0, + 1.7365752302283546e-16, + 1.5440600601196135e-16, + 1.3900944467230525e-16, + 0, + 1.1592625449066459e-16, + 2.1410698643685947e-16, + 0, + 1.8573288595220103e-16, + 1.742147128409055e-16, + 0, + 1.550334678484203e-16, + 0, + 1.3970739975089753e-16, + 0, + 1.2718518789423714e-16, + 0, + 0, + 0, + 2.159290184445561e-16, + 2.0811626825981194e-16, + 2.0086852401853256e-16, + 3.882547247947197e-16, + 0, + 0, + 1.7646869750723767e-16, + 0, + 0, + 1.6188832364718382e-16, + 0, + 1.5350880057750542e-16, + 0, + 0, + 1.4254888689156825e-16, + 0, + 2.722733448755912e-16, + 0, + 1.3032638622170484e-16, + 1.2762195364440624e-16, + 1.250397295546284e-16, + 0, + 0, + 1.1795175876740006e-16, + 0, + 0, + 1.1171940072339029e-16, + 2.196142042736769e-16, + 4.3187913028824577e-16, + 0, + 2.090082590569337e-16, + 0, + 0, + 1.9955082741286808e-16, + 0, + 0, + 3.8215347367222716e-16, + 1.8844655912799408e-16, + 0, + 1.8345141498591358e-16, + 0, + 1.7878390942818387e-16, + 0, + 3.4883210459118443e-16, + 0, + 3.4064605854503194e-16, + 1.6837258611209998e-16, + 0, + 1.6465118319330336e-16, + 0, + 0, + 0, + 1.578637159448543e-16, + 1.5629167454196935e-16, + 1.5476595775927705e-16, + 1.532849212179731e-16, + 0, + 1.5045071507872196e-16, + 1.4909464612640263e-16, + 1.477774499413219e-16, + 0, + 1.452546110508059e-16, + 0, + 1.4287265341439178e-16, + 1.417317611561603e-16, + 1.406228962336717e-16, + 1.3954509350727686e-16, + 0, + 0, + 0, + 1.3552666648263445e-16, + 1.345911326469577e-16, + 1.3368170256426966e-16, + 0, + 0, + 0, + 1.3029134757883222e-16, + 2.5900486029405794e-16, + 0, + 1.2799092667421588e-16, + 0, + 1.2656433953411267e-16, + 1.2588164830089048e-16, + 1.2521873705069078e-16, + 1.2457516335464547e-16, + 0, + 1.233443483196787e-16, + 1.2275630930933019e-16, + 0, + 0, + 1.2109721422220227e-16, + 0, + 2.4015050945509647e-16, + 2.391771081954276e-16, + 0, + 0, + 1.1822210473839875e-16, + 0, + 1.1738653067416278e-16, + 1.1699062366037716e-16, + 1.1660899981092887e-16, + 0, + 1.1588774994706041e-16, + 0, + 1.1522117101256962e-16, + 1.1490791931420558e-16, + 1.1460779588236164e-16, + 1.1432063831500512e-16, + 0, + 1.1378461074234033e-16, + 0, + 1.1329869284272903e-16, + 0, + 1.1286185879983775e-16, + 1.1266155855947696e-16, + 1.124731953208035e-16, + 1.122966717242045e-16, + 1.121318968823932e-16, + 0, + 1.1183726159005393e-16, + 0, + 0, + 0, + 0, + 0, + 0, + 1.1116569019772567e-16, + 0, + 0, + 0, + 0, + 0, + 1.1102700484490524e-16, + 0, + 0, + 0, + 1.1115683074271789e-16, + 0, + 0, + 0, + 0, + 1.1157085733943192e-16, + 1.1168760293015215e-16, + 0, + 1.11955472547079e-16, + 0, + 1.1226964448329402e-16, + 0, + 1.126307622356178e-16, + 1.1282915453744712e-16, + 0, + 0, + 1.1349692044505526e-16, + 1.137440937560308e-16, + 0, + 1.1427609063975448e-16, + 0, + 0, + 1.1517039502318996e-16, + 1.1549481576023593e-16, + 0, + 1.161841897801159e-16, + 0, + 0, + 0, + 1.177306001482301e-16, + 1.1815339462774402e-16, + 1.185911384901203e-16, + 0, + 0, + 1.199966709968528e-16, + 0, + 1.2101341766311912e-16, + 1.2154661532375033e-16, + 0, + 0, + 1.2324949112332057e-16, + 1.238527347224392e-16, + 1.2447442106926859e-16, + 1.251149545968473e-16, + 1.2577475689976607e-16, + 1.2645426748250882e-16, + 1.2715394455164995e-16, + 2.557485317095469e-16, + 0, + 1.2937885524388145e-16, + 0, + 1.309722835800706e-16, + 2.6360748298455665e-16, + 0, + 0, + 1.344445629182283e-16, + 1.3537589080570123e-16, + 1.3633394011664738e-16, + 0, + 0, + 0, + 0, + 1.4155303865666858e-16, + 0, + 1.4385736250252208e-16, + 1.4505988639078172e-16, + 1.4629743682461252e-16, + 4.4271350632044795e-16, + 0, + 0, + 0, + 1.5305306314935545e-16, + 1.5452712997703393e-16, + 0, + 4.72830518175548e-16, + 1.592224968196643e-16, + 1.6088440402557424e-16, + 1.625978010891599e-16, + 0, + 0, + 1.6806760811164993e-16, + 1.7000823026008362e-16, + 3.440231866850208e-16, + 3.4816069967792357e-16, + 1.762173094080196e-16, + 1.7842545056179684e-16, + 0, + 1.83068113520149e-16, + 1.8550955722214991e-16, + 1.880360581677667e-16, + 1.9065165564143022e-16, + 1.9336065460624755e-16, + 3.9233529552097936e-16, + 1.9907753983176333e-16, + 0, + 2.052273634035169e-16, + 4.1695784027423524e-16, + 2.1185669538011786e-16, + 0, + 2.1901913925635238e-16, + 2.228192841116798e-16, + 2.267767059975127e-16, + 3.463511251393722e-16, + 1.1760076176335253e-16, + 1.1984498723136674e-16, + 2.443779812477027e-16, + 2.492784531475008e-16, + 1.272027222341621e-16, + 2.5977428418430155e-16, + 3.9810258537989523e-16, + 2.713061049462177e-16, + 2.77507554764331e-16, + 4.2604230884374537e-16, + 2.908924537074325e-16, + 2.981272525136537e-16, + 4.586436898171784e-16, + 4.707468570695312e-16, + 1.611852619422922e-16, + 3.314215813629388e-16, + 5.115459810125667e-16, + 1.7562486954369834e-16, + 3.621375108653764e-16, + 5.606406413151237e-16, + 3.861940659664331e-16, + 1.9976237036163137e-16, + 4.1385148093764346e-16, + 6.439326906977197e-16, + 5.574600095575805e-16, + 5.800554531712935e-16, + 6.046230094380958e-16, + 6.314295987455109e-16, + 5.286340832803578e-16, + 6.930923870916901e-16, + 5.830309787261056e-16, + 4.610656012872442e-16, + 6.501968567158412e-16, + 6.900496309238551e-16, + 9.189814298467548e-16, + 7.867226199095508e-16, + 8.461214961940835e-16, + 1.0297364864912689e-15, + 9.96956873142869e-16, + 1.368375404781893e-15, + 1.365555992149667e-15, + 1.362200875249003e-15, + 1.7460848831280113e-15, + 1.9163943510111623e-15, + 2.4219633740662516e-15, + 3.0038023196651155e-15, + 3.954111337202982e-15, + 5.624138754026257e-15, + 1.0475027331465813e-14, + 7.692501248866752e-14, + 1.4443567319413918e-14, + 6.5972301646406274e-15, + 4.275196108257585e-15, + 3.2527840224536355e-15, + 2.581196698545988e-15, + 2.0207781980178856e-15, + 2.0302815585144125e-15, + 1.594597481044501e-15, + 1.4146215679596336e-15, + 1.2712659337838948e-15, + 1.1543965522365806e-15, + 9.398247530195528e-16, + 8.669907995892048e-16, + 1.2070627104194234e-15, + 5.63133637027713e-16, + 7.038055971384979e-16, + 6.623750745065613e-16, + 6.256101964236946e-16, + 7.409601290981525e-16, + 7.040696284275414e-16, + 5.365937383997834e-16, + 5.123907293078001e-16, + 4.903237553301557e-16, + 4.701240782332899e-16, + 5.64457794804972e-16, + 6.516895026784688e-16, + 4.186422170561888e-16, + 2.0198751140496525e-16, + 3.9033848758762595e-16, + 1.8881452337315674e-16, + 5.486348546129152e-16, + 3.546422505683688e-16, + 1.7210844180680809e-16, + 3.3441944520939856e-16, + 3.2519591945573497e-16, + 4.747474809175474e-16, + 3.082838747033346e-16, + 1.502571654479259e-16, + 4.397330688653356e-16, + 2.8617615612702595e-16, + 1.397744111740744e-16, + 1.3662410086365711e-16, + 1.3362573515847505e-16, + 2.615378881495673e-16, + 3.84132850320522e-16, + 2.5088626784309084e-16, + 2.4591522597448154e-16, + 2.411609958216707e-16, + 1.1830515823406596e-16, + 4.645019854415669e-16, + 2.2807179031946066e-16, + 2.2406234327532465e-16, + 4.404261434629184e-16, + 2.1651510897764416e-16, + 0, + 0, + 2.062497865979453e-16, + 2.0308052062986278e-16, + 2.00026879333912e-16, + 5.912493798688494e-16, + 3.8848780987071593e-16, + 1.9150420465215325e-16, + 3.7771867286950397e-16, + 0, + 1.8383679219386276e-16, + 0, + 5.374328004375144e-16, + 3.538255951266435e-16, + 1.7475349614049675e-16, + 0, + 1.706394298924782e-16, + 0, + 1.6677979118636341e-16, + 0, + 0, + 1.614244914205175e-16, + 1.5974639490452063e-16, + 3.162369558719701e-16, + 0, + 1.550059187078887e-16, + 3.0703574565125046e-16, + 4.562195644258387e-16, + 4.520111007352465e-16, + 4.479239531389108e-16, + 1.479846845085956e-16, + 2.9339835201611706e-16, + 4.3635068591177836e-16, + 2.8847333952391093e-16, + 2.861147622891691e-16, + 0, + 2.8159479189618573e-16, + 2.794294178091305e-16, + 1.3866230613540849e-16, + 1.3763930022308267e-16, + 0, + 1.3567812292598344e-16, + 1.347383644442359e-16, + 1.3382482498261752e-16, + 1.3293679391630032e-16, + 1.3207359088969112e-16, + 0, + 1.3041909020121958e-16, + 1.2962657045647168e-16, + 0, + 0, + 0, + 1.266749249735528e-16, + 1.2598904139149041e-16, + 1.2532300997324656e-16, + 1.2467638534529696e-16, + 2.4809748058291475e-16, + 1.2343966499087125e-16, + 1.228487662980177e-16, + 0, + 1.217200054842107e-16, + 1.211814345078375e-16, + 0, + 2.403084928565876e-16, + 0, + 1.1919160012646444e-16, + 1.1873375372367847e-16, + 0, + 1.1786366571203686e-16, + 1.1745091831979103e-16, + 1.1705271597077228e-16, + 1.1666883197167736e-16, + 0, + 1.159431612485339e-16, + 1.1560096921050324e-16, + 0, + 0, + 0, + 0, + 1.1408913439809627e-16, + 0, + 0, + 1.13335576274266e-16, + 1.1310913742096956e-16, + 0, + 0, + 0, + 1.1232399696452744e-16, + 0, + 0, + 1.1185902892546942e-16, + 0, + 1.116068067205613e-16, + 1.1149782137461506e-16, + 0, + 1.1131382650628477e-16, + 0, + 0, + 0, + 0, + 0, + 1.1103082323835086e-16, + 0, + 0, + 1.1103952136087052e-16, + 0, + 1.1110087422561315e-16, + 1.111482546097965e-16, + 0, + 1.1127654203590062e-16, + 0, + 0, + 0, + 1.116682452440973e-16, + 1.1179460276394605e-16, + 0, + 1.1208186433579785e-16, + 1.1224291488962e-16, + 0, + 1.1260026828125086e-16, + 2.255935105086198e-16, + 1.1300524934831442e-16, + 0, + 0, + 0, + 1.139615708235788e-16, + 0, + 1.1451492765818807e-16, + 1.1481090382159398e-16, + 1.1511995564462182e-16, + 1.1544225107817406e-16, + 1.1577796641086888e-16, + 0, + 1.1649040509766376e-16, + 1.1686752498974867e-16, + 1.172588584202073e-16, + 1.1766462732973934e-16, + 1.1808506369274515e-16, + 0, + 1.1897091891543958e-16, + 0, + 0, + 1.2041612350137525e-16, + 1.209300435268994e-16, + 2.4292113410861716e-16, + 1.220080203971579e-16, + 0, + 0, + 0, + 0, + 1.250116608673639e-16, + 1.2566836536960143e-16, + 1.2634470692275536e-16, + 1.270411406998836e-16, + 1.2775814127819088e-16, + 1.2849620351960983e-16, + 1.2925584350397737e-16, + 0, + 1.3084203310632902e-16, + 0, + 1.3252130220909538e-16, + 0, + 1.3429865235506927e-16, + 1.3522579286198734e-16, + 0, + 0, + 2.763398071695497e-16, + 4.176244571865108e-16, + 0, + 1.4137512447723414e-16, + 2.8501141514186526e-16, + 4.3100700504617343e-16, + 1.4486605008501036e-16, + 1.4609794609662345e-16, + 1.4736583597381477e-16, + 1.4867092201840918e-16, + 1.5001446590650702e-16, + 3.027955845229322e-16, + 1.5282229249143696e-16, + 4.628682867434504e-16, + 3.1160147839328055e-16, + 4.720735233925574e-16, + 4.768873133628965e-16, + 4.818489692145068e-16, + 0, + 4.922388773801941e-16, + 4.976794250466422e-16, + 3.3552831543197403e-16, + 3.3939004479692484e-16, + 1.7168821935212026e-16, + 3.474927540733853e-16, + 5.276168379658806e-16, + 1.7806887700364007e-16, + 3.6067860072377473e-16, + 3.653737457482551e-16, + 3.7023025241565105e-16, + 1.8762781663467565e-16, + 3.804578860517068e-16, + 3.8584553321761154e-16, + 1.9571383268998396e-16, + 3.972139891509996e-16, + 0, + 4.0944144007780993e-16, + 2.0795278182375914e-16, + 4.2262000765257808e-16, + 2.147992357893987e-16, + 6.552835285415283e-16, + 3.333056321357456e-16, + 5.653388022234267e-16, + 3.4534855765927816e-16, + 4.690085762611658e-16, + 5.974051962186521e-16, + 4.872349332393389e-16, + 4.969663806653859e-16, + 6.339327832945269e-16, + 3.883535282291679e-16, + 6.612185522346913e-16, + 5.406927923382882e-16, + 5.529982124920038e-16, + 5.659346964712524e-16, + 4.3466270766498696e-16, + 4.454235028799948e-16, + 6.090366171355489e-16, + 4.687734971589835e-16, + 6.419547431386734e-16, + 6.598879258178374e-16, + 6.7892168171707615e-16, + 6.991580574555936e-16, + 5.405341027196453e-16, + 5.577856436088656e-16, + 9.603903370021445e-16, + 7.946753360364779e-16, + 8.229970997614497e-16, + 8.53500714909746e-16, + 1.1080557445894173e-15, + 1.1526620823533043e-15, + 1.0810220332254982e-15, + 1.1285963531614852e-15, + 1.0494882678197345e-15, + 1.1003739582952188e-15, + 1.3011380459329525e-15, + 1.3713040537010517e-15, + 1.4496222788057203e-15, + 1.7084347734374231e-15, + 1.637100998723299e-15, + 1.5560615516704497e-15, + 1.881140068692716e-15, + 1.920035175288847e-15, + 2.211721171685521e-15, + 2.2904575492979325e-15, + 2.684565604502478e-15, + 2.839380050077419e-15, + 3.0367153263107948e-15, + 3.956085449056853e-15, + 4.6990042927913394e-15, + 5.625450115568505e-15, + 7.319681171152798e-15, + 1.062538454174323e-14, + 1.8551186877114254e-14, + 7.69251100506661e-14, + 1.2727917079577463e-16, + 2.0634396850290369e-16 + ], + "yaxis": "y", + "zmax": null, + "zmin": null + } + ], + "layout": { + "annotations": [], + "height": 400, + "legend": { + "bgcolor": "rgba(255, 255, 255, 1.000)", + "bordercolor": "rgba(0, 0, 0, 1.000)", + "borderwidth": 1, + "font": { + "color": "rgba(0, 0, 0, 1.000)", + "family": "sans-serif", + "size": 11 + }, + "tracegroupgap": 0, + "traceorder": "normal", + "x": 1, + "xanchor": "auto", + "y": 1, + "yanchor": "auto" + }, + "margin": { + "b": 20, + "l": 0, + "r": 0, + "t": 20 + }, + "paper_bgcolor": "rgba(255, 255, 255, 1.000)", + "plot_bgcolor": "rgba(255, 255, 255, 1.000)", + "showlegend": true, + "width": 600, + "xaxis": { + "anchor": "y", + "domain": [ + 0.2986913094196558, + 0.9934383202099738 + ], + "gridcolor": "rgba(0, 0, 0, 0.100)", + "gridwidth": 0.5, + "linecolor": "rgba(0, 0, 0, 1.000)", + "mirror": false, + "range": [ + -0.189, + 6.489 + ], + "showgrid": true, + "showline": true, + "showticklabels": true, + "tickangle": 0, + "tickcolor": "rgb(0, 0, 0)", + "tickfont": { + "color": "rgba(0, 0, 0, 1.000)", + "family": "sans-serif", + "size": 11 + }, + "tickmode": "array", + "ticks": "inside", + "ticktext": [ + "0", + "1", + "2", + "3", + "4", + "5", + "6" + ], + "tickvals": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6 + ], + "title": "x", + "titlefont": { + "color": "rgba(0, 0, 0, 1.000)", + "family": "sans-serif", + "size": 15 + }, + "type": "-", + "visible": true, + "zeroline": false, + "zerolinecolor": "rgba(0, 0, 0, 1.000)" + }, + "yaxis": { + "anchor": "x", + "domain": [ + 0.07581474190726165, + 0.9901574803149606 + ], + "gridcolor": "rgba(0, 0, 0, 0.100)", + "gridwidth": 0.5, + "linecolor": "rgba(0, 0, 0, 1.000)", + "mirror": false, + "range": [ + -2.307753301519983e-15, + 7.923286335218608e-14 + ], + "showgrid": true, + "showline": true, + "showticklabels": true, + "tickangle": 0, + "tickcolor": "rgb(0, 0, 0)", + "tickfont": { + "color": "rgba(0, 0, 0, 1.000)", + "family": "sans-serif", + "size": 11 + }, + "tickmode": "array", + "ticks": "inside", + "ticktext": [ + "0", + "2×10−14", + "4×10−14", + "6×10−14" + ], + "tickvals": [ + 0, + 2e-14, + 4e-14, + 6e-14 + ], + "title": "relative error", + "titlefont": { + "color": "rgba(0, 0, 0, 1.000)", + "family": "sans-serif", + "size": 15 + }, + "type": "-", + "visible": true, + "zeroline": false, + "zerolinecolor": "rgba(0, 0, 0, 1.000)" + } + } + }, + "text/html": [ + "\n", + "\n", + " \n", + " Plots.jl\n", + " \n", + " \n", + " \n", + " \n", + "
\n", + " \n", + "\n", + " \n", + "\n" + ] + }, + "execution_count": 34, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Błąd względny obliczania sinusa szeregiem Taylora na przedziale (0, 6.3)\n", + "plot(OX, res_taylor, xguide = \"x\", yguide = \"relative error\", label = \"taylor_sin\")" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": {}, + "outputs": [], + "source": [ + "# Poniżej znajdują się funkcje testujące, na podstawie których powstała Tabela 2 w sprawozdaniu" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "MersenneTwister(UInt32[0x00003039], Random.DSFMT.DSFMT_state(Int32[-870096391, 1072918504, -1812426662, 1073255081, -733866021, 1073404543, 807620846, 1073368448, 1919433844, 1072852359 … -362113007, 1073100625, -166402106, 1073460158, -1907020342, 721295190, -750225566, -1300227565, 382, 0]), [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 … 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], UInt128[0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000 … 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000, 0x00000000000000000000000000000000], 1002, 0)" + ] + }, + "execution_count": 28, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "TESTS = 100000000\n", + "\n", + "Random.seed!(12345)" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "taylor_test_error_real (generic function with 3 methods)" + ] + }, + "execution_count": 29, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# wszystkie te funkcje wyglądają bardzo podobnie\n", + "\n", + "function taylor_test_error_real(l::Float64=floatmin(), r::Float64=floatmax())\n", + " res = BigFloat(0) # suma błędów względnych\n", + " abs_res = BigFloat(0) # suma błędów bezwzględnych\n", + " maksi_rel = BigFloat(0) # max bląd względny\n", + " maksi_abs = BigFloat(0) # max bląd bezwzględny\n", + " for i = 1:TESTS\n", + " # losujemy argument z przedziału [l, r]\n", + " x = rand(Uniform(l, r))\n", + " lib_sin = sin(x)\n", + " # sprawdzanie błędu względnego z zerem nie ma sensu\n", + " if lib_sin == 0\n", + " continue\n", + " end\n", + " my_sin = taylor_sin(x, 0)\n", + " # obliczamy błąd względny względem funkcji bibliotecznej\n", + " error = rel_error(lib_sin, my_sin[1])\n", + " # obliczamy błąd bezwzględny względem funkcji bibliotecznej\n", + " abs_error = abs(my_sin[1] - lib_sin)\n", + " # aktualizujemy błędy\n", + " res += error\n", + " abs_res += abs_error\n", + " maksi_rel = max(maksi_rel, error)\n", + " maksi_abs = max(maksi_abs, abs_error)\n", + " end\n", + " return (res/TESTS, maksi_rel, abs_res/TESTS, maksi_abs)\n", + "end\n", + "\n", + "# (floatmin(), floatmax()):\n", + "# (1.887844299668514797145972383393008309519973773948872165524132116232181033410611e-15, \n", + "# 3.16719187748669057932019506480803006098767582443542778491973876953125e-08,\n", + "# 1.1794041986528804301572959036155385792454808324691839516162872314453125e-16,\n", + "# 8.8817841970012523233890533447265625e-16)\n", + "\n", + "# (-pi/2, pi/2):\n", + "# (1.471587646915289673578957365178574707202863924359834292944840261618821841693717e-15, \n", + "# 1.1848604479598457485905096801294400510329296594136394560337066650390625e-08, \n", + "# 9.765754183892570637182101557852154094518937199609354138374328613281249999999994e-17, \n", + "# 5.5511151231257827021181583404541015625e-16)\n", + "\n", + "# (0, 1):\n", + "# (8.693695902799099432701533207691913249153884601349429181102457242502623557811573e-17,\n", + "# 6.661260307992334044328275268948192015174572739102942797728701407322660088539124e-16,\n", + "# 4.293257315426284893844499634951716871000826358795166015624999999999999999999994e-17,\n", + "# 4.44089209850062616169452667236328125e-16)" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "taylor_test_error_complex (generic function with 3 methods)" + ] + }, + "execution_count": 30, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "function taylor_test_error_complex(l::Float64=-100.0, r::Float64=100.0)\n", + " res = BigFloat(0)\n", + " abs_res = BigFloat(0)\n", + " maksi_rel = BigFloat(0)\n", + " maksi_abs = BigFloat(0)\n", + " for i = 1:TESTS\n", + " x = rand(Uniform(l, r))\n", + " y = rand(Uniform(max(l, -Float64(√(BigFloat(r)*r - BigFloat(x)*x))), \n", + " Float64(√(BigFloat(r)*r - BigFloat(x)*x))))\n", + " lib_sin = sin(x + y*im)\n", + " my_sin = taylor_sin(x, y)\n", + " error = rel_error(lib_sin, my_sin[1] + my_sin[2]*im)\n", + " abs_error = abs(lib_sin - (my_sin[1] + my_sin[2]*im))\n", + " res += error\n", + " abs_res += abs_error\n", + " maksi_rel = max(maksi_rel, error)\n", + " maksi_abs = max(maksi_abs, abs_error)\n", + " end\n", + " return (res/TESTS, maksi_rel, abs_res/TESTS, maksi_abs)\n", + "end\n", + "\n", + "# (-100, 100):\n", + "# (4.932205036590292360305897845543684560590114030155004375572792447173773555907229e-15, \n", + "# 1.3111008357751143737471652583705182364137709072338111582212150096893310546875e-13, \n", + "# 1.688623533003329462861070079404255492323042928202526655997186385923664654746476e+26, \n", + "# 5.89784569029861503624382775296e+29)\n", + "\n", + "# (-2pi, 2pi):\n", + "# (4.338436856498561167962902801400526155223569336855327458414068651872587652334067e-16, \n", + "# 1.48720543982594402760972427363260419015678071019692652043886482715606689453125e-11, \n", + "# 1.364745868545483273874507699553481910023596725366415789061836204439613629002538e-14, \n", + "# 8.7095846425677781478128738959826782468909289747216462274082005023956298828125e-13)\n", + "\n", + "# (0, 1):\n", + "# (1.596935223079780368874812440778376297707878344605454825588075017177200118204992e-16, \n", + "# 1.098997011961567777204023105931451003520679665648174250236479565501213073730469e-15, \n", + "# 1.124298405324025732059699593805301650508046127888472394113736655893442950571177e-16, \n", + "# 1.110569915127177230816030746289393434073728902933275719533412484452128410339355e-15)" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "cordic_test_error (generic function with 3 methods)" + ] + }, + "execution_count": 31, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "function cordic_test_error(l::Float64=floatmin(), r::Float64=floatmax())\n", + " res = BigFloat(0)\n", + " abs_res = BigFloat(0)\n", + " maksi_rel = BigFloat(0)\n", + " maksi_abs = BigFloat(0)\n", + " for i = 1:TESTSd\n", + " x = rand(Uniform(l, r))\n", + " lib_sin = sin(x)\n", + " my_sin = cordic_sin(x)\n", + " error = rel_error(lib_sin, my_sin)\n", + " abs_error = abs(lib_sin - my_sin)\n", + " res += error\n", + " abs_res += abs_error\n", + " if error > maksi_rel\n", + " worst_rel = x\n", + " end\n", + " maksi_rel = max(maksi_rel, error)\n", + " maksi_abs = max(maksi_abs, abs_error)\n", + " end\n", + " return (res/TESTS, maksi_rel, abs_res/TESTS, maksi_abs)\n", + "end\n", + "\n", + "# (floatmin(), floatmax()):\n", + "# (3.099880824631376815575307358441341907045753361742215192539218280437518515668677e-08, \n", + "# 0.457561153670805575988111968399607576429843902587890625, \n", + "# 2.459716652636021482355597144179802356154379561203882076370064169168472290039072e-09, \n", + "# 0.0006041780891818948617810747236944735050201416015625)\n", + "\n", + "# (-2pi, 2pi):\n", + "# (2.769658715752475495709394998775060901506630522496771093654899307916206208091117e-08, \n", + "# 0.11834204003306579566778822254491387866437435150146484375, \n", + "# 2.532059440779907667675144447194875727078638982803227008844260126352310180664052e-09,\n", + "# 0.00552917548107156875403234153054654598236083984375)\n", + "\n", + "# (0, 1):\n", + "# (4.176404604808155838824592152607760760141260709650975486490997166423577713345588e-08, \n", + "# 0.091828765031669201679420666550868190824985504150390625, \n", + "# 2.613683444981852927700279986835644064485650872597943816799670457839965820312493e-09, \n", + "# 0.00052619288922584050993691562325693666934967041015625)" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "taylor_without_reduction_test_error (generic function with 3 methods)" + ] + }, + "execution_count": 32, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "function taylor_without_reduction_test_error(l::Float64=-100.0, r::Float64=100.0)\n", + " res = BigFloat(0)\n", + " abs_res = BigFloat(0)\n", + " maksi_rel = BigFloat(0)\n", + " maksi_abs = BigFloat(0)\n", + " for i = 1:TESTS\n", + " x = rand(Uniform(l, r))\n", + " y = rand(Uniform(max(l, -Float64(√(BigFloat(r)*r - BigFloat(x)*x))), \n", + " Float64(√(BigFloat(r)*r - BigFloat(x)*x))))\n", + " lib_sin = sin(x + y*im)\n", + " my_sin = taylor_sin_no_reduction(x, y)\n", + " error = rel_error(lib_sin, my_sin[1] + my_sin[2]*im)\n", + " abs_error = abs(lib_sin - (my_sin[1] + my_sin[2]*im))\n", + " res += error\n", + " abs_res += abs_error\n", + " maksi_rel = max(maksi_rel, error)\n", + " maksi_abs = max(maksi_abs, abs_error)\n", + " end\n", + " return (res/TESTS, maksi_rel, abs_res/TESTS, maksi_abs)\n", + "end\n", + "\n", + "# (-100, 100)\n", + "# (4.774091809397734982069398193189465079787514988283523440828527859306283137571149e+23, \n", + "# 4.48814142545670189837451264e+26, \n", + "# 7.758560481134976967771949796127369173267383351574525337904198599731007318070319e+40, \n", + "# 2.20832987186165589366506156220211970162294784e+44)\n", + "\n", + "# (-2pi, 2pi)\n", + "# (0.6332711088634405192103194531076134843075526902544601426097735760298574150340518, \n", + "# 1.0, \n", + "# 23.44057586605533515691829807979128873527513778367553433852055381911453864572971, \n", + "# 267.74654227273646256435313262045383453369140625)\n", + "\n", + "# (0, 1)\n", + "# (1.589482169544726703219739509256918022523030217883325972454504856003547167066932e-16, \n", + "# 1.291897416767691567199962520855285151964115327068161054313577551511116325855255e-15, \n", + "# 1.118367257755837281340217148887719929595000777959128862241583039814976641146415e-16, \n", + "# 1.115760330918745818020084658567032229219617364690542160587938269600272178649902e-15)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Julia 1.4.1", + "language": "julia", + "name": "julia-1.4" + }, + "language_info": { + "file_extension": ".jl", + "mimetype": "application/julia", + "name": "julia", + "version": "1.4.1" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/semestr-3/anm/pracowniaPOP/prog/program.jl b/semestr-3/anm/pracowniaPOP/prog/program.jl new file mode 100644 index 0000000..d75f82b --- /dev/null +++ b/semestr-3/anm/pracowniaPOP/prog/program.jl @@ -0,0 +1,273 @@ +using Printf + +# stałe dla CORDIC'A +global C_ITERATIONS = 30 +global CORDIC_MUL_POW = 30 +global CORDIC_MUL = 2.0^CORDIC_MUL_POW +global CORDIC_ATANS = [843314857, 497837829, 263043837, 133525159, 67021687, 33543516, 16775851, + 8388437, 4194283, 2097149, 1048576, 524288, 262144, 131072, 65536, 32768, 16384, 8192, 4096, + 2048, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2] +global CORDIC_F = 1768195363 +global CORDIC_F_INV = 652032874 + +# stałe dla obliczania szeregiem Taylora +global T_ITERATIONS = 15 +global HYPERBOLIC_MAX = 1 + +# liczenie szeregu Taylora +function series(x, parity, change_sign, iterations) + res = zero(x) + elem = one(x) + if parity == 1 + elem = x + end + i = parity + 1 + while i <= 2*iterations + parity + res += elem + elem *= change_sign*x*x/(i*(i+1)) + i += 2 + end + return res +end + +# generyczna funkcja stosująca wzory redukcyjne, licząca sin(x) +# za pomocą podanych funkcji sin_fun, cos_fun +function gen_sin(x, iterations, sin_fun, cos_fun) + # sin(-x) = sin(x) + if x < 0 + return -gen_sin(-x, iterations, sin_fun, cos_fun) + end + x = mod2pi(x) + # sin(π + x) = -sin(x) + if x > pi + return -gen_sin(x-pi, iterations, sin_fun, cos_fun) + end + # sin(π/2 + x) = cos(x) + if x > pi/2 + return gen_cos(x-pi/2, iterations, sin_fun, cos_fun) + end + # sin(π/2 - x) = cos(x) + if x > pi/4 + return gen_cos(pi/2-x, iterations, sin_fun, cos_fun) + end + return sin_fun(x, iterations) +end + +# generyczna funkcja stosująca wzory redukcyjne, licząca cos(x) +# za pomocą podanych funkcji sin_fun, cos_fun +function gen_cos(x, iterations, sin_fun, cos_fun) + # cos(-x) = cos(x) + if x < 0 + return gen_cos(-x, iterations, sin_fun, cos_fun) + end + x = mod2pi(x) + # cos(π + x) = -cos(x) + if x > pi + return -gen_cos(x-pi, iterations, sin_fun, cos_fun) + end + # cos(π/2 + x) = -sin(x) + if x > pi/2 + return -gen_sin(x-pi/2, iterations, sin_fun, cos_fun) + end + # cos(π/2 - x) = sin(x) + if x > pi/4 + return gen_sin(pi/2-x, iterations, sin_fun, cos_fun) + end + return cos_fun(x, iterations) +end + +# sin dla liczb rzeczywistych [Taylor] +function real_sin(r, iterations) + return series(r, 1, -1, iterations) +end + +# cos dla liczb rzeczywistych [Taylor] +function real_cos(r, iterations) + return series(r, 0, -1, iterations) +end + +# sinh [Taylor] +function real_sinh(r, iterations) + # sinh(1000) jest za duży by reprezentować go we Float64 + if r > 1000 + return Inf + end + if r < -1000 + return -Inf + end + if r == 0 + return Float64(0) + end + # dla dużych liczb korzystamy ze wzoru: + # sinh(2r) = 2 * cosh(r) * sinh(r) + if abs(r) > HYPERBOLIC_MAX + return 2*real_sinh(r/2, iterations)*real_cosh(r/2, iterations) + end + return series(r, 1, 1, iterations) +end + +# cosh [Taylor] +function real_cosh(r, iterations) + # cosh(1000) jest za duży by reprezentować go we Float64 + if abs(r) > 1000 + return Inf + end + if r == 1 + return Float64(1) + end + # dla dużych liczb korzystamy ze wzoru: + # cosh(2r) = cosh(r)^2 + sinh(r)^2 + if abs(r) > HYPERBOLIC_MAX + s = real_sinh(r/2, iterations) + c = real_cosh(r/2, iterations) + return s*s+c*c + end + return series(r, 0, 1, iterations) +end + +# sin dla liczb zespolonych [Taylor] +function complex_sin(a, b, iterations) + # sin(a + bi) = sin(a) * cosh(b) + i(cos(a) * sinh(b)) + return (gen_sin(a, iterations, real_sin, real_cos)*real_cosh(b, iterations), + gen_cos(a, iterations, real_sin, real_cos)*real_sinh(b, iterations)) +end + +# cos dla liczb zespolonych [Taylor] +function complex_cos(a, b, iterations) + # cos(a + bi) = cos(a) * cosh(b) - i(sin(a) * sinh(b)) + return (real_cos(a, iterations)*real_cosh(b, iterations), + -real_sin(a, iterations)*real_sinh(b, iterations)) +end + +# funkcja sin dla użytkownika [Taylor] +function taylor_sin(a, b) + return complex_sin(a, b, T_ITERATIONS) +end + +# funkcja cos dla użytkownika [Taylor] +function taylor_cos(a, b) + return complex_cos(a, b, T_ITERATIONS) +end + +# funkcja sinh dla użytkownika [Taylor] +function taylor_sinh(r) + return real_sinh(r, T_ITERATIONS) +end + +# funkcja cosh dla użytkownika [Taylor] +function taylor_cosh(r) + return real_cosh(r, T_ITERATIONS) +end + +# preprocesing [CORDIC] +function preprocess_atan(iterations) + global CORDIC_MUL + atan2pow = Array{Float64}(undef, iterations) + @printf("CORDIC_ATANS = [") + for i in 1:iterations + atan2pow[i] = round(atan(1.0 / Float64(BigInt(2)^(i - 1))) * CORDIC_MUL) + @printf("%d", atan2pow[i]) + if i < iterations + @printf(", ") + end + end + @printf("]\n") +end + + +# preprocesing [CORDIC] +function preprocess_scaling_factor(iterations) + CORDIC_F = 1.0 + for i in 0:iterations + CORDIC_F *= sqrt(1. + 1. / Float64(BigInt(2)^(2 * i))) + end + @printf("CORDIC_F = %d\nCORDIC_F_INV = %d\n", round(CORDIC_F * CORDIC_MUL), round(CORDIC_MUL / CORDIC_F)) +end + + +# funkcja licząca zarówno cosx oraz sinx algorytmem CORDIC +function approx_trig(x, iterations) + global CORDIC_ATANS + global CORDIC_F_INV + X = CORDIC_F_INV + Y = 0 + Z = round(x * CORDIC_MUL) + s = 1 + # Proces iteracyjny algorytmu CORDIC + for i in 0:(iterations - 1) + tempX = X + if Z == 0 + break + end + if Z >= 0 + X -= s * (Y >> i) + Y += s * (tempX >> i) + Z -= s * CORDIC_ATANS[i + 1] + else + X += s * (Y >> i) + Y -= s * (tempX >> i) + Z += s * CORDIC_ATANS[i + 1] + end + end + + return (Float64(X) / CORDIC_MUL, Float64(Y) / CORDIC_MUL) +end + +# wyciąganie sin z approx_trig [CORDIC] +function approx_sin(x, iterations) + return approx_trig(x, iterations)[2] +end + + +# wyciąganie cos z approx_trig [CORDIC] +function approx_cos(x, iterations) + return approx_trig(x, iterations)[1] +end + +# funkcja sin dla użytkownika [CORDIC] +function cordic_sin(x) + return gen_sin(x, C_ITERATIONS, approx_sin, approx_cos) +end + +# funkcja cos dla użytkownika [CORDIC] +function cordic_cos(x) + return gen_cos(x, C_ITERATIONS, approx_sin, approx_cos) +end + +# uruchamianie preprocesingu [CORDIC] +# funkcja wypisuje kod w języku Julia na ekran, który potem po prostu wkleiliśmy do pliku źródłowego +# oblicza stałe potrzebne do obliczania funkcji trygonometrycznych metodą CORDIC +function preprocess_cordic() + println("Preprocessing CORDIC constants.") + preprocess_atan(CORDIC_MUL_POW) + preprocess_scaling_factor(CORDIC_MUL_POW) +end + +# sinh bez stosowania wzorów redukcyjnych [Taylor] +function sinh_no_reduction(x, iterations) + return series(x, 1, 1, iterations) +end + +# cosh bez stosowania wzorów redukcyjnych [Taylor] +function cosh_no_reduction(x, iterations) + return series(x, 0, 1, iterations) +end + +# sin bez stosowania wzorów redukcyjnych [Taylor] +function taylor_sin_no_reduction(x, y) + # sin(a + bi) = sin(a) * cosh(b) + i(cos(a) * sinh(b)) + # wykonujemy odpowiednio (10a + 10), (10b + 10) iteracji - szereg Tylora + # powinien dobrze przybliżać funkcje trygonometryczne dla takiej liczby wyrazów + return (real_sin(x, 10*round(x)+10) * cosh_no_reduction(y, 10*round(y)+10), + real_cos(x, 10*round(x)+10) * sinh_no_reduction(y, 10*round(y)+10)) +end + +# zmiana liczby iteracji [Taylor] +function set_taylor_iterations(x) + global T_ITERATIONS = x +end + +# zmiana liczby iteracji [CORDIC] +function set_cordic_iterations(x) + global C_ITERATIONS = x +end \ No newline at end of file diff --git a/semestr-3/anm/sprawozdanie.aux b/semestr-3/anm/sprawozdanie.aux new file mode 100644 index 0000000..de95387 --- /dev/null +++ b/semestr-3/anm/sprawozdanie.aux @@ -0,0 +1,35 @@ +\relax +\providecommand\hyper@newdestlabel[2]{} +\providecommand\HyperFirstAtBeginDocument{\AtBeginDocument} +\HyperFirstAtBeginDocument{\ifx\hyper@anchor\@undefined +\global\let\oldcontentsline\contentsline +\gdef\contentsline#1#2#3#4{\oldcontentsline{#1}{#2}{#3}} +\global\let\oldnewlabel\newlabel +\gdef\newlabel#1#2{\newlabelxx{#1}#2} +\gdef\newlabelxx#1#2#3#4#5#6{\oldnewlabel{#1}{{#2}{#3}}} +\AtEndDocument{\ifx\hyper@anchor\@undefined +\let\contentsline\oldcontentsline +\let\newlabel\oldnewlabel +\fi} +\fi} +\global\let\hyper@last\relax +\gdef\HyperFirstAtBeginDocument#1{#1} +\providecommand\HyField@AuxAddToFields[1]{} +\providecommand\HyField@AuxAddToCoFields[2]{} +\providecommand \oddpage@label [2]{} +\@writefile{toc}{\contentsline {section}{\numberline {1\relax .\enspace }Wstęp}{1}{section.1}\protected@file@percent } +\@writefile{toc}{\contentsline {section}{\numberline {2\relax .\enspace }Algorytm CORDIC}{1}{section.2}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {2.1\relax .\enspace }Opis algorytmu}{1}{subsection.2.1}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {2.2\relax .\enspace }Niespełniona obietnica}{3}{subsection.2.2}\protected@file@percent } +\@writefile{toc}{\contentsline {section}{\numberline {3\relax .\enspace }Wzór Taylora}{3}{section.3}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {3.1\relax .\enspace }Opis metody}{3}{subsection.3.1}\protected@file@percent } +\@writefile{lot}{\contentsline {table}{\numberline {1.}{\ignorespaces Wzory redukcyjne.}}{4}{table.1}\protected@file@percent } +\newlabel{tab:reduk}{{1}{4}{Wzory redukcyjne}{table.1}{}} +\@writefile{toc}{\contentsline {section}{\numberline {4\relax .\enspace }Analiza błędu}{5}{section.4}\protected@file@percent } +\@writefile{toc}{\contentsline {subsection}{\numberline {4.1\relax .\enspace }Wyniki testów}{5}{subsection.4.1}\protected@file@percent } +\@writefile{lot}{\contentsline {table}{\numberline {2.}{\ignorespaces Błędy przy obliczaniu funkcji $\qopname \relax o{sin}(x)$.}}{5}{table.2}\protected@file@percent } +\newlabel{tab:2}{{2}{5}{Błędy przy obliczaniu funkcji $\sin (x)$}{table.2}{}} +\@writefile{toc}{\contentsline {subsection}{\numberline {4.2\relax .\enspace }Wnioski}{5}{subsection.4.2}\protected@file@percent } +\bibcite{CORDIC tutorial}{1} +\bibcite{CORDIC ints}{2} +\@writefile{toc}{\contentsline {section}{Literatura}{6}{section*.1}\protected@file@percent } diff --git a/semestr-3/anm/sprawozdanie.auxlock b/semestr-3/anm/sprawozdanie.auxlock new file mode 100644 index 0000000..323417a --- /dev/null +++ b/semestr-3/anm/sprawozdanie.auxlock @@ -0,0 +1 @@ +\def \tikzexternallocked {0} diff --git a/semestr-3/anm/sprawozdanie.fdb_latexmk b/semestr-3/anm/sprawozdanie.fdb_latexmk new file mode 100644 index 0000000..1718404 --- /dev/null +++ b/semestr-3/anm/sprawozdanie.fdb_latexmk @@ -0,0 +1,291 @@ +# Fdb version 3 +["pdflatex"] 1606061661 "/mnt/c/Users/franc/Documents/anm/sprawozdanie.tex" "/mnt/c/Users/franc/Documents/anm/sprawozdanie.pdf" "sprawozdanie" 1606061661 + "/etc/texmf/web2c/texmf.cnf" 1604591938 475 c0e671620eb5563b2130f56340a5fde8 "" + "/mnt/c/Users/franc/Documents/anm/sprawozdanie.aux" 1606061661 8 a94a2480d3289e625eea47cd1b285758 "" + "/mnt/c/Users/franc/Documents/anm/sprawozdanie.tex" 1606061658 26166 36cca38f7a202a76606227c326afb1fc "" + "/usr/share/texlive/texmf-dist/fonts/enc/dvips/pl/plme.enc" 1136849721 3126 59f33ff3e396436ebc36f4e7b444d5c4 "" + "/usr/share/texlive/texmf-dist/fonts/enc/dvips/pl/plmi.enc" 1136849721 2005 f094775651a1386335c158fb632529f1 "" + "/usr/share/texlive/texmf-dist/fonts/enc/dvips/pl/plms.enc" 1136849721 2468 3f9e2f3088bcf5b581dfc367d71e7d95 "" + "/usr/share/texlive/texmf-dist/fonts/enc/dvips/pl/plrm.enc" 1136849721 1944 1845592c00bbe510359fd6887a83ff72 "" + "/usr/share/texlive/texmf-dist/fonts/map/fontname/texfonts.map" 1577235249 3524 cb3e574dea2d1052e39280babc910dc8 "" + "/usr/share/texlive/texmf-dist/fonts/tfm/jknappen/ec/ecrm1000.tfm" 1136768653 3584 adb004a0c8e7c46ee66cad73671f37b4 "" + "/usr/share/texlive/texmf-dist/fonts/tfm/jknappen/ec/ecrm1440.tfm" 1136768653 3584 3169d30142b88a27d4ab0e3468e963a2 "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/ae/aeb10.tfm" 1136768653 6132 78e5594f4fe2bad148a7cb22806d1f42 "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/ae/aer10.tfm" 1136768653 6076 dc5394361b1c55a30e76ff07ab99157c "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/ae/aer12.tfm" 1136768653 6084 8180e586f034a9866b6c5554cc5644fe "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/ae/aer17.tfm" 1136768653 6104 412e349a5a6e3f1445fb2b73d9eaf6b9 "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/ae/aer5.tfm" 1191308783 6060 e6698dd00b0c710db67c8f65752c199a "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/ae/aer7.tfm" 1136768653 6100 f6435b187a1470b7c1e093c961c6daa7 "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/ae/aer9.tfm" 1136768653 6076 dd5a5352d066d5b2d2092b63c8cabf28 "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/ae/aeti10.tfm" 1136768653 7236 91161c92aeeced20d93e1ef8554f8511 "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/ae/aeti9.tfm" 1136768653 7240 b5c2a48053d60f3c984fb3fe77523873 "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/ae/aett10.tfm" 1136768653 1380 9064e50d18b05b0f12c422a52d6b9985 "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/ae/aett8.tfm" 1136768653 1384 0dd0528a68d738e9536204066f18d816 "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/ae/aett9.tfm" 1136768653 1380 19ca13114324160be390bab24cecf734 "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/amsfonts/euler/eurm10.tfm" 1246382020 1228 9be37fdf0dc0e1f4df4af3594876d628 "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/amsfonts/euler/eurm5.tfm" 1246382020 1228 6fc4d2f2c0a79dc4f413411f6e2f336c "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/amsfonts/euler/eurm7.tfm" 1246382020 1228 22a83614922c993c1b2e124955a38ca1 "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/amsfonts/symbols/msam10.tfm" 1246382020 916 f87d7c45f9c908e672703b83b72241a3 "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/amsfonts/symbols/msam5.tfm" 1246382020 924 9904cf1d39e9767e7a3622f2a125a565 "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/amsfonts/symbols/msam7.tfm" 1246382020 928 2dc8d444221b7a635bb58038579b861a "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/amsfonts/symbols/msbm10.tfm" 1246382020 908 2921f8a10601f252058503cc6570e581 "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/amsfonts/symbols/msbm5.tfm" 1246382020 940 75ac932a52f80982a9f8ea75d03a34cf "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/amsfonts/symbols/msbm7.tfm" 1246382020 940 228d6584342e91276bf566bcf9716b83 "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmb10.tfm" 1136768653 1336 fb32298c2d61d0c4b59f3065fdd6def9 "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmbsy10.tfm" 1136768653 1116 4e6ba9d7914baa6482fd69f67d126380 "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmbx9.tfm" 1136768653 1328 5442e22a7072966dbaf88ca900acf3f0 "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmmi10.tfm" 1136768653 1528 abec98dbc43e172678c11b3b9031252a "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmmi12.tfm" 1136768653 1524 4414a8315f39513458b80dfc63bff03a "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmmi9.tfm" 1136768653 1524 d89e2d087a9828407a196f428428ef4a "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmmib10.tfm" 1136768653 1524 554068197b70979a55370e6c6495f441 "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmr12.tfm" 1136768653 1288 655e228510b4c2a1abe905c368440826 "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmr17.tfm" 1136768653 1292 296a67155bdbfc32aa9c636f21e91433 "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmr9.tfm" 1136768653 1292 6b21b9c2c7bebb38aa2273f7ca0fb3af "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmsl10.tfm" 1136768653 1508 efecb4a315fe0975509670a272d75ef5 "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmsl9.tfm" 1136768653 1504 db0beb0fddc52727302ccaeb61bc9b3d "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmsy10.tfm" 1136768653 1124 6c73e740cf17375f03eec0ee63599741 "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmsy9.tfm" 1136768653 1116 25a7bf822c58caf309a702ef79f4afbb "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmti10.tfm" 1136768653 1480 aa8e34af0eb6a2941b776984cf1dfdc4 "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmti9.tfm" 1136768653 1476 cccc6cc4935c18ec3d5623b77ecb8b74 "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmtt10.tfm" 1136768653 768 1321e9409b4137d6fb428ac9dc956269 "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmtt9.tfm" 1136768653 764 c98a2af25c99b73a368cf7336e255190 "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmu10.tfm" 1136768653 1276 d1b8c21fa8328272b4e5e6bc10761e6e "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/latex-fonts/lasy6.tfm" 1136768653 520 4889cce2180234b97cad636b6039c722 "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/pl/plex10.tfm" 1136768653 992 93098cecc00cfdb7e881cb8983ca7545 "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/pl/plmi10.tfm" 1136768653 1528 c9811a5c54036a0d60617f9ae77b990e "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/pl/plmi12.tfm" 1136768653 1524 234f65aa0171d619f32097d0f9186df0 "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/pl/plmi5.tfm" 1136768653 1508 a2d14c74291841992fa64fe998b36f97 "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/pl/plmi6.tfm" 1136768653 1512 01fe68a80e3d13383410f67b67ce344d "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/pl/plmi7.tfm" 1136768653 1528 b9fad95d99dcea00da6a998803f85686 "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/pl/plmi9.tfm" 1136768653 1524 e1857a1d6e1e143a3914103eb4048cc6 "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/pl/plr10.tfm" 1136768653 2080 5c3eb4fec3b89def05dc3a4c6b93fb7c "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/pl/plr12.tfm" 1136768653 2076 e1758d4caaf275a731cf0532450f26f0 "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/pl/plr5.tfm" 1136768653 2008 3b7792da2ec68e9d8515961176bc983d "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/pl/plr6.tfm" 1136768653 2088 aa80c569a200447488b571f8bf7b132b "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/pl/plr7.tfm" 1136768653 2088 3950be4df310cc88dade7a45ba964220 "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/pl/plr9.tfm" 1136768653 2080 213346e6057127ce04d81e851efe2651 "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/pl/plsy10.tfm" 1136768653 1308 adee1faadc465f51667a741ced3a8365 "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/pl/plsy5.tfm" 1136768653 1296 bc803ec3860b078a8e22fb7a6202aa37 "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/pl/plsy6.tfm" 1136768653 1300 730d55d47130c8c9a62c9e7eab4ae96a "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/pl/plsy7.tfm" 1136768653 1304 a6a2c86c403d8bc56664eeac17804b8a "" + "/usr/share/texlive/texmf-dist/fonts/tfm/public/pl/plsy9.tfm" 1136768653 1300 39c1632d4e7dc316ebb5e6f0ec0d2b56 "" + "/usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmb10.pfb" 1248133631 31983 9e890a566b02a404d2efb4a691903f83 "" + "/usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi10.pfb" 1248133631 36299 5f9df58c2139e7edcf37c8fca4bd384d "" + "/usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi12.pfb" 1248133631 36741 fa121aac0049305630cf160b86157ee4 "" + "/usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi9.pfb" 1248133631 36094 798f80770b3b148ceedd006d487db67c "" + "/usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmmib10.pfb" 1248133631 36912 b448ef9ad9d7228ec3c6e71005136d55 "" + "/usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb" 1248133631 35752 024fb6c41858982481f6968b5fc26508 "" + "/usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12.pfb" 1248133631 32722 d7379af29a190c3f453aba36302ff5a9 "" + "/usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr17.pfb" 1248133631 32362 179c33bbf43f19adbb3825bb4e36e57a "" + "/usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr9.pfb" 1248133631 33993 9b89b85fd2d9df0482bd47194d1d3bf3 "" + "/usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy10.pfb" 1248133631 32569 5e5ddc8df908dea60932f3c484a54c0d "" + "/usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmti10.pfb" 1248133631 37944 359e864bd06cde3b1cf57bb20757fb06 "" + "/usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmti9.pfb" 1248133631 36310 f5ddc6715cc60deb16d9db5ded6a9391 "" + "/usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmtt10.pfb" 1248133631 31099 c85edf1dd5b9e826d67c9c7293b6786c "" + "/usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmtt9.pfb" 1248133631 29078 718ea4567ceff944262b0f5b0800e1d9 "" + "/usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/symbols/msbm10.pfb" 1248133631 34694 ad62b13721ee8eda1dcc8993c8bd7041 "" + "/usr/share/texlive/texmf-dist/fonts/type1/public/pl/plex10.pfb" 1136849748 22371 094f80a5a689f2eefc72bff87ecbc407 "" + "/usr/share/texlive/texmf-dist/fonts/type1/public/pl/plmi10.pfb" 1136849748 29517 25a85f8c34479bb523ce1a802f64ac2b "" + "/usr/share/texlive/texmf-dist/fonts/type1/public/pl/plmi5.pfb" 1136849748 30474 76837cc40aac64eb8f56a9cd5f90dbf2 "" + "/usr/share/texlive/texmf-dist/fonts/type1/public/pl/plmi7.pfb" 1136849748 30062 f256577ea5c665e43523d33b7c343f76 "" + "/usr/share/texlive/texmf-dist/fonts/type1/public/pl/plmi9.pfb" 1136849748 29800 7eb43ab054491d49d57034d15043041c "" + "/usr/share/texlive/texmf-dist/fonts/type1/public/pl/plr10.pfb" 1136849748 27396 59c827d3c8566d0d9cbf81ac7c0d162a "" + "/usr/share/texlive/texmf-dist/fonts/type1/public/pl/plr7.pfb" 1136849748 27523 c9185de4b4f361086bdc0d056fdd2b09 "" + "/usr/share/texlive/texmf-dist/fonts/type1/public/pl/plr9.pfb" 1136849748 27609 9218405033ea9b52e543514bf059aea7 "" + "/usr/share/texlive/texmf-dist/fonts/type1/public/pl/plsy10.pfb" 1136849748 26714 6fe260cd3a16c4a700b121f4edac67f2 "" + "/usr/share/texlive/texmf-dist/fonts/type1/public/pl/plsy7.pfb" 1136849748 26709 9e991ffe8a726e7eda2bb5c6c9c785e1 "" + "/usr/share/texlive/texmf-dist/fonts/vf/public/ae/aeb10.vf" 1136768653 3204 33087d8d1b5ca03fcc323578bd8c2ab9 "" + "/usr/share/texlive/texmf-dist/fonts/vf/public/ae/aer10.vf" 1136768653 3160 99d961359fad2b22331b477acf927f3b "" + "/usr/share/texlive/texmf-dist/fonts/vf/public/ae/aer12.vf" 1136768653 3160 e993f4eb83801456082cb302f2fc6fad "" + "/usr/share/texlive/texmf-dist/fonts/vf/public/ae/aer17.vf" 1136768653 3288 0cea84560e07529ac52b9c435854a210 "" + "/usr/share/texlive/texmf-dist/fonts/vf/public/ae/aer9.vf" 1136768653 3156 f2dea5d0f126618ccda762d665556ed9 "" + "/usr/share/texlive/texmf-dist/fonts/vf/public/ae/aeti10.vf" 1136768653 3152 6c73a19f64f9917772e63a3836e2fceb "" + "/usr/share/texlive/texmf-dist/fonts/vf/public/ae/aeti9.vf" 1136768653 3160 0b9c9ec528731f13d658fbd15c0a6251 "" + "/usr/share/texlive/texmf-dist/fonts/vf/public/ae/aett10.vf" 1136768653 3440 4d67aaeb563945aba80b73efb32a3720 "" + "/usr/share/texlive/texmf-dist/fonts/vf/public/ae/aett9.vf" 1136768653 3440 82313228944798220affee933c55b922 "" + "/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii" 1461363279 71627 94eb9990bed73c364d7f53f960cc8c5b "" + "/usr/share/texlive/texmf-dist/tex/generic/atbegshi/atbegshi.sty" 1575674566 24708 5584a51a7101caf7e6bbf1fc27d8f7b1 "" + "/usr/share/texlive/texmf-dist/tex/generic/bigintcalc/bigintcalc.sty" 1576625341 40635 c40361e206be584d448876bba8a64a3b "" + "/usr/share/texlive/texmf-dist/tex/generic/bitset/bitset.sty" 1576016050 33961 6b5c75130e435b2bfdb9f480a09a39f9 "" + "/usr/share/texlive/texmf-dist/tex/generic/etexcmds/etexcmds.sty" 1576625273 7734 b98cbb34c81f667027c1e3ebdbfce34b "" + "/usr/share/texlive/texmf-dist/tex/generic/gettitlestring/gettitlestring.sty" 1576625223 8371 9d55b8bd010bc717624922fb3477d92e "" + "/usr/share/texlive/texmf-dist/tex/generic/iftex/iftex.sty" 1573336935 6902 30fdaf7dc5636b8e3afa306210c45cae "" + "/usr/share/texlive/texmf-dist/tex/generic/iftex/ifvtex.sty" 1572645307 1057 525c2192b5febbd8c1f662c9468335bb "" + "/usr/share/texlive/texmf-dist/tex/generic/infwarerr/infwarerr.sty" 1575499628 8356 7bbb2c2373aa810be568c29e333da8ed "" + "/usr/share/texlive/texmf-dist/tex/generic/intcalc/intcalc.sty" 1576625065 31769 002a487f55041f8e805cfbf6385ffd97 "" + "/usr/share/texlive/texmf-dist/tex/generic/kvdefinekeys/kvdefinekeys.sty" 1576878844 5412 d5a2436094cd7be85769db90f29250a6 "" + "/usr/share/texlive/texmf-dist/tex/generic/kvsetkeys/kvsetkeys.sty" 1576624944 13807 952b0226d4efca026f0e19dd266dcc22 "" + "/usr/share/texlive/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty" 1576624883 18552 1e1cc7b75da0dfaacce7cdcb27d306bf "" + "/usr/share/texlive/texmf-dist/tex/generic/pdfescape/pdfescape.sty" 1576015897 19007 15924f7228aca6c6d184b115f4baa231 "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcore.code.tex" 1557692582 992 fb3cda354707a54fda62787a411c7c22 "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcorearrows.code.tex" 1546728038 43820 bc6cf5aa959817914ace33f5c6232161 "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreexternal.code.tex" 1557692582 19324 c9a64402f22bd8d81821141a357af653 "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcoregraphicstate.code.tex" 1546728038 6038 d639d02574be9a72f3c602c2a3510e02 "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreimage.code.tex" 1546728038 6948 284bbe3c9a7ca0a826c1c03895e69b9f "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcorelayers.code.tex" 1546728038 4883 a6f3eb1f71d8c4affaf43a169828b043 "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreobjects.code.tex" 1546728038 2544 3b1b198fd49f01e328adc9162a07b213 "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathconstruct.code.tex" 1576793519 44189 1fd6229dad4c898883516c032f2ca5d2 "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathprocessing.code.tex" 1546728038 17311 3092579be20ef0f229c42ad3f09da85c "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathusage.code.tex" 1546728038 21302 d6c4b340248adbe650ebf6ca76bdccca "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepatterns.code.tex" 1562964315 9690 7585efa5a591822837f837bc5bc35621 "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex" 1576793519 33335 942ccafe284041918d36e54696b98aa7 "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcorequick.code.tex" 1546728038 2965 502761b60f43ab2de5ecb2f4625163ae "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcorerdf.code.tex" 1546728038 5196 f8c5c775d4d6e2cb050392127cabda72 "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.code.tex" 1576793519 20726 ed6ec1d6f0f35e7a93de4e79af83dbce "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreshade.code.tex" 1557692582 35249 144a6b9c4df4644618bb3a0a40472608 "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransformations.code.tex" 1546728038 21989 266e83c51fe41eb8b8d5e6896dc71cc1 "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransparency.code.tex" 1546728038 8842 5cc856e132fac404805c6da091779283 "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzexternalshared.code.tex" 1578520427 68832 d3fb188b0bd28ad6bf7cbf96d9d92059 "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryarrows.code.tex" 1546728038 319 8fc6edce901e074ba09de320a8fc686b "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarymatrix.code.tex" 1546728038 4202 e655aa2657da1088ec7745ece2876c4c "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryquotes.code.tex" 1546728038 3931 5fb0eaae891015bd03ff91a20998aec4 "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarytopaths.code.tex" 1576793519 11544 2a5d66a3270abf4ef673e8a0b7734a90 "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex" 1576967981 187592 7922ceab1864698dec4c84978d5b182f "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/libraries/pgflibraryarrows.code.tex" 1546728038 31874 d843d507175f2bdfa3abf01f0349dac8 "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/libraries/pgflibraryarrows.meta.code.tex" 1546728038 58801 c503519b1e019b14dc7fb801de6de024 "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/libraries/pgflibraryplothandlers.code.tex" 1546728038 32995 a4d54c043ae5274ceaaddeb36ad43a6f "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfint.code.tex" 1557692582 3063 8c415c68a0f3394e45cfeca0b65f6ee6 "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex" 1557692582 521 c70cf6ad609de83a27ee7929eb356332 "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathcalc.code.tex" 1557692582 13391 933cab19c6d27039dbfc487330d1005a "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfloat.code.tex" 1557692582 104938 15f2d8bdabd6bf9ca70f62cd8e3d4940 "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.base.code.tex" 1557692582 10157 218d58ab074e5bd0d027de45ec64cc00 "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.basic.code.tex" 1576793519 28176 568b081ec39645f2db1a29fbd0c635e2 "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.code.tex" 1562964315 9054 388d21239a1b6df2cc8beaae31c976b0 "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.comparison.code.tex" 1557692582 3865 cddf7ddc80f018587c55afdcc79fc333 "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.integerarithmetics.code.tex" 1557692582 3177 27d85c44fbfe09ff3b2cf2879e3ea434 "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.misc.code.tex" 1557692582 10925 df50b8a6e5660a585e3a2bf55726dcc8 "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.random.code.tex" 1562964315 7787 1750fc3f164703caf31fc8ea9218c67e "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.round.code.tex" 1557692582 3379 cbd0948a550bd7a495a160ca6beee9ed "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.trigonometric.code.tex" 1557692582 92405 bba89470858d7b0788a9c09331c39653 "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathparser.code.tex" 1576793519 36526 453db1f8626a56b5ebb0fad496d6a39f "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathutil.code.tex" 1576793519 8471 b18959397c76e1e582402ab9f592ed9f "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/modules/pgfmodulematrix.code.tex" 1576793519 21201 46a4dded6619f990ac7347f99fbaac9f "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/modules/pgfmoduleplot.code.tex" 1557692582 16121 9e240115374a8d489f2f786115df83a9 "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/modules/pgfmoduleshapes.code.tex" 1576793519 43259 3e05ba63539916af2eaca603c2eda780 "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/pgf.revision.tex" 1578520427 465 1f401ab1e7fc6cb7ede39e96c66531fd "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/systemlayer/pgf.cfg" 1557692582 926 70ff613fabeb70f5d1673dc0c93987bd "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-pdf.def" 1557692582 5546 3586827e6032c95512b2a6682d2979a3 "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-pdftex.def" 1562964315 12603 c02869ea216d842c29d52fae8738264e "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code.tex" 1557692582 60269 e86bc0081af83a4ad47e4500ee09a2e4 "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/systemlayer/pgfsysprotocol.code.tex" 1557692582 1896 82c274ff520f9e450ccea4e3ef4edc12 "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/systemlayer/pgfsyssoftpath.code.tex" 1557692582 7778 a25a32a10ca820357491d4c7b3ac02ea "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgffor.code.tex" 1562964315 23777 cb6c8f02f87d86d621f5cb92c44f4998 "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex" 1576793519 36815 f7f1772c398f07af2cb741992963045c "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgfkeysfiltered.code.tex" 1562964315 37439 bd44d50aef702b03193f731207931834 "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgfrcs.code.tex" 1557692582 4494 7e5ace0ccf59408f2cf63219a5d36927 "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgfutil-common-lists.tex" 1557692582 7250 03b2b9fb5fa38e7ca5cc3c45860fb210 "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgfutil-common.tex" 1576793519 28309 488ccc6c701bbdd1bf671f708757aa5c "" + "/usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgfutil-latex.def" 1562964315 6286 1bd76fc45da9929ab2a64f51cba3ab6f "" + "/usr/share/texlive/texmf-dist/tex/generic/tikz-cd/tikzlibrarycd.code.tex" 1542750634 23113 777d022ec96400121479223b4e174a8d "" + "/usr/share/texlive/texmf-dist/tex/generic/ulem/ulem.sty" 1578692523 15682 94f55b803e160cf7fb6e4d77d07cfe1d "" + "/usr/share/texlive/texmf-dist/tex/generic/uniquecounter/uniquecounter.sty" 1576624663 7008 f92eaa0a3872ed622bbf538217cd2ab7 "" + "/usr/share/texlive/texmf-dist/tex/generic/xkeyval/keyval.tex" 1403829539 2725 fc34ef3ccb37ba15a640e8fca6190bca "" + "/usr/share/texlive/texmf-dist/tex/generic/xkeyval/xkeyval.tex" 1417732693 19231 26434a5656c684f5ffb1f26f98006baa "" + "/usr/share/texlive/texmf-dist/tex/generic/xkeyval/xkvutils.tex" 1403829539 7677 6f5ce7c1124cad7ec57d05b2562bd8fe "" + "/usr/share/texlive/texmf-dist/tex/latex/ae/ae.sty" 1191308783 1225 5aef800ba6cda7885d41428e026f49e3 "" + "/usr/share/texlive/texmf-dist/tex/latex/ae/aecompl.sty" 1191308783 1338 d60c03fa26e0ef681e85d0811bcc2388 "" + "/usr/share/texlive/texmf-dist/tex/latex/ae/t1aer.fd" 1191308783 1844 da911cbbb4e7e5dc2776545b8b9cbc06 "" + "/usr/share/texlive/texmf-dist/tex/latex/ae/t1aett.fd" 1191308783 1265 104c75383e0b9b5fac7ca7880a6cdf30 "" + "/usr/share/texlive/texmf-dist/tex/latex/algorithm2e/algorithm2e.sty" 1500498588 167160 d91cee26d3ef5727644d2110445741dd "" + "/usr/share/texlive/texmf-dist/tex/latex/amscls/amsthm.sty" 1513722769 12604 3dec726c041422879dc3268237f09026 "" + "/usr/share/texlive/texmf-dist/tex/latex/amsfonts/amsfonts.sty" 1359763108 5949 3f3fd50a8cc94c3d4cbf4fc66cd3df1c "" + "/usr/share/texlive/texmf-dist/tex/latex/amsfonts/amssymb.sty" 1359763108 13829 94730e64147574077f8ecfea9bb69af4 "" + "/usr/share/texlive/texmf-dist/tex/latex/amsfonts/ueur.fd" 1359763108 1065 55c4c6a48223d6c0832237c226be423c "" + "/usr/share/texlive/texmf-dist/tex/latex/amsfonts/umsa.fd" 1359763108 961 6518c6525a34feb5e8250ffa91731cff "" + "/usr/share/texlive/texmf-dist/tex/latex/amsfonts/umsb.fd" 1359763108 961 d02606146ba5601b5645f987c92e6193 "" + "/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsbsy.sty" 1523134290 2211 ca7ce284ab93c8eecdc6029dc5ccbd73 "" + "/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsgen.sty" 1523134290 4161 7f6eb9092061a11f87d08ed13515b48d "" + "/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsmath.sty" 1580683321 85660 baee036978c7a91f4e2bba43f05e5945 "" + "/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsopn.sty" 1523134290 4116 32e6abd27229755a83a8b7f18e583890 "" + "/usr/share/texlive/texmf-dist/tex/latex/amsmath/amstext.sty" 1523134290 2432 8ff93b1137020e8f21930562a874ae66 "" + "/usr/share/texlive/texmf-dist/tex/latex/atveryend/atveryend.sty" 1576191570 19336 ce7ae9438967282886b3b036cfad1e4d "" + "/usr/share/texlive/texmf-dist/tex/latex/auxhook/auxhook.sty" 1576625391 3935 57aa3c3e203a5c2effb4d2bd2efbc323 "" + "/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty" 1581632200 4947 0c2888dd88121ae675fc6e82213623ba "" + "/usr/share/texlive/texmf-dist/tex/latex/base/ifthen.sty" 1580683321 5159 892429808d9e0e2b3548aaefd9a06ed0 "" + "/usr/share/texlive/texmf-dist/tex/latex/base/ot4enc.def" 1581632200 4737 67abade8a6d72c5104a99168f35bc1b1 "" + "/usr/share/texlive/texmf-dist/tex/latex/datetime/datetime-defaults.sty" 1427500626 4105 4c80eaed8cd4f9a80cc6244c0adeb81f "" + "/usr/share/texlive/texmf-dist/tex/latex/datetime/datetime.sty" 1427500626 27587 b023ffe1328fa89e7f133201d87029de "" + "/usr/share/texlive/texmf-dist/tex/latex/enumitem/enumitem.sty" 1561238569 51697 f8f08183cd2080d9d18a41432d651dfb "" + "/usr/share/texlive/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty" 1579991033 13886 d1306dcf79a944f6988e688c1785f9ce "" + "/usr/share/texlive/texmf-dist/tex/latex/etoolbox/etoolbox.sty" 1569190624 45259 743c52a37a6e5ed83cfe0e128b2da10d "" + "/usr/share/texlive/texmf-dist/tex/latex/float/float.sty" 1137110151 6749 16d2656a1984957e674b149555f1ea1d "" + "/usr/share/texlive/texmf-dist/tex/latex/fmtcount/fc-english.def" 1580337424 14353 f66b7dd28616119c2519cd5cc4dcae14 "" + "/usr/share/texlive/texmf-dist/tex/latex/fmtcount/fcnumparser.sty" 1580337424 12389 43a81443714469abac77ce09f44ad2e2 "" + "/usr/share/texlive/texmf-dist/tex/latex/fmtcount/fcprefix.sty" 1580337424 12098 5c732241af77b5f0e56e640b7d538395 "" + "/usr/share/texlive/texmf-dist/tex/latex/fmtcount/fmtcount.sty" 1580337424 30872 e808a5f6aa06dfbaac41eed6b96919ac "" + "/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty" 1578002852 41601 9cf6c5257b1bc7af01a58859749dd37a "" + "/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg" 1459978653 1213 620bba36b25224fa9b7e1ccb4ecb76fd "" + "/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/graphics.cfg" 1465944070 1224 978390e9c2234eab29404bc21b268d1e "" + "/usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def" 1515537368 17334 520b9b85ad8a2a48eda3f643e27a5179 "" + "/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty" 1580683321 16932 04729abe63b66ec59ea56edcd722b058 "" + "/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty" 1580683321 9067 1b996612394a52e1efe89c8bfe8a5892 "" + "/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty" 1580683321 3976 d7fa7d81d2870d509d25b17d0245e735 "" + "/usr/share/texlive/texmf-dist/tex/latex/hycolor/hycolor.sty" 1580250785 17914 4c28a13fc3d975e6e81c9bea1d697276 "" + "/usr/share/texlive/texmf-dist/tex/latex/hyperref/hpdftex.def" 1579642962 50630 3d9728faf8630190cf601ce2cbe470d9 "" + "/usr/share/texlive/texmf-dist/tex/latex/hyperref/hyperref.sty" 1579642962 238752 60dd338d71b6a4ab2192131f73dc908b "" + "/usr/share/texlive/texmf-dist/tex/latex/hyperref/nameref.sty" 1579642962 13244 0070bcab7b5a88187847128d22faf4d8 "" + "/usr/share/texlive/texmf-dist/tex/latex/hyperref/pd1enc.def" 1579642962 14134 32b36577d311ddb6522413c7581ee968 "" + "/usr/share/texlive/texmf-dist/tex/latex/ifoddpage/ifoddpage.sty" 1461535682 2148 0426cd8bb94163c1e23726d0c15e2c21 "" + "/usr/share/texlive/texmf-dist/tex/latex/kvoptions/kvoptions.sty" 1575152344 22520 c4c2dab203104295e1e618be7e5c0f5b "" + "/usr/share/texlive/texmf-dist/tex/latex/l3backend/l3backend-pdfmode.def" 1580854751 25404 9d60f463a00d154207ec0048dee27cf0 "" + "/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg" 1279039959 678 4792914a8f45be57bb98413425e4c7af "" + "/usr/share/texlive/texmf-dist/tex/latex/letltxmacro/letltxmacro.sty" 1575499565 5766 13a9e8766c47f30327caf893ece86ac8 "" + "/usr/share/texlive/texmf-dist/tex/latex/mathtools/mathtools.sty" 1579298046 55081 be7d8405cd93834f75bdf98c6521d2a0 "" + "/usr/share/texlive/texmf-dist/tex/latex/mathtools/mhsetup.sty" 1496786006 5317 cf75154a8a7e6436f05a5be497f0b05e "" + "/usr/share/texlive/texmf-dist/tex/latex/microtype/microtype-pdftex.def" 1574121697 49144 f65726c0bb1ab4ed492745853eff47bf "" + "/usr/share/texlive/texmf-dist/tex/latex/microtype/microtype.cfg" 1574121697 24293 cbbba0a351268f01b03f4a3b8b367d3c "" + "/usr/share/texlive/texmf-dist/tex/latex/microtype/microtype.sty" 1574121697 71539 3e8331ef062d90caeae5fc7360dcd5bf "" + "/usr/share/texlive/texmf-dist/tex/latex/microtype/mt-cmr.cfg" 1570829597 22870 ec010715141eabee449fb667c425a676 "" + "/usr/share/texlive/texmf-dist/tex/latex/microtype/mt-eur.cfg" 1570829597 3653 8ef981e9a5d286e0d9d62afcc257c267 "" + "/usr/share/texlive/texmf-dist/tex/latex/microtype/mt-msa.cfg" 1570829597 5893 1a8b936193a3ad84972b7098edd47fb7 "" + "/usr/share/texlive/texmf-dist/tex/latex/microtype/mt-msb.cfg" 1570829597 5558 8dd91de9252789fb361ad96b452fc4a7 "" + "/usr/share/texlive/texmf-dist/tex/latex/ms/everyshi.sty" 1177890616 3878 6aa7c08ff2621006e0603349e40a30a8 "" + "/usr/share/texlive/texmf-dist/tex/latex/multirow/multirow.sty" 1559339157 5486 a1d954b09782ba0acd8a8abfd98e1028 "" + "/usr/share/texlive/texmf-dist/tex/latex/mwcls/mw10.clo" 1494801671 5801 ee161ef8a74e1cd2b05963f2899f5ec4 "" + "/usr/share/texlive/texmf-dist/tex/latex/mwcls/mwart.cls" 1494801671 37342 19587925915f958fd049d761719c7e39 "" + "/usr/share/texlive/texmf-dist/tex/latex/pdftexcmds/pdftexcmds.sty" 1574631863 19963 36fd8e818f9f0f32e2db8413d4970122 "" + "/usr/share/texlive/texmf-dist/tex/latex/pgf/basiclayer/pgf.sty" 1546728038 1090 d20f587ea9464d1841bd0d13d3ff9856 "" + "/usr/share/texlive/texmf-dist/tex/latex/pgf/basiclayer/pgfcore.sty" 1288312291 410 5bf12ea7330e5f12c445332a4fe9a263 "" + "/usr/share/texlive/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version-0-65.sty" 1546728038 21013 e98e1aaaf40d31632787c2bd25d24b57 "" + "/usr/share/texlive/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version-1-18.sty" 1546728038 989 2cf3da8e8ec55131c49389428d565e37 "" + "/usr/share/texlive/texmf-dist/tex/latex/pgf/frontendlayer/libraries/tikzlibraryexternal.code.tex" 1557692582 4032 5195761335c7fffcd19348b024d9d881 "" + "/usr/share/texlive/texmf-dist/tex/latex/pgf/frontendlayer/tikz.sty" 1203877327 339 592cf35cba3d400082b8a9a5d0199d70 "" + "/usr/share/texlive/texmf-dist/tex/latex/pgf/math/pgfmath.sty" 1393459310 306 0796eafca5e159e6ec2167a6d22d81b1 "" + "/usr/share/texlive/texmf-dist/tex/latex/pgf/systemlayer/pgfsys.sty" 1393459310 443 0b2e781830192df35c0fd357cf13e26e "" + "/usr/share/texlive/texmf-dist/tex/latex/pgf/utilities/pgffor.sty" 1393459310 348 8927fde343487e003b01a4c2ca34073b "" + "/usr/share/texlive/texmf-dist/tex/latex/pgf/utilities/pgfkeys.sty" 1203727794 274 4cad6e665cc93ac2ac979039a94fa1e1 "" + "/usr/share/texlive/texmf-dist/tex/latex/pgf/utilities/pgfrcs.sty" 1203877327 325 2bcd023400636339210573e2b3ee298b "" + "/usr/share/texlive/texmf-dist/tex/latex/polski/omlplm.fd" 1494024529 1553 7e55eec7e7ffbbc85187034f06b5977a "" + "/usr/share/texlive/texmf-dist/tex/latex/polski/omsplsy.fd" 1494024529 1472 cdbddbc0209f1dca4b38ccca913f65d7 "" + "/usr/share/texlive/texmf-dist/tex/latex/polski/omxplex.fd" 1494024529 1283 a1205ac8611390c6de04f8d76756c3c4 "" + "/usr/share/texlive/texmf-dist/tex/latex/polski/ot4cmr.fd" 1494024529 2599 8c16345f9109faed2ca2ff52e16d8a6f "" + "/usr/share/texlive/texmf-dist/tex/latex/polski/polski.sty" 1494024529 13310 401406f54546887504ce1857a307089b "" + "/usr/share/texlive/texmf-dist/tex/latex/program/program.sty" 1494024540 35392 0413f78e33ec5200b73df2ae2154c688 "" + "/usr/share/texlive/texmf-dist/tex/latex/refcount/refcount.sty" 1576624809 9878 9e94e8fa600d95f9c7731bb21dfb67a4 "" + "/usr/share/texlive/texmf-dist/tex/latex/relsize/relsize.sty" 1369619135 15542 c4cc3164fe24f2f2fbb06eb71b1da4c4 "" + "/usr/share/texlive/texmf-dist/tex/latex/rerunfilecheck/rerunfilecheck.sty" 1575674187 9715 b051d5b493d9fe5f4bc251462d039e5f "" + "/usr/share/texlive/texmf-dist/tex/latex/tikz-cd/tikz-cd.sty" 1542750634 858 fe1b4d077c61915fa7d05919d4f7282f "" + "/usr/share/texlive/texmf-dist/tex/latex/tools/array.sty" 1580683321 12560 ce3f59ceae9d9a27bfe037d6bf1d903c "" + "/usr/share/texlive/texmf-dist/tex/latex/tools/calc.sty" 1580683321 10216 5efd55f2010055e7b7875afd6a75be82 "" + "/usr/share/texlive/texmf-dist/tex/latex/tools/multicol.sty" 1580683321 31532 04852e45d7c17cb384689d2f83b628d3 "" + "/usr/share/texlive/texmf-dist/tex/latex/tools/tabularx.sty" 1580683321 7148 4ba718200276533b3a293c311a9349e0 "" + "/usr/share/texlive/texmf-dist/tex/latex/tools/xspace.sty" 1580683321 4546 3e6071704acf4f66392376b7b66ae02c "" + "/usr/share/texlive/texmf-dist/tex/latex/url/url.sty" 1388531844 12796 8edb7d69a20b857904dd0ea757c14ec9 "" + "/usr/share/texlive/texmf-dist/tex/latex/wrapfig/wrapfig.sty" 1137111090 26220 3701aebf80ccdef248c0c20dd062fea9 "" + "/usr/share/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty" 1463002160 55589 34128738f682d033422ca125f82e5d62 "" + "/usr/share/texlive/texmf-dist/tex/latex/xkeyval/xkeyval.sty" 1417732693 4962 9c1069474ff71dbc47d5006555e352d3 "" + "/usr/share/texlive/texmf-dist/web2c/texmf.cnf" 1581979058 38841 ce3692aa899bb693b90b87eaa5d4d84e "" + "/usr/share/texmf/web2c/texmf.cnf" 1581979058 38841 ce3692aa899bb693b90b87eaa5d4d84e "" + "/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map" 1604592067 4770781 1ed1abab22da9c3e2cc82e4db562318b "" + "/var/lib/texmf/web2c/pdftex/pdflatex.fmt" 1604592143 8256331 e4088512eb7526913598ea560e0bc817 "" + "sprawozdanie.aux" 0 -1 0 "pdflatex" + "sprawozdanie.out" 0 -1 0 "pdflatex" + "sprawozdanie.tex" 1606061658 26166 36cca38f7a202a76606227c326afb1fc "" + (generated) + "sprawozdanie.auxlock" + "sprawozdanie.pdf" + "/mnt/c/Users/franc/Documents/anm/sprawozdanie.pdf" + "sprawozdanie.aux" + "/mnt/c/Users/franc/Documents/anm/sprawozdanie.log" + "sprawozdanie.out" + "sprawozdanie.log" diff --git a/semestr-3/anm/sprawozdanie.fls b/semestr-3/anm/sprawozdanie.fls new file mode 100644 index 0000000..9b4dd6f --- /dev/null +++ b/semestr-3/anm/sprawozdanie.fls @@ -0,0 +1,447 @@ +PWD /mnt/c/Users/franc/Documents/anm +INPUT /etc/texmf/web2c/texmf.cnf +INPUT /usr/share/texmf/web2c/texmf.cnf +INPUT /usr/share/texlive/texmf-dist/web2c/texmf.cnf +INPUT /var/lib/texmf/web2c/pdftex/pdflatex.fmt +INPUT /mnt/c/Users/franc/Documents/anm/sprawozdanie.tex +OUTPUT /mnt/c/Users/franc/Documents/anm/sprawozdanie.log +INPUT /usr/share/texlive/texmf-dist/tex/latex/mwcls/mwart.cls +INPUT /usr/share/texlive/texmf-dist/tex/latex/mwcls/mwart.cls +INPUT /usr/share/texlive/texmf-dist/tex/latex/mwcls/mw10.clo +INPUT /usr/share/texlive/texmf-dist/tex/latex/mwcls/mw10.clo +INPUT /usr/share/texlive/texmf-dist/fonts/map/fontname/texfonts.map +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmr9.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmbx9.tfm +INPUT /usr/share/texlive/texmf-dist/tex/latex/polski/polski.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/polski/polski.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/polski/ot4cmr.fd +INPUT /usr/share/texlive/texmf-dist/tex/latex/base/ot4enc.def +INPUT /usr/share/texlive/texmf-dist/tex/latex/polski/ot4cmr.fd +INPUT /usr/share/texlive/texmf-dist/tex/latex/polski/ot4cmr.fd +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/pl/plr10.tfm +INPUT /usr/share/texlive/texmf-dist/tex/latex/datetime/datetime.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/datetime/datetime.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/etoolbox/etoolbox.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/etoolbox/etoolbox.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/fmtcount/fmtcount.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/fmtcount/fmtcount.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/base/ifthen.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/base/ifthen.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/xkeyval/xkeyval.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/xkeyval/xkeyval.sty +INPUT /usr/share/texlive/texmf-dist/tex/generic/xkeyval/xkeyval.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/xkeyval/xkvutils.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/xkeyval/keyval.tex +INPUT /usr/share/texlive/texmf-dist/tex/latex/fmtcount/fcprefix.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/fmtcount/fcprefix.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/fmtcount/fcnumparser.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/fmtcount/fcnumparser.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/amsmath/amsgen.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/amsmath/amsgen.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/datetime/datetime-defaults.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/datetime/datetime-defaults.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/ae/ae.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/ae/ae.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/jknappen/ec/ecrm1000.tfm +INPUT /usr/share/texlive/texmf-dist/tex/latex/ae/aecompl.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/ae/aecompl.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/microtype/microtype.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/microtype/microtype.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/microtype/microtype-pdftex.def +INPUT /usr/share/texlive/texmf-dist/tex/latex/microtype/microtype-pdftex.def +INPUT /usr/share/texlive/texmf-dist/tex/latex/microtype/microtype.cfg +INPUT /usr/share/texlive/texmf-dist/tex/latex/microtype/microtype.cfg +INPUT /usr/share/texlive/texmf-dist/tex/latex/microtype/microtype.cfg +INPUT /usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty +INPUT /usr/share/texlive/texmf-dist/tex/generic/iftex/ifvtex.sty +INPUT /usr/share/texlive/texmf-dist/tex/generic/iftex/ifvtex.sty +INPUT /usr/share/texlive/texmf-dist/tex/generic/iftex/iftex.sty +INPUT /usr/share/texlive/texmf-dist/tex/generic/iftex/iftex.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/algorithm2e/algorithm2e.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/algorithm2e/algorithm2e.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/ifoddpage/ifoddpage.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/ifoddpage/ifoddpage.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/tools/xspace.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/tools/xspace.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/relsize/relsize.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/relsize/relsize.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/enumitem/enumitem.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/enumitem/enumitem.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/graphics.cfg +INPUT /usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/graphics.cfg +INPUT /usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def +INPUT /usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def +INPUT /usr/share/texlive/texmf-dist/tex/generic/ulem/ulem.sty +INPUT /usr/share/texlive/texmf-dist/tex/generic/ulem/ulem.sty +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/latex-fonts/lasy6.tfm +INPUT /usr/share/texlive/texmf-dist/tex/latex/pgf/frontendlayer/tikz.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/pgf/frontendlayer/tikz.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/pgf/basiclayer/pgf.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/pgf/basiclayer/pgf.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/pgf/utilities/pgfrcs.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/pgf/utilities/pgfrcs.sty +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgfutil-common.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgfutil-common-lists.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgfutil-latex.def +INPUT /usr/share/texlive/texmf-dist/tex/latex/ms/everyshi.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/ms/everyshi.sty +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgfrcs.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgfrcs.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/pgf.revision.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/pgf.revision.tex +INPUT /usr/share/texlive/texmf-dist/tex/latex/pgf/basiclayer/pgfcore.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/pgf/basiclayer/pgfcore.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/pgf/systemlayer/pgfsys.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/pgf/systemlayer/pgfsys.sty +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgfkeysfiltered.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/systemlayer/pgf.cfg +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-pdftex.def +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-pdftex.def +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-pdf.def +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/systemlayer/pgfsyssoftpath.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/systemlayer/pgfsyssoftpath.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/systemlayer/pgfsysprotocol.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/systemlayer/pgfsysprotocol.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg +INPUT /usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcore.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcore.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathcalc.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathutil.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathparser.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.basic.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.trigonometric.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.random.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.comparison.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.base.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.round.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.misc.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.integerarithmetics.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfloat.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfint.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathconstruct.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathusage.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcoregraphicstate.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransformations.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcorequick.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreobjects.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathprocessing.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcorearrows.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreshade.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreimage.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreexternal.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcorelayers.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransparency.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepatterns.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcorerdf.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/modules/pgfmoduleshapes.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/modules/pgfmoduleplot.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version-0-65.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version-0-65.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version-1-18.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version-1-18.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/pgf/utilities/pgffor.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/pgf/utilities/pgffor.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/pgf/utilities/pgfkeys.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/pgf/utilities/pgfkeys.sty +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/latex/pgf/math/pgfmath.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/pgf/math/pgfmath.sty +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgffor.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgffor.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/libraries/pgflibraryplothandlers.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/libraries/pgflibraryplothandlers.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/modules/pgfmodulematrix.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarytopaths.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarytopaths.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/latex/pgf/frontendlayer/libraries/tikzlibraryexternal.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/latex/pgf/frontendlayer/libraries/tikzlibraryexternal.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/latex/pdftexcmds/pdftexcmds.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/pdftexcmds/pdftexcmds.sty +INPUT /usr/share/texlive/texmf-dist/tex/generic/infwarerr/infwarerr.sty +INPUT /usr/share/texlive/texmf-dist/tex/generic/infwarerr/infwarerr.sty +INPUT /usr/share/texlive/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty +INPUT /usr/share/texlive/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/atveryend/atveryend.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/atveryend/atveryend.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/atveryend/atveryend.sty +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzexternalshared.code.tex +OUTPUT /mnt/c/Users/franc/Documents/anm/sprawozdanie.auxlock +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/libraries/pgflibraryarrows.meta.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/libraries/pgflibraryarrows.meta.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/libraries/pgflibraryarrows.meta.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarymatrix.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarymatrix.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryarrows.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryarrows.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/libraries/pgflibraryarrows.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/libraries/pgflibraryarrows.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/latex/program/program.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/program/program.sty +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/jknappen/ec/ecrm1440.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/pl/plr12.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/pl/plr7.tfm +INPUT /usr/share/texlive/texmf-dist/tex/latex/polski/omlplm.fd +INPUT /usr/share/texlive/texmf-dist/tex/latex/polski/omlplm.fd +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/pl/plmi12.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/pl/plmi10.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/pl/plmi7.tfm +INPUT /usr/share/texlive/texmf-dist/tex/latex/polski/omsplsy.fd +INPUT /usr/share/texlive/texmf-dist/tex/latex/polski/omsplsy.fd +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/pl/plsy10.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/pl/plsy10.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/pl/plsy7.tfm +INPUT /usr/share/texlive/texmf-dist/tex/latex/polski/omxplex.fd +INPUT /usr/share/texlive/texmf-dist/tex/latex/polski/omxplex.fd +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/pl/plex10.tfm +INPUT /usr/share/texlive/texmf-dist/tex/latex/amsfonts/ueur.fd +INPUT /usr/share/texlive/texmf-dist/tex/latex/amsfonts/ueur.fd +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/amsfonts/euler/eurm10.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/amsfonts/euler/eurm10.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/amsfonts/euler/eurm7.tfm +INPUT /usr/share/texlive/texmf-dist/tex/latex/amsfonts/amsfonts.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/amsfonts/amsfonts.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/amsfonts/amssymb.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/amsfonts/amssymb.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/amsmath/amsmath.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/amsmath/amsmath.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/amsmath/amstext.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/amsmath/amstext.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/amsmath/amsbsy.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/amsmath/amsbsy.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/amsmath/amsopn.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/amsmath/amsopn.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/amscls/amsthm.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/amscls/amsthm.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/tikz-cd/tikz-cd.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/tikz-cd/tikz-cd.sty +INPUT /usr/share/texlive/texmf-dist/tex/generic/tikz-cd/tikzlibrarycd.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/tikz-cd/tikzlibrarycd.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryquotes.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryquotes.code.tex +INPUT /usr/share/texlive/texmf-dist/tex/latex/float/float.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/float/float.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/hyperref/hyperref.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/hyperref/hyperref.sty +INPUT /usr/share/texlive/texmf-dist/tex/generic/kvsetkeys/kvsetkeys.sty +INPUT /usr/share/texlive/texmf-dist/tex/generic/kvsetkeys/kvsetkeys.sty +INPUT /usr/share/texlive/texmf-dist/tex/generic/kvdefinekeys/kvdefinekeys.sty +INPUT /usr/share/texlive/texmf-dist/tex/generic/kvdefinekeys/kvdefinekeys.sty +INPUT /usr/share/texlive/texmf-dist/tex/generic/pdfescape/pdfescape.sty +INPUT /usr/share/texlive/texmf-dist/tex/generic/pdfescape/pdfescape.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/hycolor/hycolor.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/hycolor/hycolor.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/letltxmacro/letltxmacro.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/letltxmacro/letltxmacro.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/auxhook/auxhook.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/auxhook/auxhook.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/kvoptions/kvoptions.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/kvoptions/kvoptions.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/hyperref/pd1enc.def +INPUT /usr/share/texlive/texmf-dist/tex/latex/hyperref/pd1enc.def +INPUT /usr/share/texlive/texmf-dist/tex/generic/intcalc/intcalc.sty +INPUT /usr/share/texlive/texmf-dist/tex/generic/intcalc/intcalc.sty +INPUT /usr/share/texlive/texmf-dist/tex/generic/etexcmds/etexcmds.sty +INPUT /usr/share/texlive/texmf-dist/tex/generic/etexcmds/etexcmds.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/url/url.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/url/url.sty +INPUT /usr/share/texlive/texmf-dist/tex/generic/bitset/bitset.sty +INPUT /usr/share/texlive/texmf-dist/tex/generic/bitset/bitset.sty +INPUT /usr/share/texlive/texmf-dist/tex/generic/bigintcalc/bigintcalc.sty +INPUT /usr/share/texlive/texmf-dist/tex/generic/bigintcalc/bigintcalc.sty +INPUT /usr/share/texlive/texmf-dist/tex/generic/atbegshi/atbegshi.sty +INPUT /usr/share/texlive/texmf-dist/tex/generic/atbegshi/atbegshi.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/hyperref/hpdftex.def +INPUT /usr/share/texlive/texmf-dist/tex/latex/hyperref/hpdftex.def +INPUT /usr/share/texlive/texmf-dist/tex/latex/rerunfilecheck/rerunfilecheck.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/rerunfilecheck/rerunfilecheck.sty +INPUT /usr/share/texlive/texmf-dist/tex/generic/uniquecounter/uniquecounter.sty +INPUT /usr/share/texlive/texmf-dist/tex/generic/uniquecounter/uniquecounter.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/tools/multicol.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/tools/multicol.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/mathtools/mathtools.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/mathtools/mathtools.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/tools/calc.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/tools/calc.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/mathtools/mhsetup.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/mathtools/mhsetup.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/tools/array.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/tools/array.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/wrapfig/wrapfig.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/wrapfig/wrapfig.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/multirow/multirow.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/multirow/multirow.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/tools/tabularx.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/tools/tabularx.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/l3backend/l3backend-pdfmode.def +INPUT /usr/share/texlive/texmf-dist/tex/latex/l3backend/l3backend-pdfmode.def +INPUT /mnt/c/Users/franc/Documents/anm/sprawozdanie.aux +INPUT /mnt/c/Users/franc/Documents/anm/sprawozdanie.aux +OUTPUT /mnt/c/Users/franc/Documents/anm/sprawozdanie.aux +INPUT /usr/share/texlive/texmf-dist/tex/latex/ae/t1aer.fd +INPUT /usr/share/texlive/texmf-dist/tex/latex/ae/t1aer.fd +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/ae/aer10.tfm +INPUT /usr/share/texlive/texmf-dist/tex/latex/fmtcount/fc-english.def +INPUT /usr/share/texlive/texmf-dist/tex/latex/fmtcount/fc-english.def +INPUT /usr/share/texlive/texmf-dist/tex/latex/microtype/mt-cmr.cfg +INPUT /usr/share/texlive/texmf-dist/tex/latex/microtype/mt-cmr.cfg +INPUT /usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii +INPUT /usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii +INPUT /usr/share/texlive/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg +INPUT /usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg +INPUT /usr/share/texlive/texmf-dist/tex/latex/hyperref/nameref.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/hyperref/nameref.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/refcount/refcount.sty +INPUT /usr/share/texlive/texmf-dist/tex/latex/refcount/refcount.sty +INPUT /usr/share/texlive/texmf-dist/tex/generic/gettitlestring/gettitlestring.sty +INPUT /usr/share/texlive/texmf-dist/tex/generic/gettitlestring/gettitlestring.sty +OUTPUT /mnt/c/Users/franc/Documents/anm/sprawozdanie.out +OUTPUT /mnt/c/Users/franc/Documents/anm/sprawozdanie.pdf +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/ae/aer12.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/pl/plr5.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/pl/plmi5.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/pl/plsy5.tfm +INPUT /usr/share/texlive/texmf-dist/tex/latex/microtype/mt-eur.cfg +INPUT /usr/share/texlive/texmf-dist/tex/latex/microtype/mt-eur.cfg +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/amsfonts/euler/eurm5.tfm +INPUT /usr/share/texlive/texmf-dist/tex/latex/amsfonts/umsa.fd +INPUT /usr/share/texlive/texmf-dist/tex/latex/amsfonts/umsa.fd +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/amsfonts/symbols/msam10.tfm +INPUT /usr/share/texlive/texmf-dist/tex/latex/microtype/mt-msa.cfg +INPUT /usr/share/texlive/texmf-dist/tex/latex/microtype/mt-msa.cfg +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/amsfonts/symbols/msam7.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/amsfonts/symbols/msam5.tfm +INPUT /usr/share/texlive/texmf-dist/tex/latex/amsfonts/umsb.fd +INPUT /usr/share/texlive/texmf-dist/tex/latex/amsfonts/umsb.fd +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/amsfonts/symbols/msbm10.tfm +INPUT /usr/share/texlive/texmf-dist/tex/latex/microtype/mt-msb.cfg +INPUT /usr/share/texlive/texmf-dist/tex/latex/microtype/mt-msb.cfg +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/amsfonts/symbols/msbm7.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/amsfonts/symbols/msbm5.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/ae/aer17.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/ae/aeb10.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/ae/aeb10.tfm +INPUT /usr/share/texlive/texmf-dist/tex/latex/ae/t1aett.fd +INPUT /usr/share/texlive/texmf-dist/tex/latex/ae/t1aett.fd +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/ae/aett10.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/vf/public/ae/aer12.vf +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmr12.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmmi12.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmmi12.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmsy10.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmu10.tfm +INPUT /var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map +INPUT /usr/share/texlive/texmf-dist/fonts/vf/public/ae/aer17.vf +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmr17.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmr17.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmmi12.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmmi12.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmsy10.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmu10.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/vf/public/ae/aeb10.vf +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmb10.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmmib10.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmmib10.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmbsy10.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/vf/public/ae/aer10.vf +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmmi10.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmu10.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/vf/public/ae/aett10.vf +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmtt10.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmmib10.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/vf/public/ae/aeb10.vf +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmb10.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmmib10.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmbsy10.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/ae/aeti10.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/ae/aer7.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/ae/aett8.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/ae/aer5.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/ae/aett8.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/ae/aer9.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/vf/public/ae/aeti10.vf +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmti10.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmsl10.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/vf/public/ae/aer9.vf +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmmi9.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmmi9.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmsy9.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmu10.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/pl/plr9.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/pl/plr6.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/pl/plmi9.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/pl/plmi6.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/pl/plsy9.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/pl/plsy6.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/amsfonts/euler/eurm10.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/amsfonts/euler/eurm7.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/amsfonts/symbols/msam10.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/amsfonts/symbols/msam7.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/amsfonts/symbols/msbm10.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/amsfonts/symbols/msbm7.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/ae/aeti9.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/ae/aett9.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/vf/public/ae/aeti9.vf +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmti9.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmsl9.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/vf/public/ae/aett9.vf +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmtt9.tfm +INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmmib10.tfm +INPUT /mnt/c/Users/franc/Documents/anm/sprawozdanie.aux +INPUT /mnt/c/Users/franc/Documents/anm/sprawozdanie.out +INPUT /mnt/c/Users/franc/Documents/anm/sprawozdanie.out +INPUT /usr/share/texlive/texmf-dist/fonts/enc/dvips/pl/plmi.enc +INPUT /usr/share/texlive/texmf-dist/fonts/enc/dvips/pl/plrm.enc +INPUT /usr/share/texlive/texmf-dist/fonts/enc/dvips/pl/plms.enc +INPUT /usr/share/texlive/texmf-dist/fonts/enc/dvips/pl/plme.enc +INPUT /usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmb10.pfb +INPUT /usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi10.pfb +INPUT /usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi12.pfb +INPUT /usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi9.pfb +INPUT /usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmmib10.pfb +INPUT /usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb +INPUT /usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12.pfb +INPUT /usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr17.pfb +INPUT /usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr9.pfb +INPUT /usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy10.pfb +INPUT /usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmti10.pfb +INPUT /usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmti9.pfb +INPUT /usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmtt10.pfb +INPUT /usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmtt9.pfb +INPUT /usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/symbols/msbm10.pfb +INPUT /usr/share/texlive/texmf-dist/fonts/type1/public/pl/plex10.pfb +INPUT /usr/share/texlive/texmf-dist/fonts/type1/public/pl/plmi10.pfb +INPUT /usr/share/texlive/texmf-dist/fonts/type1/public/pl/plmi5.pfb +INPUT /usr/share/texlive/texmf-dist/fonts/type1/public/pl/plmi7.pfb +INPUT /usr/share/texlive/texmf-dist/fonts/type1/public/pl/plmi9.pfb +INPUT /usr/share/texlive/texmf-dist/fonts/type1/public/pl/plr10.pfb +INPUT /usr/share/texlive/texmf-dist/fonts/type1/public/pl/plr7.pfb +INPUT /usr/share/texlive/texmf-dist/fonts/type1/public/pl/plr9.pfb +INPUT /usr/share/texlive/texmf-dist/fonts/type1/public/pl/plsy10.pfb +INPUT /usr/share/texlive/texmf-dist/fonts/type1/public/pl/plsy7.pfb diff --git a/semestr-3/anm/sprawozdanie.log b/semestr-3/anm/sprawozdanie.log new file mode 100644 index 0000000..a7c9e93 --- /dev/null +++ b/semestr-3/anm/sprawozdanie.log @@ -0,0 +1,1353 @@ +This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian) (preloaded format=pdflatex 2020.11.5) 22 NOV 2020 17:19 +entering extended mode + restricted \write18 enabled. + %&-line parsing enabled. +**sprawozdanie.tex +(./sprawozdanie.tex +LaTeX2e <2020-02-02> patch level 2 +L3 programming layer <2020-02-14> +(/usr/share/texlive/texmf-dist/tex/latex/mwcls/mwart.cls +Document Class: mwart 2017/05/13 v0.75 A LaTeX document class (MW) +*** Beta version. Formatting may change +*** in future versions of this class. +(/usr/share/texlive/texmf-dist/tex/latex/mwcls/mw10.clo +File: mw10.clo 2017/05/13 v0.75 A document class size option (MW) +) +\@parindent=\dimen134 +\c@part=\count167 +\c@section=\count168 +\c@subsection=\count169 +\c@subsubsection=\count170 +\c@paragraph=\count171 +\c@subparagraph=\count172 +\c@figure=\count173 +\c@table=\count174 +\abovecaptionskip=\skip47 +\belowcaptionskip=\skip48 +\bibindent=\dimen135 +) +(/usr/share/texlive/texmf-dist/tex/latex/polski/polski.sty +Package: polski 2017/05/04 v1.3.4 Polish language package + + Switching to Polish text encoding and Polish maths fonts. +(/usr/share/texlive/texmf-dist/tex/latex/base/ot4enc.def +File: ot4enc.def 2020/02/11 v2.0o Standard LaTeX file +Now handling font encoding OT4 ... +... no UTF-8 mapping file for font encoding OT4 +) +LaTeX Font Info: Trying to load font information for OT4+cmr on input line 3 +60. + +(/usr/share/texlive/texmf-dist/tex/latex/polski/ot4cmr.fd +File: ot4cmr.fd 2008/02/24 v1.2.1 Font defs for fonts PL (MW) +) +LaTeX Font Info: Overwriting math alphabet `\mathbf' in version `normal' +(Font) OT1/cmr/bx/n --> OT4/cmr/bx/n on input line 360. +LaTeX Font Info: Overwriting math alphabet `\mathsf' in version `normal' +(Font) OT1/cmss/m/n --> OT4/cmss/m/n on input line 360. +LaTeX Font Info: Overwriting math alphabet `\mathit' in version `normal' +(Font) OT1/cmr/m/it --> OT4/cmr/m/it on input line 360. +LaTeX Font Info: Overwriting math alphabet `\mathtt' in version `normal' +(Font) OT1/cmtt/m/n --> OT4/cmtt/m/n on input line 360. +LaTeX Font Info: Overwriting math alphabet `\mathsf' in version `bold' +(Font) OT1/cmss/bx/n --> OT4/cmss/bx/n on input line 360. +LaTeX Font Info: Overwriting math alphabet `\mathit' in version `bold' +(Font) OT1/cmr/bx/it --> OT4/cmr/bx/it on input line 360. +LaTeX Font Info: Encoding `OT1' has changed to `OT4' for symbol font +(Font) `operators' in the math version `normal' on input line 360. + +LaTeX Font Info: Overwriting symbol font `operators' in version `normal' +(Font) OT1/cmr/m/n --> OT4/cmr/m/n on input line 360. +LaTeX Font Info: Overwriting symbol font `letters' in version `normal' +(Font) OML/cmm/m/it --> OML/plm/m/it on input line 360. +LaTeX Font Info: Overwriting symbol font `symbols' in version `normal' +(Font) OMS/cmsy/m/n --> OMS/plsy/m/n on input line 360. +LaTeX Font Info: Overwriting symbol font `largesymbols' in version `normal' +(Font) OMX/cmex/m/n --> OMX/plex/m/n on input line 360. +LaTeX Font Info: Encoding `OT1' has changed to `OT4' for symbol font +(Font) `operators' in the math version `bold' on input line 360. +LaTeX Font Info: Overwriting symbol font `operators' in version `bold' +(Font) OT1/cmr/bx/n --> OT4/cmr/bx/n on input line 360. +LaTeX Font Info: Overwriting symbol font `letters' in version `bold' +(Font) OML/cmm/b/it --> OML/plm/b/it on input line 360. +LaTeX Font Info: Overwriting symbol font `symbols' in version `bold' +(Font) OMS/cmsy/b/n --> OMS/plsy/b/n on input line 360. +) +(/usr/share/texlive/texmf-dist/tex/latex/datetime/datetime.sty +Package: datetime 2015/03/20 v2.60 Date Time Package + +(/usr/share/texlive/texmf-dist/tex/latex/etoolbox/etoolbox.sty +Package: etoolbox 2019/09/21 v2.5h e-TeX tools for LaTeX (JAW) +\etb@tempcnta=\count175 +) +(/usr/share/texlive/texmf-dist/tex/latex/fmtcount/fmtcount.sty +Package: fmtcount 2020/01/30 v3.06 + +(/usr/share/texlive/texmf-dist/tex/latex/base/ifthen.sty +Package: ifthen 2014/09/29 v1.1c Standard LaTeX ifthen package (DPC) +) +(/usr/share/texlive/texmf-dist/tex/latex/xkeyval/xkeyval.sty +Package: xkeyval 2014/12/03 v2.7a package option processing (HA) + +(/usr/share/texlive/texmf-dist/tex/generic/xkeyval/xkeyval.tex +(/usr/share/texlive/texmf-dist/tex/generic/xkeyval/xkvutils.tex +\XKV@toks=\toks14 +\XKV@tempa@toks=\toks15 + +(/usr/share/texlive/texmf-dist/tex/generic/xkeyval/keyval.tex)) +\XKV@depth=\count176 +File: xkeyval.tex 2014/12/03 v2.7a key=value parser (HA) +)) +(/usr/share/texlive/texmf-dist/tex/latex/fmtcount/fcprefix.sty +Package: fcprefix 2012/09/28 + +(/usr/share/texlive/texmf-dist/tex/latex/fmtcount/fcnumparser.sty +Package: fcnumparser 2017/06/15 +\fc@digit@counter=\count177 +)) +(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsgen.sty +File: amsgen.sty 1999/11/30 v2.0 generic functions +\@emptytoks=\toks16 +\ex@=\dimen136 +) +\c@padzeroesN=\count178 +\fc@tmpcatcode=\count179 +\@DT@modctr=\count180 +\@ordinalctr=\count181 +\@orgargctr=\count182 +\@strctr=\count183 +\@tmpstrctr=\count184 +\@DT@loopN=\count185 +\@DT@X=\count186 +) +(/usr/share/texlive/texmf-dist/tex/latex/datetime/datetime-defaults.sty +Package: datetime-defaults 2013/09/10 +) +\@day=\count187 +\@month=\count188 +\@year=\count189 +\c@HOUR=\count190 +\c@HOURXII=\count191 +\c@MINUTE=\count192 +\c@TOHOUR=\count193 +\c@TOMINUTE=\count194 +\c@SECOND=\count195 +\currenthour=\count196 +\currentminute=\count197 +\currentsecond=\count198 +Package datetime Info: No datetime.cfg file found, using default settings on in +put line 308. +\@dtctr=\count199 +\dayofyear=\count266 +\dayofweek=\count267 +LaTeX Info: Redefining \today on input line 736. +\dt@a=\toks17 +\dt@b=\toks18 +) +(/usr/share/texlive/texmf-dist/tex/latex/ae/ae.sty +Package: ae 2001/02/12 1.3 Almost European Computer Modern + +(/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty +Package: fontenc 2020/02/11 v2.0o Standard LaTeX package +)) +(/usr/share/texlive/texmf-dist/tex/latex/ae/aecompl.sty +Package: aecompl 1998/07/23 0.9 T1 Complements for AE fonts (D. Roegel) +) +(/usr/share/texlive/texmf-dist/tex/latex/microtype/microtype.sty +Package: microtype 2019/11/18 v2.7d Micro-typographical refinements (RS) +\MT@toks=\toks19 +\MT@count=\count268 +LaTeX Info: Redefining \textls on input line 790. +\MT@outer@kern=\dimen137 +LaTeX Info: Redefining \textmicrotypecontext on input line 1354. +\MT@listname@count=\count269 + +(/usr/share/texlive/texmf-dist/tex/latex/microtype/microtype-pdftex.def +File: microtype-pdftex.def 2019/11/18 v2.7d Definitions specific to pdftex (RS) + +LaTeX Info: Redefining \lsstyle on input line 914. +LaTeX Info: Redefining \lslig on input line 914. +\MT@outer@space=\skip49 +) +Package microtype Info: Loading configuration file microtype.cfg. + +(/usr/share/texlive/texmf-dist/tex/latex/microtype/microtype.cfg +File: microtype.cfg 2019/11/18 v2.7d microtype main configuration file (RS) +)) +(/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty +Package: geometry 2020/01/02 v5.9 Page Geometry + +(/usr/share/texlive/texmf-dist/tex/generic/iftex/ifvtex.sty +Package: ifvtex 2019/10/25 v1.7 ifvtex legacy package. Use iftex instead. + +(/usr/share/texlive/texmf-dist/tex/generic/iftex/iftex.sty +Package: iftex 2019/11/07 v1.0c TeX engine tests +)) +\Gm@cnth=\count270 +\Gm@cntv=\count271 +\c@Gm@tempcnt=\count272 +\Gm@bindingoffset=\dimen138 +\Gm@wd@mp=\dimen139 +\Gm@odd@mp=\dimen140 +\Gm@even@mp=\dimen141 +\Gm@layoutwidth=\dimen142 +\Gm@layoutheight=\dimen143 +\Gm@layouthoffset=\dimen144 +\Gm@layoutvoffset=\dimen145 +\Gm@dimlist=\toks20 +) +*geometry* verbose mode - [ newgeometry ] result: +* driver: +* paper: +* layout: +* layoutoffset:(h,v)=(0.0pt,0.0pt) +* modes: +* h-part:(L,W,R)=(71.13188pt, 455.24411pt, 71.13188pt) +* v-part:(T,H,B)=(71.13188pt, 702.78308pt, 71.13188pt) +* \paperwidth=597.50787pt +* \paperheight=845.04684pt +* \textwidth=455.24411pt +* \textheight=702.78308pt +* \oddsidemargin=-1.1381pt +* \evensidemargin=-1.1381pt +* \topmargin=-27.1381pt +* \headheight=12.0pt +* \headsep=14.0pt +* \topskip=10.0pt +* \footskip=24.0pt +* \marginparwidth=0.0pt +* \marginparsep=0.0pt +* \columnsep=25.6802pt +* \skip\footins=9.0pt plus 4.0pt minus 2.0pt +* \hoffset=0.0pt +* \voffset=0.0pt +* \mag=1000 +* \@twocolumnfalse +* \@twosidefalse +* \@mparswitchfalse +* \@reversemarginfalse +* (1in=72.27pt=25.4mm, 1cm=28.453pt) + + +(/usr/share/texlive/texmf-dist/tex/latex/algorithm2e/algorithm2e.sty +Package: algorithm2e 2017/07/18 v5.2 algorithms environments +\c@AlgoLine=\count273 +\algocf@hangindent=\skip50 + +(/usr/share/texlive/texmf-dist/tex/latex/ifoddpage/ifoddpage.sty +Package: ifoddpage 2016/04/23 v1.1 Conditionals for odd/even page detection +\c@checkoddpage=\count274 +) +(/usr/share/texlive/texmf-dist/tex/latex/tools/xspace.sty +Package: xspace 2014/10/28 v1.13 Space after command names (DPC,MH) +) +(/usr/share/texlive/texmf-dist/tex/latex/relsize/relsize.sty +Package: relsize 2013/03/29 ver 4.1 +) +\skiptotal=\skip51 +\skiplinenumber=\skip52 +\skiprule=\skip53 +\skiphlne=\skip54 +\skiptext=\skip55 +\skiplength=\skip56 +\algomargin=\skip57 +\skipalgocfslide=\skip58 +\algowidth=\dimen146 +\inoutsize=\dimen147 +\inoutindent=\dimen148 +\interspacetitleruled=\dimen149 +\interspacealgoruled=\dimen150 +\interspacetitleboxruled=\dimen151 +\algocf@ruledwidth=\skip59 +\algocf@inoutbox=\box45 +\algocf@inputbox=\box46 +\AlCapSkip=\skip60 +\AlCapHSkip=\skip61 +\algoskipindent=\skip62 +\algocf@nlbox=\box47 +\algocf@hangingbox=\box48 +\algocf@untilbox=\box49 +\algocf@skipuntil=\skip63 +\algocf@capbox=\box50 +\algocf@lcaptionbox=\skip64 +\algoheightruledefault=\skip65 +\algoheightrule=\skip66 +\algotitleheightruledefault=\skip67 +\algotitleheightrule=\skip68 +\c@algocfline=\count275 +\c@algocfproc=\count276 +\c@algocf=\count277 +\algocf@algoframe=\box51 +\algocf@algobox=\box52 +) +(/usr/share/texlive/texmf-dist/tex/latex/enumitem/enumitem.sty +Package: enumitem 2019/06/20 v3.9 Customized lists +\enitkv@toks@=\toks21 +\labelindent=\skip69 +\enit@outerparindent=\dimen152 +\enit@toks=\toks22 +\enit@inbox=\box53 +\enit@count@id=\count278 +\enitdp@description=\count279 +) +(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty +Package: graphicx 2019/11/30 v1.2a Enhanced LaTeX Graphics (DPC,SPQR) + +(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty +Package: graphics 2019/11/30 v1.4a Standard LaTeX Graphics (DPC,SPQR) + +(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty +Package: trig 2016/01/03 v1.10 sin cos tan (DPC) +) +(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/graphics.cfg +File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration +) +Package graphics Info: Driver file: pdftex.def on input line 105. + +(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def +File: pdftex.def 2018/01/08 v1.0l Graphics/color driver for pdftex +)) +\Gin@req@height=\dimen153 +\Gin@req@width=\dimen154 +) +(/usr/share/texlive/texmf-dist/tex/generic/ulem/ulem.sty +\UL@box=\box54 +\UL@hyphenbox=\box55 +\UL@skip=\skip70 +\UL@hook=\toks23 +\UL@height=\dimen155 +\UL@pe=\count280 +\UL@pixel=\dimen156 +\ULC@box=\box56 +Package: ulem 2019/11/18 +\ULdepth=\dimen157 +) +(/usr/share/texlive/texmf-dist/tex/latex/pgf/frontendlayer/tikz.sty +(/usr/share/texlive/texmf-dist/tex/latex/pgf/basiclayer/pgf.sty +(/usr/share/texlive/texmf-dist/tex/latex/pgf/utilities/pgfrcs.sty +(/usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgfutil-common.tex +\pgfutil@everybye=\toks24 +\pgfutil@tempdima=\dimen158 +\pgfutil@tempdimb=\dimen159 + +(/usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgfutil-common-lists.t +ex)) (/usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgfutil-latex.def +\pgfutil@abb=\box57 +(/usr/share/texlive/texmf-dist/tex/latex/ms/everyshi.sty +Package: everyshi 2001/05/15 v3.00 EveryShipout Package (MS) +)) +(/usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgfrcs.code.tex +(/usr/share/texlive/texmf-dist/tex/generic/pgf/pgf.revision.tex) +Package: pgfrcs 2020/01/08 v3.1.5b (3.1.5b) +)) +Package: pgf 2020/01/08 v3.1.5b (3.1.5b) + +(/usr/share/texlive/texmf-dist/tex/latex/pgf/basiclayer/pgfcore.sty +(/usr/share/texlive/texmf-dist/tex/latex/pgf/systemlayer/pgfsys.sty +(/usr/share/texlive/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code.tex +Package: pgfsys 2020/01/08 v3.1.5b (3.1.5b) + +(/usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex +\pgfkeys@pathtoks=\toks25 +\pgfkeys@temptoks=\toks26 + +(/usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgfkeysfiltered.code.t +ex +\pgfkeys@tmptoks=\toks27 +)) +\pgf@x=\dimen160 +\pgf@y=\dimen161 +\pgf@xa=\dimen162 +\pgf@ya=\dimen163 +\pgf@xb=\dimen164 +\pgf@yb=\dimen165 +\pgf@xc=\dimen166 +\pgf@yc=\dimen167 +\pgf@xd=\dimen168 +\pgf@yd=\dimen169 +\w@pgf@writea=\write3 +\r@pgf@reada=\read2 +\c@pgf@counta=\count281 +\c@pgf@countb=\count282 +\c@pgf@countc=\count283 +\c@pgf@countd=\count284 +\t@pgf@toka=\toks28 +\t@pgf@tokb=\toks29 +\t@pgf@tokc=\toks30 +\pgf@sys@id@count=\count285 + (/usr/share/texlive/texmf-dist/tex/generic/pgf/systemlayer/pgf.cfg +File: pgf.cfg 2020/01/08 v3.1.5b (3.1.5b) +) +Driver file for pgf: pgfsys-pdftex.def + +(/usr/share/texlive/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-pdftex.def +File: pgfsys-pdftex.def 2020/01/08 v3.1.5b (3.1.5b) + +(/usr/share/texlive/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-pdf.de +f +File: pgfsys-common-pdf.def 2020/01/08 v3.1.5b (3.1.5b) +))) +(/usr/share/texlive/texmf-dist/tex/generic/pgf/systemlayer/pgfsyssoftpath.code. +tex +File: pgfsyssoftpath.code.tex 2020/01/08 v3.1.5b (3.1.5b) +\pgfsyssoftpath@smallbuffer@items=\count286 +\pgfsyssoftpath@bigbuffer@items=\count287 +) +(/usr/share/texlive/texmf-dist/tex/generic/pgf/systemlayer/pgfsysprotocol.code. +tex +File: pgfsysprotocol.code.tex 2020/01/08 v3.1.5b (3.1.5b) +)) (/usr/share/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty +Package: xcolor 2016/05/11 v2.12 LaTeX color extensions (UK) + +(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg +File: color.cfg 2016/01/02 v1.6 sample color configuration +) +Package xcolor Info: Driver file: pdftex.def on input line 225. +Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1348. +Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1352. +Package xcolor Info: Model `RGB' extended on input line 1364. +Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1366. +Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1367. +Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1368. +Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1369. +Package xcolor Info: Model `Gray' substituted by `gray' on input line 1370. +Package xcolor Info: Model `wave' substituted by `hsb' on input line 1371. +) +(/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcore.code.tex +Package: pgfcore 2020/01/08 v3.1.5b (3.1.5b) + +(/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex +(/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathcalc.code.tex +(/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathutil.code.tex) +(/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathparser.code.tex +\pgfmath@dimen=\dimen170 +\pgfmath@count=\count288 +\pgfmath@box=\box58 +\pgfmath@toks=\toks31 +\pgfmath@stack@operand=\toks32 +\pgfmath@stack@operation=\toks33 +) +(/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.code.tex +(/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.basic.code +.tex) +(/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.trigonomet +ric.code.tex) +(/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.random.cod +e.tex) +(/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.comparison +.code.tex) +(/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.base.code. +tex) +(/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.round.code +.tex) +(/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.misc.code. +tex) +(/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.integerari +thmetics.code.tex))) +(/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmathfloat.code.tex +\c@pgfmathroundto@lastzeros=\count289 +)) +(/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfint.code.tex) +(/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.code.te +x +File: pgfcorepoints.code.tex 2020/01/08 v3.1.5b (3.1.5b) +\pgf@picminx=\dimen171 +\pgf@picmaxx=\dimen172 +\pgf@picminy=\dimen173 +\pgf@picmaxy=\dimen174 +\pgf@pathminx=\dimen175 +\pgf@pathmaxx=\dimen176 +\pgf@pathminy=\dimen177 +\pgf@pathmaxy=\dimen178 +\pgf@xx=\dimen179 +\pgf@xy=\dimen180 +\pgf@yx=\dimen181 +\pgf@yy=\dimen182 +\pgf@zx=\dimen183 +\pgf@zy=\dimen184 +) +(/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathconstruct. +code.tex +File: pgfcorepathconstruct.code.tex 2020/01/08 v3.1.5b (3.1.5b) +\pgf@path@lastx=\dimen185 +\pgf@path@lasty=\dimen186 +) +(/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathusage.code +.tex +File: pgfcorepathusage.code.tex 2020/01/08 v3.1.5b (3.1.5b) +\pgf@shorten@end@additional=\dimen187 +\pgf@shorten@start@additional=\dimen188 +) +(/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.code.te +x +File: pgfcorescopes.code.tex 2020/01/08 v3.1.5b (3.1.5b) +\pgfpic=\box59 +\pgf@hbox=\box60 +\pgf@layerbox@main=\box61 +\pgf@picture@serial@count=\count290 +) +(/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcoregraphicstate.c +ode.tex +File: pgfcoregraphicstate.code.tex 2020/01/08 v3.1.5b (3.1.5b) +\pgflinewidth=\dimen189 +) +(/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransformation +s.code.tex +File: pgfcoretransformations.code.tex 2020/01/08 v3.1.5b (3.1.5b) +\pgf@pt@x=\dimen190 +\pgf@pt@y=\dimen191 +\pgf@pt@temp=\dimen192 +) +(/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcorequick.code.tex +File: pgfcorequick.code.tex 2020/01/08 v3.1.5b (3.1.5b) +) +(/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreobjects.code.t +ex +File: pgfcoreobjects.code.tex 2020/01/08 v3.1.5b (3.1.5b) +) +(/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathprocessing +.code.tex +File: pgfcorepathprocessing.code.tex 2020/01/08 v3.1.5b (3.1.5b) +) +(/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcorearrows.code.te +x +File: pgfcorearrows.code.tex 2020/01/08 v3.1.5b (3.1.5b) +\pgfarrowsep=\dimen193 +) +(/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreshade.code.tex +File: pgfcoreshade.code.tex 2020/01/08 v3.1.5b (3.1.5b) +\pgf@max=\dimen194 +\pgf@sys@shading@range@num=\count291 +\pgf@shadingcount=\count292 +) +(/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreimage.code.tex +File: pgfcoreimage.code.tex 2020/01/08 v3.1.5b (3.1.5b) + +(/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreexternal.code. +tex +File: pgfcoreexternal.code.tex 2020/01/08 v3.1.5b (3.1.5b) +\pgfexternal@startupbox=\box62 +)) +(/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcorelayers.code.te +x +File: pgfcorelayers.code.tex 2020/01/08 v3.1.5b (3.1.5b) +) +(/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransparency.c +ode.tex +File: pgfcoretransparency.code.tex 2020/01/08 v3.1.5b (3.1.5b) +) +(/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepatterns.code. +tex +File: pgfcorepatterns.code.tex 2020/01/08 v3.1.5b (3.1.5b) +) +(/usr/share/texlive/texmf-dist/tex/generic/pgf/basiclayer/pgfcorerdf.code.tex +File: pgfcorerdf.code.tex 2020/01/08 v3.1.5b (3.1.5b) +))) +(/usr/share/texlive/texmf-dist/tex/generic/pgf/modules/pgfmoduleshapes.code.tex +File: pgfmoduleshapes.code.tex 2020/01/08 v3.1.5b (3.1.5b) +\pgfnodeparttextbox=\box63 +) (/usr/share/texlive/texmf-dist/tex/generic/pgf/modules/pgfmoduleplot.code.tex +File: pgfmoduleplot.code.tex 2020/01/08 v3.1.5b (3.1.5b) +) +(/usr/share/texlive/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version-0-65 +.sty +Package: pgfcomp-version-0-65 2020/01/08 v3.1.5b (3.1.5b) +\pgf@nodesepstart=\dimen195 +\pgf@nodesepend=\dimen196 +) +(/usr/share/texlive/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version-1-18 +.sty +Package: pgfcomp-version-1-18 2020/01/08 v3.1.5b (3.1.5b) +)) (/usr/share/texlive/texmf-dist/tex/latex/pgf/utilities/pgffor.sty +(/usr/share/texlive/texmf-dist/tex/latex/pgf/utilities/pgfkeys.sty +(/usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex)) +(/usr/share/texlive/texmf-dist/tex/latex/pgf/math/pgfmath.sty +(/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex)) +(/usr/share/texlive/texmf-dist/tex/generic/pgf/utilities/pgffor.code.tex +Package: pgffor 2020/01/08 v3.1.5b (3.1.5b) + +(/usr/share/texlive/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex) +\pgffor@iter=\dimen197 +\pgffor@skip=\dimen198 +\pgffor@stack=\toks34 +\pgffor@toks=\toks35 +)) +(/usr/share/texlive/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex +Package: tikz 2020/01/08 v3.1.5b (3.1.5b) + +(/usr/share/texlive/texmf-dist/tex/generic/pgf/libraries/pgflibraryplothandlers +.code.tex +File: pgflibraryplothandlers.code.tex 2020/01/08 v3.1.5b (3.1.5b) +\pgf@plot@mark@count=\count293 +\pgfplotmarksize=\dimen199 +) +\tikz@lastx=\dimen256 +\tikz@lasty=\dimen257 +\tikz@lastxsaved=\dimen258 +\tikz@lastysaved=\dimen259 +\tikz@lastmovetox=\dimen260 +\tikz@lastmovetoy=\dimen261 +\tikzleveldistance=\dimen262 +\tikzsiblingdistance=\dimen263 +\tikz@figbox=\box64 +\tikz@figbox@bg=\box65 +\tikz@tempbox=\box66 +\tikz@tempbox@bg=\box67 +\tikztreelevel=\count294 +\tikznumberofchildren=\count295 +\tikznumberofcurrentchild=\count296 +\tikz@fig@count=\count297 + +(/usr/share/texlive/texmf-dist/tex/generic/pgf/modules/pgfmodulematrix.code.tex +File: pgfmodulematrix.code.tex 2020/01/08 v3.1.5b (3.1.5b) +\pgfmatrixcurrentrow=\count298 +\pgfmatrixcurrentcolumn=\count299 +\pgf@matrix@numberofcolumns=\count300 +) +\tikz@expandcount=\count301 + +(/usr/share/texlive/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tik +zlibrarytopaths.code.tex +File: tikzlibrarytopaths.code.tex 2020/01/08 v3.1.5b (3.1.5b) +))) +(/usr/share/texlive/texmf-dist/tex/latex/pgf/frontendlayer/libraries/tikzlibrar +yexternal.code.tex +(/usr/share/texlive/texmf-dist/tex/latex/pdftexcmds/pdftexcmds.sty +Package: pdftexcmds 2019/11/24 v0.31 Utility functions of pdfTeX for LuaTeX (HO +) + +(/usr/share/texlive/texmf-dist/tex/generic/infwarerr/infwarerr.sty +Package: infwarerr 2019/12/03 v1.5 Providing info/warning/error messages (HO) +) +(/usr/share/texlive/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty +Package: ltxcmds 2019/12/15 v1.24 LaTeX kernel commands for general use (HO) +) +Package pdftexcmds Info: \pdf@primitive is available. +Package pdftexcmds Info: \pdf@ifprimitive is available. +Package pdftexcmds Info: \pdfdraftmode found. +) +(/usr/share/texlive/texmf-dist/tex/latex/atveryend/atveryend.sty +Package: atveryend 2019-12-11 v1.11 Hooks at the very end of document (HO) +) +(/usr/share/texlive/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tik +zexternalshared.code.tex)) +\openout3 = `sprawozdanie.auxlock'. + + +(/usr/share/texlive/texmf-dist/tex/generic/pgf/libraries/pgflibraryarrows.meta. +code.tex +File: pgflibraryarrows.meta.code.tex 2020/01/08 v3.1.5b (3.1.5b) +\pgfarrowinset=\dimen264 +\pgfarrowlength=\dimen265 +\pgfarrowwidth=\dimen266 +\pgfarrowlinewidth=\dimen267 +) +(/usr/share/texlive/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tik +zlibrarymatrix.code.tex +File: tikzlibrarymatrix.code.tex 2020/01/08 v3.1.5b (3.1.5b) +) +(/usr/share/texlive/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tik +zlibraryarrows.code.tex +File: tikzlibraryarrows.code.tex 2020/01/08 v3.1.5b (3.1.5b) + +(/usr/share/texlive/texmf-dist/tex/generic/pgf/libraries/pgflibraryarrows.code. +tex +File: pgflibraryarrows.code.tex 2020/01/08 v3.1.5b (3.1.5b) +\arrowsize=\dimen268 +)) (/usr/share/texlive/texmf-dist/tex/latex/program/program.sty +\@gtempa=\dimen269 +\@gtempa=\dimen270 +\@gtempa=\dimen271 +\@gtempa=\dimen272 +\@gtempa=\dimen273 +\@gtempa=\dimen274 +\@gtempa=\dimen275 +\@gtempa=\dimen276 +\@gtempa=\dimen277 +\@gtempa=\dimen278 +\@gtempa=\dimen279 +\@gtempa=\dimen280 +\@gtempa=\dimen281 +\@gtempa=\dimen282 +\@gtempa=\dimen283 +\@gtempa=\dimen284 +\@gtempa=\dimen285 +\@gtempa=\dimen286 +\@gtempa=\dimen287 +\@gtempa=\dimen288 +\@gtempa=\dimen289 +\@gtempa=\dimen290 +\@gtempa=\dimen291 +\@gtempa=\dimen292 +\@gtempa=\dimen293 +\@gtempa=\dimen294 +\@gtempa=\dimen295 +\@gtempa=\dimen296 +\@gtempa=\dimen297 +\@gtempa=\dimen298 +\@gtempa=\dimen299 +\@gtempa=\dimen300 +\@gtempa=\dimen301 +\@gtempa=\dimen302 +\@gtempa=\dimen303 +\@gtempa=\dimen304 +\@gtempa=\dimen305 +\@gtempa=\dimen306 +\@gtempa=\dimen307 +\@gtempa=\dimen308 +\@gtempa=\dimen309 +\@gtempa=\dimen310 +\@gtempa=\dimen311 +\@gtempa=\dimen312 +\@gtempa=\dimen313 +\@gtempa=\dimen314 +\@gtempa=\dimen315 +\@gtempa=\dimen316 +\@gtempa=\dimen317 +\@gtempa=\dimen318 +\c@programline=\count302 +\old@nxttabmar=\count303 +\symeulerletters=\mathgroup4 +\powersetbox=\box68 +LaTeX Font Info: Trying to load font information for OML+plm on input line 8 +41. + +(/usr/share/texlive/texmf-dist/tex/latex/polski/omlplm.fd +File: omlplm.fd 2008/02/24 v1.2.1 Font defs for fonts PL (MW) +) +LaTeX Font Info: Trying to load font information for OMS+plsy on input line +841. + +(/usr/share/texlive/texmf-dist/tex/latex/polski/omsplsy.fd +File: omsplsy.fd 2008/02/24 v1.2.1 Font defs for fonts PL (MW) +) +LaTeX Font Info: Trying to load font information for OMX+plex on input line +841. + +(/usr/share/texlive/texmf-dist/tex/latex/polski/omxplex.fd +File: omxplex.fd 2008/02/24 v1.2.1 Font defs for fonts PL (MW) +) +LaTeX Font Info: External font `plex10' loaded for size +(Font) <14.4> on input line 841. +LaTeX Font Info: External font `plex10' loaded for size +(Font) <10> on input line 841. +LaTeX Font Info: External font `plex10' loaded for size +(Font) <7> on input line 841. +LaTeX Font Info: Trying to load font information for U+eur on input line 841 +. + +(/usr/share/texlive/texmf-dist/tex/latex/amsfonts/ueur.fd +File: ueur.fd 2013/01/14 v3.01 Euler Roman +)) +(/usr/share/texlive/texmf-dist/tex/latex/amsfonts/amsfonts.sty +Package: amsfonts 2013/01/14 v3.01 Basic AMSFonts support +\symAMSa=\mathgroup5 +\symAMSb=\mathgroup6 +LaTeX Font Info: Redeclaring math symbol \hbar on input line 98. +LaTeX Font Info: Overwriting math alphabet `\mathfrak' in version `bold' +(Font) U/euf/m/n --> U/euf/b/n on input line 106. +LaTeX Info: Redefining \Bbb on input line 113. +) +(/usr/share/texlive/texmf-dist/tex/latex/amsfonts/amssymb.sty +Package: amssymb 2013/01/14 v3.01 AMS font symbols + + +! LaTeX Error: Command `\lneq' already defined. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.183 ...mbol{\lneq} {\mathrel}{AMSb}{"0C} + +? \ +Type to proceed, S to scroll future error messages, +R to run without stopping, Q to run quietly, +I to insert something, E to edit your file, +1 or ... or 9 to ignore the next 1 to 9 tokens of input, +H for help, X to quit. +? +) (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsmath.sty +Package: amsmath 2020/01/20 v2.17e AMS math features +\@mathmargin=\skip71 + +For additional information on amsmath, use the `?' option. +(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amstext.sty +Package: amstext 2000/06/29 v2.01 AMS text +LaTeX Info: Redefining \text on input line 28. +) +(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsbsy.sty +Package: amsbsy 1999/11/29 v1.2d Bold Symbols +LaTeX Info: Redefining \boldsymbol on input line 28. +\pmbraise@=\dimen319 +) +(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsopn.sty +Package: amsopn 2016/03/08 v2.02 operator names +LaTeX Info: Redefining \operatorname on input line 43. +) +\inf@bad=\count304 +LaTeX Info: Redefining \frac on input line 227. +\uproot@=\count305 +\leftroot@=\count306 +LaTeX Info: Redefining \overline on input line 389. + + +! LaTeX Error: Command \implies already defined. + Or name \end... illegal, see p.192 of the manual. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.391 ...mand{\implies}{\DOTSB\;\Longrightarrow\;} + +? +\classnum@=\count307 +\DOTSCASE@=\count308 +LaTeX Info: Redefining \ldots on input line 486. +LaTeX Info: Redefining \dots on input line 489. +LaTeX Info: Redefining \cdots on input line 610. +\Mathstrutbox@=\box69 +\strutbox@=\box70 +\big@size=\dimen320 +LaTeX Font Info: Redeclaring font encoding OML on input line 733. +LaTeX Font Info: Redeclaring font encoding OMS on input line 734. +\macc@depth=\count309 + +! LaTeX Error: Command \overset already defined. + Or name \end... illegal, see p.192 of the manual. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.903 ...inrel@@{\mathop{\kern\z@#2}\limits^{#1}}} + +? +\c@MaxMatrixCols=\count310 +\dotsspace@=\muskip16 +\c@parentequation=\count311 +\dspbrk@lvl=\count312 +\tag@help=\toks36 +\row@=\count313 +\column@=\count314 +\maxfields@=\count315 +\andhelp@=\toks37 +\eqnshift@=\dimen321 +\alignsep@=\dimen322 +\tagshift@=\dimen323 +\tagwidth@=\dimen324 +\totwidth@=\dimen325 +\lineht@=\dimen326 +\@envbody=\toks38 +\multlinegap=\skip72 +\multlinetaggap=\skip73 +\mathdisplay@stack=\toks39 +LaTeX Info: Redefining \[ on input line 2859. +LaTeX Info: Redefining \] on input line 2860. +) (/usr/share/texlive/texmf-dist/tex/latex/amscls/amsthm.sty +Package: amsthm 2017/10/31 v2.20.4 +\thm@style=\toks40 +\thm@bodyfont=\toks41 +\thm@headfont=\toks42 +\thm@notefont=\toks43 +\thm@headpunct=\toks44 +\thm@preskip=\skip74 +\thm@postskip=\skip75 +\thm@headsep=\skip76 +\dth@everypar=\toks45 +LaTeX Info: Redefining \qed on input line 274. + + +! LaTeX Error: Command \proof already defined. + Or name \end... illegal, see p.192 of the manual. + +See the LaTeX manual or LaTeX Companion for explanation. +Type H for immediate help. + ... + +l.441 } + +? +) (/usr/share/texlive/texmf-dist/tex/latex/tikz-cd/tikz-cd.sty +Package: tikz-cd 2018/11/19 v0.9f Commutative diagrams with TikZ + +(/usr/share/texlive/texmf-dist/tex/generic/tikz-cd/tikzlibrarycd.code.tex +(/usr/share/texlive/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tik +zlibraryquotes.code.tex +File: tikzlibraryquotes.code.tex 2020/01/08 v3.1.5b (3.1.5b) +))) +(/usr/share/texlive/texmf-dist/tex/latex/float/float.sty +Package: float 2001/11/08 v1.3d Float enhancements (AL) +\c@float@type=\count316 +\float@exts=\toks46 +\float@box=\box71 +\@float@everytoks=\toks47 +\@floatcapt=\box72 +) +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hyperref.sty +Package: hyperref 2020/01/14 v7.00d Hypertext links for LaTeX + +(/usr/share/texlive/texmf-dist/tex/generic/kvsetkeys/kvsetkeys.sty +Package: kvsetkeys 2019/12/15 v1.18 Key value parser (HO) +) +(/usr/share/texlive/texmf-dist/tex/generic/kvdefinekeys/kvdefinekeys.sty +Package: kvdefinekeys 2019-12-19 v1.6 Define keys (HO) +) +(/usr/share/texlive/texmf-dist/tex/generic/pdfescape/pdfescape.sty +Package: pdfescape 2019/12/09 v1.15 Implements pdfTeX's escape features (HO) +) +(/usr/share/texlive/texmf-dist/tex/latex/hycolor/hycolor.sty +Package: hycolor 2020-01-27 v1.10 Color options for hyperref/bookmark (HO) +) +(/usr/share/texlive/texmf-dist/tex/latex/letltxmacro/letltxmacro.sty +Package: letltxmacro 2019/12/03 v1.6 Let assignment for LaTeX macros (HO) +) +(/usr/share/texlive/texmf-dist/tex/latex/auxhook/auxhook.sty +Package: auxhook 2019-12-17 v1.6 Hooks for auxiliary files (HO) +) +(/usr/share/texlive/texmf-dist/tex/latex/kvoptions/kvoptions.sty +Package: kvoptions 2019/11/29 v3.13 Key value format for package options (HO) +) +\@linkdim=\dimen327 +\Hy@linkcounter=\count317 +\Hy@pagecounter=\count318 + +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/pd1enc.def +File: pd1enc.def 2020/01/14 v7.00d Hyperref: PDFDocEncoding definition (HO) +Now handling font encoding PD1 ... +... no UTF-8 mapping file for font encoding PD1 +) +(/usr/share/texlive/texmf-dist/tex/generic/intcalc/intcalc.sty +Package: intcalc 2019/12/15 v1.3 Expandable calculations with integers (HO) +) +(/usr/share/texlive/texmf-dist/tex/generic/etexcmds/etexcmds.sty +Package: etexcmds 2019/12/15 v1.7 Avoid name clashes with e-TeX commands (HO) +) +\Hy@SavedSpaceFactor=\count319 +\pdfmajorversion=\count320 +Package hyperref Info: Hyper figures OFF on input line 4547. +Package hyperref Info: Link nesting OFF on input line 4552. +Package hyperref Info: Hyper index ON on input line 4555. +Package hyperref Info: Plain pages OFF on input line 4562. +Package hyperref Info: Backreferencing OFF on input line 4567. +Package hyperref Info: Implicit mode ON; LaTeX internals redefined. +Package hyperref Info: Bookmarks ON on input line 4800. +\c@Hy@tempcnt=\count321 + +(/usr/share/texlive/texmf-dist/tex/latex/url/url.sty +\Urlmuskip=\muskip17 +Package: url 2013/09/16 ver 3.4 Verb mode for urls, etc. +) +LaTeX Info: Redefining \url on input line 5159. +\XeTeXLinkMargin=\dimen328 + +(/usr/share/texlive/texmf-dist/tex/generic/bitset/bitset.sty +Package: bitset 2019/12/09 v1.3 Handle bit-vector datatype (HO) + +(/usr/share/texlive/texmf-dist/tex/generic/bigintcalc/bigintcalc.sty +Package: bigintcalc 2019/12/15 v1.5 Expandable calculations on big integers (HO +) +)) +\Fld@menulength=\count322 +\Field@Width=\dimen329 +\Fld@charsize=\dimen330 +Package hyperref Info: Hyper figures OFF on input line 6430. +Package hyperref Info: Link nesting OFF on input line 6435. +Package hyperref Info: Hyper index ON on input line 6438. +Package hyperref Info: backreferencing OFF on input line 6445. +Package hyperref Info: Link coloring OFF on input line 6450. +Package hyperref Info: Link coloring with OCG OFF on input line 6455. +Package hyperref Info: PDF/A mode OFF on input line 6460. +LaTeX Info: Redefining \ref on input line 6500. +LaTeX Info: Redefining \pageref on input line 6504. + +(/usr/share/texlive/texmf-dist/tex/generic/atbegshi/atbegshi.sty +Package: atbegshi 2019/12/05 v1.19 At begin shipout hook (HO) +) +\Hy@abspage=\count323 +\c@Item=\count324 +\c@Hfootnote=\count325 +) +Package hyperref Info: Driver (autodetected): hpdftex. + +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hpdftex.def +File: hpdftex.def 2020/01/14 v7.00d Hyperref driver for pdfTeX +\Fld@listcount=\count326 +\c@bookmark@seq@number=\count327 + +(/usr/share/texlive/texmf-dist/tex/latex/rerunfilecheck/rerunfilecheck.sty +Package: rerunfilecheck 2019/12/05 v1.9 Rerun checks for auxiliary files (HO) + +(/usr/share/texlive/texmf-dist/tex/generic/uniquecounter/uniquecounter.sty +Package: uniquecounter 2019/12/15 v1.4 Provide unlimited unique counter (HO) +) +Package uniquecounter Info: New unique counter `rerunfilecheck' on input line 2 +86. +) +\Hy@SectionHShift=\skip77 +) +(/usr/share/texlive/texmf-dist/tex/latex/tools/multicol.sty +Package: multicol 2019/12/09 v1.8y multicolumn formatting (FMi) +\c@tracingmulticols=\count328 +\mult@box=\box73 +\multicol@leftmargin=\dimen331 +\c@unbalance=\count329 +\c@collectmore=\count330 +\doublecol@number=\count331 +\multicoltolerance=\count332 +\multicolpretolerance=\count333 +\full@width=\dimen332 +\page@free=\dimen333 +\premulticols=\dimen334 +\postmulticols=\dimen335 +\multicolsep=\skip78 +\multicolbaselineskip=\skip79 +\partial@page=\box74 +\last@line=\box75 +\maxbalancingoverflow=\dimen336 +\mult@rightbox=\box76 +\mult@grightbox=\box77 +\mult@gfirstbox=\box78 +\mult@firstbox=\box79 +\@tempa=\box80 +\@tempa=\box81 +\@tempa=\box82 +\@tempa=\box83 +\@tempa=\box84 +\@tempa=\box85 +\@tempa=\box86 +\@tempa=\box87 +\@tempa=\box88 +\@tempa=\box89 +\@tempa=\box90 +\@tempa=\box91 +\@tempa=\box92 +\@tempa=\box93 +\@tempa=\box94 +\@tempa=\box95 +\@tempa=\box96 +\@tempa=\box97 +\@tempa=\box98 +\@tempa=\box99 +\@tempa=\box100 +\@tempa=\box101 +\@tempa=\box102 +\@tempa=\box103 +\@tempa=\box104 +\@tempa=\box105 +\@tempa=\box106 +\@tempa=\box107 +\@tempa=\box108 +\@tempa=\box109 +\@tempa=\box110 +\@tempa=\box111 +\@tempa=\box112 +\@tempa=\box113 +\@tempa=\box114 +\@tempa=\box115 +\@tempa=\box116 +\c@minrows=\count334 +\c@columnbadness=\count335 +\c@finalcolumnbadness=\count336 +\last@try=\dimen337 +\multicolovershoot=\dimen338 +\multicolundershoot=\dimen339 +\mult@nat@firstbox=\box117 +\colbreak@box=\box118 +\mc@col@check@num=\count337 +) +(/usr/share/texlive/texmf-dist/tex/latex/mathtools/mathtools.sty +Package: mathtools 2020/01/17 v1.23 mathematical typesetting tools + +(/usr/share/texlive/texmf-dist/tex/latex/tools/calc.sty +Package: calc 2017/05/25 v4.3 Infix arithmetic (KKT,FJ) +\calc@Acount=\count338 +\calc@Bcount=\count339 +\calc@Adimen=\dimen340 +\calc@Bdimen=\dimen341 +\calc@Askip=\skip80 +\calc@Bskip=\skip81 +LaTeX Info: Redefining \setlength on input line 80. +LaTeX Info: Redefining \addtolength on input line 81. +\calc@Ccount=\count340 +\calc@Cskip=\skip82 +) +(/usr/share/texlive/texmf-dist/tex/latex/mathtools/mhsetup.sty +Package: mhsetup 2017/03/31 v1.3 programming setup (MH) +) +LaTeX Info: Thecontrolsequence`\('isalreadyrobust on input line 129. +LaTeX Info: Thecontrolsequence`\)'isalreadyrobust on input line 129. +LaTeX Info: Thecontrolsequence`\['isalreadyrobust on input line 129. +LaTeX Info: Thecontrolsequence`\]'isalreadyrobust on input line 129. +\g_MT_multlinerow_int=\count341 +\l_MT_multwidth_dim=\dimen342 +\origjot=\skip83 +\l_MT_shortvdotswithinadjustabove_dim=\dimen343 +\l_MT_shortvdotswithinadjustbelow_dim=\dimen344 +\l_MT_above_intertext_sep=\dimen345 +\l_MT_below_intertext_sep=\dimen346 +\l_MT_above_shortintertext_sep=\dimen347 +\l_MT_below_shortintertext_sep=\dimen348 +) +(/usr/share/texlive/texmf-dist/tex/latex/tools/array.sty +Package: array 2019/08/31 v2.4l Tabular extension package (FMi) +\col@sep=\dimen349 +\ar@mcellbox=\box119 +\extrarowheight=\dimen350 +\NC@list=\toks48 +\extratabsurround=\skip84 +\backup@length=\skip85 +\ar@cellbox=\box120 +) +(/usr/share/texlive/texmf-dist/tex/latex/wrapfig/wrapfig.sty +\wrapoverhang=\dimen351 +\WF@size=\dimen352 +\c@WF@wrappedlines=\count342 +\WF@box=\box121 +\WF@everypar=\toks49 +Package: wrapfig 2003/01/31 v 3.6 +) +(/usr/share/texlive/texmf-dist/tex/latex/multirow/multirow.sty +Package: multirow 2019/05/31 v2.5 Span multiple rows of a table +\multirow@colwidth=\skip86 +\multirow@cntb=\count343 +\multirow@dima=\skip87 +\bigstrutjot=\dimen353 +) +(/usr/share/texlive/texmf-dist/tex/latex/tools/tabularx.sty +Package: tabularx 2020/01/15 v2.11c `tabularx' package (DPC) +\TX@col@width=\dimen354 +\TX@old@table=\dimen355 +\TX@old@col=\dimen356 +\TX@target=\dimen357 +\TX@delta=\dimen358 +\TX@cols=\count344 +\TX@ftn=\toks50 +) +\c@twr=\count345 +\c@claimcounter=\count346 + +(/usr/share/texlive/texmf-dist/tex/latex/l3backend/l3backend-pdfmode.def +File: l3backend-pdfmode.def 2020-02-03 L3 backend support: PDF mode +\l__kernel_color_stack_int=\count347 +\l__pdf_internal_box=\box122 +) +(./sprawozdanie.aux) +\openout1 = `sprawozdanie.aux'. + +LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 138. +LaTeX Font Info: ... okay on input line 138. +LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 138. +LaTeX Font Info: ... okay on input line 138. +LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 138. +LaTeX Font Info: ... okay on input line 138. +LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 138. +LaTeX Font Info: ... okay on input line 138. +LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 138. +LaTeX Font Info: ... okay on input line 138. +LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 138. +LaTeX Font Info: ... okay on input line 138. +LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 138. +LaTeX Font Info: ... okay on input line 138. +LaTeX Font Info: Checking defaults for OT4/cmr/m/n on input line 138. +LaTeX Font Info: ... okay on input line 138. +LaTeX Font Info: Checking defaults for PD1/pdf/m/n on input line 138. +LaTeX Font Info: ... okay on input line 138. +LaTeX Font Info: Trying to load font information for T1+aer on input line 13 +8. + (/usr/share/texlive/texmf-dist/tex/latex/ae/t1aer.fd +File: t1aer.fd 1997/11/16 Font definitions for T1/aer. +) +(/usr/share/texlive/texmf-dist/tex/latex/fmtcount/fc-english.def +File: fc-english.def 2016/01/12 +) +LaTeX Info: Redefining \microtypecontext on input line 138. +Package microtype Info: Generating PDF output. +Package microtype Info: Character protrusion enabled (level 2). +Package microtype Info: Using default protrusion set `alltext'. +Package microtype Info: Automatic font expansion enabled (level 2), +(microtype) stretch: 10, shrink: 10, step: 1, non-selected. +Package microtype Info: Using default expansion set `basictext'. +LaTeX Info: Redefining \showhyphens on input line 138. +Package microtype Info: Tracking enabled. +Package microtype Info: Using default tracking set `smallcaps'. +Package microtype Info: Adjustment of interword spacing enabled. +Package microtype Info: Using default spacing set `basictext'. +Package microtype Info: Adjustment of character kerning enabled. +Package microtype Info: Using default kerning set `alltext'. + +(/usr/share/texlive/texmf-dist/tex/latex/microtype/mt-cmr.cfg +File: mt-cmr.cfg 2013/05/19 v2.2 microtype config. file: Computer Modern Roman +(RS) +) +*geometry* driver: auto-detecting +*geometry* detected driver: pdftex +*geometry* verbose mode - [ preamble ] result: +* driver: pdftex +* paper: +* layout: +* layoutoffset:(h,v)=(0.0pt,0.0pt) +* modes: +* h-part:(L,W,R)=(71.13188pt, 455.24411pt, 71.13188pt) +* v-part:(T,H,B)=(71.13188pt, 702.78308pt, 71.13188pt) +* \paperwidth=597.50787pt +* \paperheight=845.04684pt +* \textwidth=455.24411pt +* \textheight=702.78308pt +* \oddsidemargin=-1.1381pt +* \evensidemargin=-1.1381pt +* \topmargin=-27.1381pt +* \headheight=12.0pt +* \headsep=14.0pt +* \topskip=10.0pt +* \footskip=24.0pt +* \marginparwidth=0.0pt +* \marginparsep=0.0pt +* \columnsep=25.6802pt +* \skip\footins=9.0pt plus 4.0pt minus 2.0pt +* \hoffset=0.0pt +* \voffset=0.0pt +* \mag=1000 +* \@twocolumnfalse +* \@twosidefalse +* \@mparswitchfalse +* \@reversemarginfalse +* (1in=72.27pt=25.4mm, 1cm=28.453pt) + +(/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii +[Loading MPS to PDF converter (version 2006.09.02).] +\scratchcounter=\count348 +\scratchdimen=\dimen359 +\scratchbox=\box123 +\nofMPsegments=\count349 +\nofMParguments=\count350 +\everyMPshowfont=\toks51 +\MPscratchCnt=\count351 +\MPscratchDim=\dimen360 +\MPnumerator=\count352 +\makeMPintoPDFobject=\count353 +\everyMPtoPDFconversion=\toks52 +) (/usr/share/texlive/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty +Package: epstopdf-base 2020-01-24 v2.11 Base part for package epstopdf +Package epstopdf-base Info: Redefining graphics rule for `.eps' on input line 4 +85. + +(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg +File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv +e +)) +ABD: EveryShipout initializing macros +\AtBeginShipoutBox=\box124 +Package hyperref Info: Link coloring OFF on input line 138. + +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/nameref.sty +Package: nameref 2019/09/16 v2.46 Cross-referencing by name of section + +(/usr/share/texlive/texmf-dist/tex/latex/refcount/refcount.sty +Package: refcount 2019/12/15 v3.6 Data extraction from label references (HO) +) +(/usr/share/texlive/texmf-dist/tex/generic/gettitlestring/gettitlestring.sty +Package: gettitlestring 2019/12/15 v1.6 Cleanup title references (HO) +) +\c@section@level=\count354 +) +LaTeX Info: Redefining \ref on input line 138. +LaTeX Info: Redefining \pageref on input line 138. +LaTeX Info: Redefining \nameref on input line 138. + +(./sprawozdanie.out) (./sprawozdanie.out) +\@outlinefile=\write4 +\openout4 = `sprawozdanie.out'. + +LaTeX Font Info: External font `plex10' loaded for size +(Font) <5> on input line 141. + +(/usr/share/texlive/texmf-dist/tex/latex/microtype/mt-eur.cfg +File: mt-eur.cfg 2006/07/31 v1.1 microtype config. file: AMS Euler Roman (RS) +) +LaTeX Font Info: Trying to load font information for U+msa on input line 141 +. + +(/usr/share/texlive/texmf-dist/tex/latex/amsfonts/umsa.fd +File: umsa.fd 2013/01/14 v3.01 AMS symbols A +) +(/usr/share/texlive/texmf-dist/tex/latex/microtype/mt-msa.cfg +File: mt-msa.cfg 2006/02/04 v1.1 microtype config. file: AMS symbols (a) (RS) +) +LaTeX Font Info: Trying to load font information for U+msb on input line 141 +. + +(/usr/share/texlive/texmf-dist/tex/latex/amsfonts/umsb.fd +File: umsb.fd 2013/01/14 v3.01 AMS symbols B +) +(/usr/share/texlive/texmf-dist/tex/latex/microtype/mt-msb.cfg +File: mt-msb.cfg 2005/06/01 v1.0 microtype config. file: AMS symbols (b) (RS) +) +LaTeX Font Info: Trying to load font information for T1+aett on input line 1 +47. + +(/usr/share/texlive/texmf-dist/tex/latex/ae/t1aett.fd +File: t1aett.fd 1997/11/16 Font definitions for T1/aett. +) +Package microtype Info: Loading generic protrusion settings for font family +(microtype) `aett' (encoding: T1). +(microtype) For optimal results, create family-specific settings. +(microtype) See the microtype manual for details. + [1 + + +{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] [2] [3] [4] +LaTeX Font Info: External font `plex10' loaded for size +(Font) <9> on input line 458. +LaTeX Font Info: External font `plex10' loaded for size +(Font) <6> on input line 458. + [5] [6] +Package atveryend Info: Empty hook `BeforeClearDocument' on input line 488. +Package atveryend Info: Empty hook `AfterLastShipout' on input line 488. + (./sprawozdanie.aux) +Package atveryend Info: Executing hook `AtVeryEndDocument' on input line 488. +Package atveryend Info: Executing hook `AtEndAfterFileList' on input line 488. +Package rerunfilecheck Info: File `sprawozdanie.out' has not changed. +(rerunfilecheck) Checksum: 94D62BDB0C6EFE3E403C700E6E8F8E70;556. + ) +Here is how much of TeX's memory you used: + 25262 strings out of 481239 + 472374 string characters out of 5920377 + 789725 words of memory out of 5000000 + 39714 multiletter control sequences out of 15000+600000 + 585039 words of font info for 250 fonts, out of 8000000 for 9000 + 1141 hyphenation exceptions out of 8191 + 60i,14n,65p,1017b,443s stack positions out of 5000i,500n,10000p,200000b,80000s +{/usr/share/texlive/texmf-dist/fonts/enc/dvips/pl/plmi.enc}{/usr/share/texliv +e/texmf-dist/fonts/enc/dvips/pl/plrm.enc}{/usr/share/texlive/texmf-dist/fonts/e +nc/dvips/pl/plms.enc}{/usr/share/texlive/texmf-dist/fonts/enc/dvips/pl/plme.enc +} +Output written on sprawozdanie.pdf (6 pages, 231824 bytes). +PDF statistics: + 209 PDF objects out of 1000 (max. 8388607) + 174 compressed objects within 2 object streams + 35 named destinations out of 1000 (max. 500000) + 56413 words of extra memory for PDF output out of 61914 (max. 10000000) + diff --git a/semestr-3/anm/sprawozdanie.pdf b/semestr-3/anm/sprawozdanie.pdf new file mode 100644 index 0000000..6b4450a Binary files /dev/null and b/semestr-3/anm/sprawozdanie.pdf differ diff --git a/semestr-3/anm/sprawozdanie.tex b/semestr-3/anm/sprawozdanie.tex new file mode 100644 index 0000000..be4f495 --- /dev/null +++ b/semestr-3/anm/sprawozdanie.tex @@ -0,0 +1,488 @@ +\documentclass{mwart} +\usepackage{polski} + +\setlength{\emergencystretch}{2em} +\usepackage{datetime} +\usepackage{ae,aecompl} +\usepackage[activate={true,nocompatibility},final,tracking=true,kerning=true,spacing=true,stretch=10,shrink=10]{microtype} +\frenchspacing + +%%% fix for \lll +% \let\babellll\lll +% \let\lll\relax +\usepackage{geometry} +\newgeometry{vmargin={25mm}, hmargin={25mm,25mm}} +\usepackage[]{algorithm2e} + + +\usepackage{enumitem} +\usepackage{graphicx} +\usepackage[normalem]{ulem} +\usepackage{tikz} + +\usetikzlibrary{external} +\tikzexternalize[prefix=tikz/] + +\usetikzlibrary{arrows.meta} +\usetikzlibrary{matrix, arrows} +\usepackage{program} +\usepackage{amsfonts} +\usepackage{amssymb} +%%% fix for \lll +\let\mathlll\lll +\let\lll\babellll + +\usepackage{amsmath} +\usepackage{amsthm} +\usepackage{tikz-cd} +\usepackage{float} +\usepackage{hyperref} +\usepackage{multicol} +\usepackage{mathtools} + +\usepackage{array} +\usepackage{wrapfig} +\usepackage{multirow} +\usepackage{tabularx} +\newcommand{\RR}{\mathbb{R}} +\newcommand{\CC}{\mathbb{C}} +\DeclarePairedDelimiter\abs{\lvert}{\rvert}% + +\newcommand{\fC}{{\mathfrak C}} +\newcommand{\cM}{{\mathcal M}} +\newcommand{\cC}{{\mathcal C}} +\newcommand{\cD}{{\mathcal D}} +\newcommand{\bN}{{\mathbf{N}}} +\newcommand{\bR}{{\mathbf{R}}} +\newcommand{\bZ}{{\mathbf{Z}}} +\newcommand{\bF}{{\mathbf{F}}} +\newcommand{\bQ}{{\mathbf{Q}}} +\newcommand{\bC}{{\mathbf{C}}} +\newcommand{\cA}{{\mathcal A}} +\newcommand{\cO}{{\mathcal O}} +\newcommand{\cF}{{\mathcal F}} +\newcommand{\cB}{{\mathcal B}} +\newcommand{\Ob}{{\mathrm{Ob}}} +\newcommand{\topl}{\mathcal T} +\newcommand{\Set}{{\mathrm{Set}}} +\newcommand{\Grp}{{\mathrm{Grp}}} +\newcommand{\AbGrp}{{\mathrm{AbGrp}}} +\newcommand{\Mod}{{\mathrm{Mod}}} +\newcommand{\Ring}{{\mathrm{Ring}}} +\newcommand{\Vect}{{\mathrm{Vect}}} +\newcommand{\Alg}{{\mathrm{Alg}}} +\newcommand{\restr}{\mathord{\upharpoonright}} +\newcommand{\liff}{\mathrel{\leftrightarrow}} +\newcommand{\limplies}{\mathrel{\rightarrow}} +\newcommand{\fset}[1]{\left\{{#1}\right\}} +\newcommand{\meet}{\mathbin{\wedge}} +\newcommand{\biglor}{\bigvee} +\newcommand{\bigland}{\bigwedge} + + +\DeclareMathOperator{\round}{{round}} +\DeclareMathOperator{\cl}{{cl}} +\DeclareMathOperator{\Id}{{Id}} +\DeclareMathOperator{\id}{{id}} +\DeclareMathOperator{\Aut}{{Aut}} +\DeclareMathOperator{\End}{{End}} +\DeclareMathOperator{\Ult}{{Ult}} +\DeclareMathOperator{\Homeo}{{Homeo}} +\DeclareMathOperator{\dom}{{dom}} +\DeclareMathOperator{\rng}{{rng}} +\DeclareMathOperator{\Core}{{Core}} +\DeclareMathOperator{\Hom}{{Hom}} +\DeclareMathOperator{\Stab}{{Stab}} +\DeclareMathOperator{\dcl}{{dcl}} +\DeclareMathOperator{\acl}{{acl}} +\DeclareMathOperator{\tp}{{tp}} +\DeclareMathOperator{\characteristic}{{char}} + + + +\newtheorem{twr}{Twierdzenie}[section] +\newtheorem{hip}[twr]{Hipoteza} +\newtheorem{pyt}[twr]{Pytanie} +\newtheorem{problem}[twr]{Problem} +\newtheorem{lem}[twr]{Lemat} +\newtheorem{fkt}[twr]{Fakt} +\newtheorem{wnsk}[twr]{Wniosek} +\newtheorem{stw}[twr]{Stwierdzenie} +\newtheorem{cw}[twr]{Ćwiczenie} + +\theoremstyle{remark} +\newtheorem{uwg}[twr]{Uwaga} +\theoremstyle{definition} +\newtheorem{dfn}[twr]{Definicja} +\newtheorem*{rozw}{Rozwiązanie} +\newtheorem*{sbclm}{Podclaim} +\newtheorem*{clm*}{Claim} +\newtheorem{pd}[twr]{Przykład} +\newcounter{claimcounter}[twr] +\newenvironment{clm}{\stepcounter{claimcounter}{\noindent {\textbf{Claim}} \theclaimcounter:}}{} +\newenvironment{clmproof}[1][\proofname]{\proof[#1]\renewcommand{\qedsymbol}{$\square$(claim)}}{\endproof} +\newenvironment{sbclmproof}[1][\proofname]{\proof[#1]\renewcommand{\qedsymbol}{$\square$(subclaim)}}{\endproof} + +\newcommand{\xqed}[1]{% + \leavevmode\unskip\penalty9999 \hbox{}\nobreak\hfill + \quad\hbox{\ensuremath{#1}}} +\theoremstyle{definition} +\newtheorem{zad}[twr]{Zadanie} + +\title{Pracownia z analizy numerycznej \\ + \large Sprawozdanie do zadania \textbf{P1.10} \\ + Prowadzący: dr Rafał Nowak} +\author{Franciszek Malinka, Kacper Solecki} +\date{Wrocław, Listopad 2020} + +\begin{document} + +\maketitle + +\section{Wstęp} +Funkcje trygonometryczne mają szerokie zastosowania w matematyce, informatyce, inżynierii, architekturze, produkcji muzyki i wielu innych dziedzinach. Nietrudno zatem dojść do wniosku, że ich efektywne i dokładne obliczanie jest problemem bardzo ważnym w kontekście tych zagadnień. + +W niniejszym sprawozdaniu przyjrzymy się dwóm opracowanym przez nas metodom obliczania wybranych funkcji trygonometrycznych używając jednie najprostszych operacji arytmetycznych ($+$, $-$, $*$, $/$, ale też przesunięcia bitowe), ze szczególnym naciskiem na dokładne obliczanie funkcji $\sin$ oraz $\cos$, również w dziedzinie liczb zespolonych. + +Proponowane przez nas metody mają docelowo dawać poprawne obliczenia dla podwójnej precyzji obliczeń, jednakże testy numeryczne przeprowadzamy używając zmiennych typu \texttt{BigFloat} w języku \texttt{Julia} (w którym implementowaliśmy nasze rozwiązania). Typ ten oferuje dowolną dokładność obliczeń. Wyniki naszych funkcji porównujemy z funkcjami bibliotecznymi języka i zakładamy, że dają one dokładne wyniki. + +\section{Algorytm CORDIC} +\subsection{Opis algorytmu} + +Pierwszą proponowaną przez nas metodą obliczania funkcji $\sin$ oraz $\cos$ jest Algorytm CORDIC (\textbf{CO}ordinate \textbf{R}otation \textbf{DI}gital \textbf{C}omputer). Algorytm ten został stworzony z myślą o komputerach o niskiej mocy obliczeniowej, ale również o możliwości ''włożenia'' algorytmu w hardware (tj. pozwala tworzyć mało skomplikowane układy bramek logicznych, które obliczają funkcje trygonometryczne). Jak się przekonamy, proces iteracyjny algorytmu korzysta jedynie z dodawania, odejmowania, przesunięć bitowych i wartości obliczonych podczas preprocessingu oraz nie wykorzystuje liczb zmiennoprzecinkowych. + +Zacznijmy od wprowadzenia zarysu działania algorytmu. Zapomnijmy na razie o analizie numerycznej i przenieśmy się do świata algebry liniowej. Wyobraźmy sobie, że mamy wydajny system który obliczy wektor $(x_r, y_r)$ jako wynik obrotu danego wektora $(x_0, y_0)$ o dany kąt $\theta$ wokół środka układu współrzędnych: +\begin{align} + x_r = x_0\cos\theta - y_0\sin\theta, \\ + y_r = x_0\sin\theta + y_0\cos\theta. +\end{align} + +Jeśli za $(x_0, y_0)$ weźmiemy punkt $(1, 0)$, to po obrocie dostaniemy: +\begin{align*} + x_r = \cos\theta, \\ + y_r = \sin\theta. +\end{align*} +Zatem używając obrotu umiemy policzyć wartości funkcji $\cos$ oraz $\sin$. + +Zapiszmy równania $(1), (2)$ w formie macierzowej: +\begin{align} + \begin{bmatrix} + x_r \\ y_r + \end{bmatrix} + = \begin{bmatrix} + \cos\theta & -\sin\theta \\ + \sin\theta & \cos\theta + \end{bmatrix} + \begin{bmatrix} + x_0 \\ y_0 + \end{bmatrix} + = \cos\theta + \begin{bmatrix} + 1 & -\tan\theta \\ + \tan\theta & 1 + \end{bmatrix} + \begin{bmatrix} + x_0 \\ y_0 + \end{bmatrix}. +\end{align} + +Powyższa równość pokazuje, że do obliczenia naszego wektora wynikowego (przy założeniu, że znamy wartości $\tan\theta$ oraz $\cos\theta$) wystarczą jedynie 4 mnożenia i kilka dodawań lub odejmowań. Chcielibyśmy pozbyć się tych mnożeń. Skorzystamy tutaj z dwóch obserwacji: +\begin{itemize} + \item Każdy kąt $\theta\in [0^{\circ}, 90^{\circ}]$ możemy zapisać jako sumę \textbf{wcześniej ustalonych}, mniejszych (co do modułu) kątów $\theta_i, i \in \{0, ..., n\}$: + \begin{align} + \theta = \sum_{i=0}^n \sigma_i\theta_i, \; \sigma_i \in \{-1, 1\}. + \end{align} + Dla przykładu, kąt $57.353^{\circ}$ jest sumą kątów + $45^{\circ}, 26.565^{\circ}, -14.03^{\circ}$ (dobór tych kątów jest nieprzypadkowy, o czym się zaraz przekonamy). + Jeśli $\theta$ nie należy do zadanego przez nas przedziału, to możemy ten kąt zmienić korzystając ze wzorów redukcyjnych + (o tym więcej w \textsection 3). + \item Jeśli nasze kąty $\theta_i$ będą dobrane tak, że $\tan\theta_i = 2^{-i}$, to mnożenie przez $\tan\theta_i$ jest niczym innym jak przesunięciem bitowym (w liczbach całkowitych). Dodatkowo okazuje się, że dowolny kąt nie większy niż $90^{\circ}$ da się przybliżyć sumą tak dobranych kątów $\theta_i$, więc da się tymi kątami osiągnąć cel założony w pierwszym punkcie. Dodatkowo im więcej takich kątów wybierzemy, tym dokładniejsze będzie to przybliżenie. +\end{itemize} + +Pozostały nam jeszcze mnożenia przez czynnik $\cos\theta$ (który nazwiemy przyrostem). Jeżeli to zignorujemy, to otrzymana rotacja będzie faktycznie obróceniem wektora o kąt $\theta$, ale z dodatkowym przeskalowaniem wektora. + +% \begin{center} +% \begin{tikzpicture} +% \draw [<->,thick] (0,6) node (yaxis) [above] {$y$} +% |- (8,0) node (xaxis) [right] {$x$}; +% \draw [->, thick] (0, 0) -- (6, 2) node (v1) [right] {$(x_0, y_0)$} +% \draw [->, cm={cos(45) ,-sin(45) ,sin(45) ,cos(45) ,(0 cm, 0 cm)}] (0, 0) -- (6,2) +% % \draw[black, thick, ->] (0,0) -- (10,0); +% % \draw[black, thick, ->] (0,0) -- (0,8); +% \end{tikzpicture} +% \end{center} + +Przyjrzyjmy się jak dokładnie będzie wyglądać nasz przyrost, jeśli zastosujemy zaproponowane przez nas punkty do obliczania obrotu. Powiedzmy, że chcemy obrócić wejściowy wektor o kąt $57.353^{\circ} = 45^{\circ} + 26.565^{\circ} - 14.03^{\circ}$. Wartości funkcji $\tan$ tych kątów są odwrotnościami potęg dwójki, zatem te kąty spełniają nasze założenie. Pierwsza rotacja o $45^{\circ}$ daje: +\begin{align} + \begin{bmatrix} + x_1 \\ y_1 + \end{bmatrix} + = \cos 45^{\circ} + \begin{bmatrix} + 1 & -1 \\ + 1 & 1 + \end{bmatrix} + \begin{bmatrix} + x_0 \\ y_0 + \end{bmatrix}. +\end{align} +Druga rotacja daje: +\begin{align} + \begin{bmatrix} + x_2 \\ y_2 + \end{bmatrix} + = \cos 26.565^{\circ} + \begin{bmatrix} + 1 & -2^{-1} \\ + 2^{-1} & 1 + \end{bmatrix} + \begin{bmatrix} + x_1 \\ y_1 + \end{bmatrix}. +\end{align} +Trzecia rotacja: +\begin{align} + \begin{bmatrix} + x_3 \\ y_3 + \end{bmatrix} + = \cos(-14.03^{\circ}) + \begin{bmatrix} + 1 & 2^{-2} \\ + -2^{-2} & 1 + \end{bmatrix} + \begin{bmatrix} + x_2 \\ y_2 + \end{bmatrix}. +\end{align} +Łącząc te równania razem dostajemy: +\begin{align} + \begin{bmatrix} + x_3 \\ y_3 + \end{bmatrix} + = \cos 45^{\circ}\cos 26.565^{\circ}\cos(-14.03^{\circ}) + \begin{bmatrix} + 1 & -1 \\ + 1 & 1 + \end{bmatrix} + \begin{bmatrix} + 1 & -2^{-1} \\ + 2^{-1} & 1 + \end{bmatrix} + \begin{bmatrix} + 1 & 2^{-2} \\ + -2^{-2} & 1 + \end{bmatrix} + \begin{bmatrix} + x_0 \\ y_0 + \end{bmatrix}. +\end{align} + +Zauważmy, że dzięki parzystości funkcji $\cos$ znak poszczególnych kątów nie ma znaczenia dla wartości przyrostu. Z tego snujemy wniosek, że przy ustalonej liczbie iteracji przyrost nie zależy od wyboru kąta $\theta$. Możemy go zatem policzyć i wziąć go pod uwagę dopiero na koniec obliczeń. +\begin{align} + P = \cos 45^{\circ}\cdot\cos 26.565^{\circ}\cdot\cos 14.03^{\circ}\cdot\ldots \approx 0.6072. +\end{align} +W takim razie, pomijając przyrost $P$ otrzymujemy następujący proces iteracyjny algorytmu CORDIC: +\begin{align} + x_{i + 1} & = x_{i} - \sigma_i 2^{-i}y_i, \\ + y_{i + 1} & = y_i + \sigma_i 2^{-i}y_i. +\end{align} + +Pozostaje jedynie problem znajdowania znaków $\sigma_i$ przy kątach $\theta_i$. Okazuje się jednak, że możemy to robić w bardzo prosty sposób. Niech $z_0 = \theta, \sigma_0 = 1$. W każdym kroku iteracyjnym znak $\sigma_{i + 1}$ dobieramy w następujący sposób -- niech $z_{i}$ będzie równe $\theta - \sum_{k=0}^{i - 1}\sigma_k\theta_k$ (czyli $z_i$ mówi jaki jeszcze nam został kąt do obrócenia, potencjalnie obróciliśmy już za dużo, wtedy $z_i < 0$). Wtedy $\sigma_{i + 1} = sgn(z_i)$. Mamy też $z_{i + 1} = z_{i} - \sigma_i\theta_i = z_{i} - \sigma_i\arctan{2^{i}}$. Błąd przybliżenia po $n$ iteracjach możemy wtedy łatwo policzyć ze wzoru +\begin{align} + \theta_{error} = z_n = \theta - \sum_{i=0}^n\sigma_i \theta_i. +\end{align} + +Zbierając wszystko razem, proces iteracyjny algorytmu CORDIC wygląda następująco: +\begin{align*} + x_{i + 1} & = x_{i} - \sigma_i 2^{-i}y_i, \\ + y_{i + 1} & = y_i + \sigma_i 2^{-i}y_i, \\ + z_{i + 1} & = z_i - \sigma_i \arctan 2^{-1}. +\end{align*} + +Kąty $\theta_i = \arctan{2^{-1}}$ możemy policzyć w preprocessingu i używać jako stałych. Wtedy rezultatem naszych obliczeń będzie $\cos\theta \approx P\cdot x_n$ oraz $\sin\theta \approx P\cdot y_n$. Dodatkowo, gdybyśmy przyjęli $x_0 = 1/P$, to pozbylibyśmy się nawet tego ostatniego mnożenia. + +Warto jeszcze zauważyć, że +\begin{align*} + \frac{1}{\cos(\arctan 2^{-i})} = \sqrt{1 + \frac{1}{2^{2i}}}. +\end{align*} +Możemy ten fakt wykorzystać do dokładniejszego obliczania wartości $P$. + +Musimy jeszcze zauważyć, że algorytm działa jedynie dla kątów $\theta$ spełniających +\begin{align*} + \abs{\theta} \leq \sum_{i=0}^n\theta_i \approx 99.88^{\circ}. +\end{align*} +Zatem dla kątów większych niż $90^{\circ}$ musimy skorzystać ze wzorów redukcyjnych, co dokłada pewnego błędu do naszego wyniku oraz powoduje konieczność wykonania kilku dodatkowych dzieleń i mnożeń. + +\subsection{Niespełniona obietnica} +We wstępie powiedzieliśmy, że algorytm będzie korzystał z dodawań, odejmowań i przesunięć bitowych, a do tego używał liczb całkowitych. Dzięki naszemu ustaleniu, że $\arctan\theta_i = 2^{-i}$, wszystkie mnożenia podczas iteracji naszego algorytmu to mnożenia przez potęgi dwójki. Jak możemy to wykorzystać? + +Ustalmy $M := 2^{K}$ dla pewnego $K$ (potem je wybierzemy). Teraz każdą spreprocessowaną +przez nas wartość $T$ (czyli $T$ jest kątem $\theta_i$ lub przyrostem $P$) przyjmiemy +$T := \round(M \cdot T)$. Chcąc policzyć wartości funkcji trygonometrycznych dla kąta $\theta$, +uruchomimy nas proces iteracyjny dla $x_0 = \round(M/P)$, $y_0 = 0$, $z_0 = \round(M\cdot\theta)$. +Zauważmy, że dzięki temu przeskalowaliśmy wszystkie obliczane przez nas wartości o stałą $M$ +i zaokrągliliśmy je po to, by móc pracować na liczbach całkowitych. To pozawala na wykorzystanie +przesunięć bitowych podczas mnożenia przez potęgi dwójki, dzięki czemu znacznie zwiększyliśmy +wydajność naszego algorytmu. Wtedy, po $n$ iteracjach naszego procesu mamy $\cos\theta \approx x_n/M$ +oraz $\sin\theta\approx y_n/M$ (już w arytmetyce zmiennoprzecinkowej). + +Zostało nam ustalić wartość $K$. Na pewno chcielibyśmy, aby $K$ było nie większe niż +długość mantysy. Ponadto algorytm ma być dostosowany do mało wydajnych maszyn, dlatego +w naszych analizach pracujemy przy użyciu \texttt{Int32}, zatem nie chcemy żeby $2^K\cdot T$ przekroczyło +zakres \texttt{Int32}. Jednakże kąty $\theta_i$ oraz wartość $P$ są niewielkie, zatem $K = 30$ będzie +odpowiednią wartością. + +\section{Wzór Taylora} +\subsection{Opis metody} +Zanim przejdziemy do opisu tej metody, przypomnijmy sobie pewną tożsamość trygonometryczną: +\begin{align} + \sin z = \sin (x + yi) = \sin x\cosh (y) + i\cos x\sinh(y). +\end{align} +Korzystając z tej tożsamości pozbywamy się konieczności pracowania z liczbami zespolonymi i możemy operować jedynie w zbiorze liczb rzeczywistych. + +W tej metodzie wykorzystamy znany analityczny wzór zwany wzorem Taylora. Korzystając z niego możemy wyprowadzić rozwinięcia funkcji trygonometrycznych: + +\begin{align*} + \sin x & = x - \frac{x^3}{3!} + \frac{x^5}{5!} - \frac{x^7}{7!} + \ldots, \\ + \sinh x & = x + \frac{x^3}{3!} + \frac{x^5}{5!} + \frac{x^7}{7!} + \ldots, \\ + \cos x & = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \frac{x^6}{6!} + \ldots, \\ + \cosh x & = 1 + \frac{x^2}{2!} + \frac{x^4}{4!} + \frac{x^6}{6!} + \ldots. \\ +\end{align*} + +Obliczanie rozwinięć poszczególnych funkcji jest proste i wyabstrahowaliśmy je do jednej, generycznej funkcji \texttt{TalyorSeries}: +\begin{center} + \begin{algorithm}[H] + \SetAlgoLined + \KwData{x, parity, changeSign, M} + \KwResult{Obliczenie szeregu Taylora odpowiedniej funkcji trygonometrycznej w punkcie x dla jego pierwszych M niezerowych wyrazów} + result := 0\; + elem := 1\; + \If{parity = 1}{ + elem := x\; + } + i := parity + 1\; + \While{i $\le$ 2M + parity}{ + result := result + elem\; + elem := elem * changeSign * x * x / (i * (i + 1))\; + i := i + 2\; + } + \end{algorithm} +\end{center} + +Algorytm oblicza sumę $\sum_{n=0}^M\sigma_n\frac{x^n}{n!}$, gdzie $\sigma_i \in \{-1, 0, 1\}$. Wartość $\sigma_n$ zależy od wartości parametrów podanych w funkcji: gdzy \texttt{parity} jest równe $0$, wtedy mamy $\sigma_{2k + 1} = 0$, a gdy \texttt{parity} jest równe $0$ mamy $\sigma_{2k} = 0$. Odpowiada to odpowiednio szeregom $\cos x, \cosh x$ oraz $\sin x, \sinh x$. Od parametru \texttt{changeSign} zależy czy chcemy, aby kolejne niezerowe wyrazy obliczanego szeregu zmieniały znak (zmieniamy znak, gdy chcemy obliczać zwykłe funkcje trygonometryczne oraz nie zmieniamy gdy obliczamy funkcje hiperboliczne). + +To daje prostą możliwość obliczania pożądanych przez nas funkcji: + +\begin{align*} + \sin x & = \texttt{TaylorSeries}(x, 1, -1, M), \\ + \sinh x & = \texttt{TaylorSeries}(x, 1, 1, M), \\ + \cos x & = \texttt{TaylorSeries}(x, 0, -1, M), \\ + \cosh x & = \texttt{TaylorSeries}(x, 0, 1, M). +\end{align*} + +Zauważmy, że wzór Taylora nadaje się do przybliżania funkcji trygonometrycznych jedynie dla argumentów bliskich $0$. +Na szczęście możemy sobie z tym poradzić korzystając ze znanych tożsamości trygonometrycznych oraz okresowości funkcji $\sin$ i $\cos$. +Naszym celem przed obliczniem funkcji \texttt{TaylorSeries} będzie sprowadzenie argumentu do przedziału $[0, \pi/4]$, +w którym wzór Taylora bardzo dobrze przybliża wartości funkcji trygonometrycznych. +Oto tabela która przedstawia jak radzimy sobie z argumentami spoza tego przedziału: +\begin{table}[H] + \centering + \begin{tabular}{ |p{4cm}||p{4cm}|p{4cm}| } + \hline + \multicolumn{3}{|c|}{Wzory redukcyjne} \\ + \hline + Warunek na $x$ & $\sin x$ & $\cos x$ \\ + \hline + $x < 0$ & $-\sin (-x)$ & $\cos (-x)$ \\ + $x \ge 2\pi$ & $\sin(x \mod 2\pi)$ & $\cos (x\mod 2\pi)$ \\ + $x > \pi$ & $-\sin(x - \pi)$ & $-\cos(x - \pi)$ \\ + $x > \pi/2$ & $\cos(x - \pi/2)$ & $-\sin(x - \pi/2)$ \\ + $x > \pi/4$ & $\cos(\pi/2 - x)$ & $\sin(\pi/2 - x)$ \\ + \hline + \end{tabular} + \caption{Wzory redukcyjne.} + \label{tab:reduk} +\end{table} + +Dla funkcji hiperbolicznych sposób jest prostszy: korzystamy z dwóch własności: +\begin{align*} + \sinh x & = 2\sinh(x/2)\cosh(x/2), \\ + \cosh x & = \cosh^2(x/2) + \sinh^2(x/2). +\end{align*} +Można by przypuszczać, że dla dużych $x$ błąd obliczania tych funkcji będzie duży. Jednakże okazuje się, że funkcje te bardzo szybko rosną i już dla $x = 1000$ wartości obu tych funkcji nie mieszczą się w zakresie \texttt{Float64}, zatem tak naprawdę wykonamy maksymalnie $15$ takich redukcji, co generuje dopuszczalnie mały błąd. + +\section{Analiza błędu} + +\subsection{Wyniki testów} +Dokładność naszych metod porównywaliśmy z funkcjami bibliotecznymi w języku \texttt{Julia}, które domyślnie obsługują obliczanie wartości funkcji trygonometrycznych dla liczb zespolonych. Zakładmy o tych funkcjach bibliotecznych, że dają poprawny wynik. + +Przeprowadziliśmy testy dokładności metody opartej na wzorze Taylora dla liczb rzeczywistych oraz dla liczb zespolonych oraz testy dla metody Taylora, w której nie używaliśmy wzorów redukcyjnych, lecz rozwijaliśmy wzór dopóki wystarczająco dobrze nie przybliżał wartości funkcji dla danego argumentu. Testy dla algorytmu CORDIC przeprowadziliśmy wyłącznie dla liczb rzeczywistych. + +Dla każdej metody przeprowadziliśmy trzy rodzaje testów, w każdym z nich losowaliśmy $10^8$ liczb z różnych przedziałów. Ze względu na podobieństwo funkcji $\sin$ i $\cos$ oraz z faktu, że często wzory redukcyjne powodują faktycznie obliczanie innej funkcji trygonometrycznej, testy przeprowadziliśmy wyłącznie dla funkcji $\sin$. Przedziały i wyniki testów przedstawione są w poniższej tabeli: + +\begin{table}[H] + \centering + \resizebox{\textwidth}{!}{% + {\setlength{\extrarowheight}{5pt}% + \begin{tabular}{ |c||c|c|c|c|c| } + \hline + algorytm & przedział argumentu & średni błąd wz. & max błąd wz. & średni błąd bezwz. & max błąd bezwz. \\ + \hline + \multirow{3}{6em}{Taylor dla $\RR$} & $x:$ dowolny Float64 & $1,887 \cdot 10^{-15}$ & $3,167 \cdot 10^{-8}$ & $1,179 \cdot 10^{-16}$ & $8,882 \cdot 10^{-16}$ \\ + \cline{2-6} + & $-2\pi \leq x \leq 2\pi$ & $1,472 \cdot 10^{-15}$ + & $1.184 \cdot 10^{-8}$ & $9,766 \cdot 10^{-17}$ & $5,551 \cdot 10^{-16}$ \\ + \cline{2-6} + & $0 \leq x \leq 1$ & $8,694 \cdot 10^{-17}$ & $6,661 \cdot 10^{-16}$ & $4,293 \cdot 10^{-17}$ & $4,441 \cdot 10^{-16}$ \\ + \hline + \multirow{3}{6em}{Taylor dla $\CC$} & $-100 \leq \abs{x} \leq 100$ & $4,932 \cdot 10^{-15}$ & $1,311 \cdot 10^{-13}$ & $1,689 \cdot 10^{26}$ & $5,898 \cdot 10^{29}$ \\ + \cline{2-6} + & $-2\pi \leq \abs{x} \leq 2\pi$ & $4,338 \cdot 10^{-16}$ & $1,487 \cdot 10^{-11}$ & $1,364 \cdot 10^{-14}$ & $8,710 \cdot 10^{-13}$ \\ + \cline{2-6} + & $0 \leq \abs{x} \leq 1$ & $1,597 \cdot 10^{-16}$ & $1,099 \cdot 10^{-15}$ & $1,124 \cdot 10^{-16}$ & $1,111\cdot 10^{-15}$ \\ + \hline + \multirow{3}{6em}{Taylor dla $\CC$ bez wzorów redukcyjnych} & $-100 \leq \abs{x} \leq 100$ & $4,77 \cdot 10^{23}$ & $4,488 \cdot 10^{26}$ & $7,759 \cdot 10^{40}$ & $2,208 \cdot 10^{44}$ \\ + \cline{2-6} + & $-2\pi \leq \abs{x} \leq 2\pi$ & $6,333 \cdot 10^{-1}$ & $1,000$ & $2,344 \cdot 10$ & $2,677 \cdot 10^2$ \\ + \cline{2-6} + & $0 \leq \abs{x} \leq 1$ & $1,589 \cdot 10^{-16}$ & $1,291 \cdot 10^{-15}$ & $1,118 \cdot 10^{-16}$ & $1,116 \cdot 10^{-15}$ \\ + \hline + \multirow{3}{6em}{Cordic dla $\RR$} & $x:$ dowolny Float64 & $3,100 \cdot 10^{-8}$ & $4,575 \cdot 10^{-1}$ & $2,459 \cdot 10^{-9}$ & $5,529 \cdot 10^{-3}$ \\ + \cline{2-6} + & $-2\pi \leq x \leq 2\pi$ & $2,770 \cdot 10^{-8}$ & $1,183 \cdot 10^{-1}$ & $2,532 \cdot 10^{-9}$ & $6,042 \cdot 10^{-4}$ \\ + \cline{2-6} + & $0 \leq x \leq 1$ & $4,176 \cdot 10^{-8}$ & $9,182 \cdot 10^{-2}$ & $2,614 \cdot 10^{-9}$ & $5,261 \cdot 10^{-4}$ \\ + \hline + \end{tabular} + }} + \caption{Błędy przy obliczaniu funkcji $\sin(x)$.} + \label{tab:2} +\end{table} + +\subsection{Wnioski} +Jak widać w tabeli \ref{tab:2}, dla wszystkich testów zaproponowane przez nas metody sprawdzają +się bardzo dobrze dla małych argumentów. Algorytm CORDIC wypada dużo gorzej od metody korzystającej +ze wzoru Taylora, lecz nie jest to dla nas nic zaskakującego -- metoda ta tworzy kompromis +między wydajnością, a dokładnością obliczeń. Dla obu metod widać, że problemem jest zmiana +argumentu na mały, gdyż to generuje największy błąd. W obu przypadkach najgorszy błąd względny +generowały argumenty, które są duże i zbliżone do wielokrotności $\pi$, co wynika z konieczności odejmowania, +z którego korzysta wbudowana w \texttt{Julia} funkcja \texttt{mod2pi} oraz wzory redukcyjne. +Prowadzi do utraty cyfr znaczących, tym samym obniżając dokładność obliczeń. + +Dużym problemem w obliczaniu wartości funkcji trygonometrycznych w dziedzinie liczb zespolonych jest konieczność używa funkcji hiperbolicznych, które rosną w tempie wykładniczym. Jeśli spojrzymy na wzór $(13)$ to zauważmy, że bardzo prawdopodobne jest, że będziemy mnożyć zbliżoną do $0$ wartość funkcji $\sin$ oraz $\cos$ z potencjalnie bardzo dużymi wartościami funkcji $\cosh$ i $\sinh$. + +Mimo to jesteśmy zadowoleni z rezultatów dla losowych testów -- jak widać, średni błąd względny jest rzędu dokładności liczb o precyzji podwójnej w przypadku metody Taylora oraz rzędu pojedynczej precyzji dla algorytmu CORDIC (co wynika z użycia \texttt{Int32} podczas procesu iteracyjnego). + +\begin{thebibliography}{9} + \bibitem{CORDIC tutorial} + Steve Arar. + \textit{An Introduction to the CORDIC Algorithm}. + \\\texttt{\url{https://www.allaboutcircuits.com/technical-articles/an-introduction-to-the-cordic-algorithm/}} + + \bibitem{CORDIC ints} + Andrea Vitali. + \textit{Coordinate rotation digital computer algorithm (CORDIC) + to compute trigonometric and hyperbolic functions}. + \\\texttt{\url{https://bit.ly/3lVQxbJ}} +\end{thebibliography} +\end{document} \ No newline at end of file diff --git a/semestr-3/anm/xd.pdf b/semestr-3/anm/xd.pdf new file mode 100644 index 0000000..7c569e6 Binary files /dev/null and b/semestr-3/anm/xd.pdf differ diff --git a/semestr-3/anm/zad126.jl b/semestr-3/anm/zad126.jl new file mode 100644 index 0000000..02b0d31 --- /dev/null +++ b/semestr-3/anm/zad126.jl @@ -0,0 +1,58 @@ +using Plots + +phi = pi / 3 + +x0 = 0 +y0 = 0 +u0 = 100 * cos(phi) +v0 = 100 * sin(phi) +g = 9.81 + +function iterate(x, y, u, v, h, k) + xn = x + h * u + yn = y + h * v + un = u * (1 - h * k * sqrt(u * u + v * v)) + vn = v - h * (g + k * sqrt(u * u + v * v) * v) + return (xn, yn, un, vn) +end + +function getPoints(k, h, phi) + x0 = 0 + y0 = 0 + u0 = 100 * cos(phi) + v0 = 100 * sin(phi) + + x = x0 + y = y0 + u = u0 + v = v0 + + X = Array{Float64}(undef, 0) + Y = Array{Float64}(undef, 0) + i = 1 + while y >= 0 + if (y < 0) + return (X[1:1:i - 1], Y[1:1:i - 1]) + end + append!(X, x) + append!(Y, y) + x, y, u, v = iterate(x, y, u, v, h, k) + i += 1 + end + println(x, " ", y) + return (X, Y) +end + +function plotArmata(K, phi, h) + X, Y = getPoints(K[1], h, phi[1]) + p = plot(X, Y, label=string("k: ", (K[1]), " φ: ", string(phi[1])[1:1:5]); draw_arrow=true, aspect_ratio=:equal) + for i in 2:length(K) + X, Y = getPoints(K[i], h, phi[i]) + plot!(p, X, Y, label=string("k: ", (K[i]), " φ: ", string(phi[i])[1:1:5]), aspect_ratio=:equal) + end + xlabel!("Odległość [m]") + ylabel!("Wysokość [m]") + display(p) +end + +# plotArmata([0.01, 0.012, 0.014, 0.016, 0.018, 0.2], 0.01) \ No newline at end of file diff --git a/semestr-3/anm/zad2.jpeg b/semestr-3/anm/zad2.jpeg new file mode 100644 index 0000000..42391e1 Binary files /dev/null and b/semestr-3/anm/zad2.jpeg differ diff --git a/semestr-3/anm/zad2ab.jpeg b/semestr-3/anm/zad2ab.jpeg new file mode 100644 index 0000000..00c36c6 Binary files /dev/null and b/semestr-3/anm/zad2ab.jpeg differ diff --git a/semestr-3/anm/zad3.jpeg b/semestr-3/anm/zad3.jpeg new file mode 100644 index 0000000..54d4c44 Binary files /dev/null and b/semestr-3/anm/zad3.jpeg differ diff --git "a/semestr-3/anm/zadanie 9 tre\305\233\304\207.png" "b/semestr-3/anm/zadanie 9 tre\305\233\304\207.png" new file mode 100644 index 0000000..faa9d28 Binary files /dev/null and "b/semestr-3/anm/zadanie 9 tre\305\233\304\207.png" differ diff --git a/semestr-3/anm/zadanie 9.png b/semestr-3/anm/zadanie 9.png new file mode 100644 index 0000000..ee3d9d4 Binary files /dev/null and b/semestr-3/anm/zadanie 9.png differ -- cgit v1.2.3