summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorjustanothercatgirl <sotov2070@gmail.com>2024-09-05 11:49:07 +0300
committerjustanothercatgirl <sotov2070@gmail.com>2024-09-05 11:49:07 +0300
commitbd2943ca42013a089975893eb84e1e48cec6a03b (patch)
treefdd475a34216478cba340b36680e149df8f97097 /libs
parent3bb7e487d762fcdc9e9216b85c869fc5668f5bea (diff)
Initial commitHEADmaster
Diffstat (limited to 'libs')
-rw-r--r--libs/libpoly.c7
-rw-r--r--libs/libsin.c7
-rw-r--r--libs/libsq.c4
3 files changed, 18 insertions, 0 deletions
diff --git a/libs/libpoly.c b/libs/libpoly.c
new file mode 100644
index 0000000..2daa972
--- /dev/null
+++ b/libs/libpoly.c
@@ -0,0 +1,7 @@
+
+#include <math.h>
+
+// calculate polynomial
+double f(double x) {
+ return pow(x, 3) - 2*x*x - 10*x + 69;
+}
diff --git a/libs/libsin.c b/libs/libsin.c
new file mode 100644
index 0000000..34200af
--- /dev/null
+++ b/libs/libsin.c
@@ -0,0 +1,7 @@
+
+#include <math.h>
+
+// calculate sine
+double f(double x) {
+ return sin(x);
+}
diff --git a/libs/libsq.c b/libs/libsq.c
new file mode 100644
index 0000000..2b93fb4
--- /dev/null
+++ b/libs/libsq.c
@@ -0,0 +1,4 @@
+// calculate square
+double f(double x) {
+ return x*x;
+}