From 5ee716791bf7a8ca74c1670a6887a53ab92141f6 Mon Sep 17 00:00:00 2001 From: justanothercatgirl Date: Mon, 14 Apr 2025 00:34:52 +0300 Subject: added 218, 226, 234, 240 --- 218/main.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 218/main.cpp (limited to '218/main.cpp') diff --git a/218/main.cpp b/218/main.cpp new file mode 100644 index 0000000..379804a --- /dev/null +++ b/218/main.cpp @@ -0,0 +1,19 @@ +#include +#include "include/praktable.hpp" +#include "include/prakphys.hpp" + +int main() { + prak::table t("data"); + t .add_column("1/dt") + .apply(prak::inv, "dt", "1/dt") + .write_plot("1dt(dp).plot", "dp", "1/dt", std::nullopt) + .print(); + auto [A, B] = t.least_squares_linear("dp", "1/dt", std::nullopt, 0.00001); + f64 W = 3.82; + prak::pvalue beta = {1.51e-6, 0.05e-6}, T0 = {298.5, 1}, p0 = {0.99e5, 500}, + CPR = A * W * T0 / beta / p0, CP = CPR * prak::R, + CVR = CPR - 1.0, CV = CVR * prak::R, i = 2.0*CV/prak::R; + + std::cout var(A) var(B) var(beta) var(p0) var(CPR) var(CP) var(CVR) var(CV) var(i) << std::endl; + return 0; +} -- cgit v1.2.3-70-g09d2