aboutsummaryrefslogtreecommitdiffstats
path: root/118/main.cpp
diff options
context:
space:
mode:
authorjustanothercatgirl <sotov2070@gmail.com>2024-12-02 16:25:24 +0300
committerjustanothercatgirl <sotov2070@gmail.com>2024-12-02 16:25:24 +0300
commit17c1a6895263eb31bdfb8859cb5ebc7255dae23c (patch)
tree7e3dfbbad181c57b37e755df9a33ac575aae488c /118/main.cpp
parentdfa85cca6464637aa6ad943da3f9ce8ccdfeca1f (diff)
added 118 prak
Diffstat (limited to '118/main.cpp')
-rw-r--r--118/main.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/118/main.cpp b/118/main.cpp
new file mode 100644
index 0000000..5e2c0a2
--- /dev/null
+++ b/118/main.cpp
@@ -0,0 +1,13 @@
+#include <iostream>
+
+#include "include/prakmath.hpp"
+
+int main() {
+ prak::vector<f64> dx = {0.003, 0.005, 0.013, 0.007, 0.015, 0.020, 0.022, 0.028, 0.030, 0.032, 0.036, 0.040, 0.042, 0.046, 0.047, 0.065, 0.052};
+ prak::vector<f64> ms = {0.010, 0.020, 0.050, 0.030, 0.060, 0.070, 0.080, 0.100, 0.110, 0.120, 0.130, 0.150, 0.160, 0.170, 0.180, 0.243, 0.193};
+ prak::vector<f64> ss = {0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001};
+ prak::pvalue<f64> A, B;
+ prak::least_squares_linear<f64>(ms, dx, ss, A, B);
+ std::cout << A << '\n' << B << std::endl;
+ return 0;
+}