diff --git a/manifest.dhall b/manifest.dhall
index c67f736875201f9ad4c11ad8078972aa0cc6f3a9..8de89ae76ec060efa948a7dc019b51f6e8a53ee5 100644
--- a/manifest.dhall
+++ b/manifest.dhall
@@ -367,6 +367,7 @@ in  [ callHackage "Cabal" "3.8.1.0"
     , callHackage "lucid" "2.11.1"
     , callHackage "lukko" "0.1.1.3"
     , callHackage "net-mqtt" "0.8.2.2"
+    , callHackage "math-functions" "0.3.4.2"
     , callHackage "megaparsec" "9.2.2"
     , callHackage "memory" "0.18.0"
     , callHackage "mockery" "0.3.5"
diff --git a/overlay.nix b/overlay.nix
index 1d372ded37d025a256d3601eb8d1375fe1aae7ae..55de0b006ee32737c4448e92a343b969531ceec2 100644
--- a/overlay.nix
+++ b/overlay.nix
@@ -461,6 +461,8 @@ final: prev: with pkgs.haskell.lib; {
 
   lukko = prev.callPackage (./pkgs/lukko.nix) { };
 
+  math-functions = prev.callPackage (./pkgs/math-functions.nix) { };
+
   megaparsec = prev.callPackage (./pkgs/megaparsec.nix) { };
 
   memory = prev.callPackage (./pkgs/memory.nix) { };
diff --git a/pkgs/math-functions.nix b/pkgs/math-functions.nix
new file mode 100644
index 0000000000000000000000000000000000000000..16257fbe677a52fa88296501c979e6d2b7fd2ac7
--- /dev/null
+++ b/pkgs/math-functions.nix
@@ -0,0 +1,62 @@
+{ mkDerivation
+, base
+, data-default-class
+, deepseq
+, erf
+, gauge
+, lib
+, primitive
+, QuickCheck
+, random
+, tasty
+, tasty-hunit
+, tasty-quickcheck
+, vector
+, vector-th-unbox
+}:
+mkDerivation {
+  pname = "math-functions";
+  version = "0.3.4.2";
+  sha256 = "c1e50ac0d23492b684cce33a9a979e1315ac144175b54f82eade9b8b1885c1a3";
+  isLibrary = true;
+  isExecutable = false;
+  enableSeparateDataOutput = false;
+  libraryHaskellDepends = [
+    base
+    data-default-class
+    deepseq
+    primitive
+    vector
+  ];
+  testHaskellDepends = [
+    base
+    data-default-class
+    deepseq
+    erf
+    primitive
+    QuickCheck
+    tasty
+    tasty-hunit
+    tasty-quickcheck
+    vector
+    vector-th-unbox
+  ];
+  benchmarkHaskellDepends = [
+    base
+    data-default-class
+    gauge
+    random
+    vector
+  ];
+  enableLibraryProfiling = false;
+  enableExecutableProfiling = false;
+  doHaddock = false;
+  jailbreak = true;
+  doCheck = false;
+  doBenchmark = false;
+  hyperlinkSource = false;
+  homepage = "https://github.com/bos/math-functions";
+  description = "Collection of tools for numeric computations";
+  license = lib.licenses.bsd2;
+  broken = false;
+}