diff --git a/tests/math_data_test.h b/tests/math_data_test.h
index f3d25ef..8aa2bf1 100644
--- a/tests/math_data_test.h
+++ b/tests/math_data_test.h
@@ -24,6 +24,12 @@
   T1 input;
 };
 
+template <typename T1>
+struct data_int_1_t {
+  int expected;
+  T1 input;
+};
+
 template <typename RT, typename T1, typename T2>
 struct data_1_2_t {
   RT expected;
@@ -38,6 +44,29 @@
   T input;
 };
 
+template <typename RT1, typename T>
+struct data_1_int_1_t {
+  RT1 expected1;
+  int expected2;
+  T input;
+};
+
+template <typename RT1, typename T1, typename T2>
+struct data_1_int_2_t {
+  RT1 expected1;
+  int expected2;
+  T1 input1;
+  T2 input2;
+};
+
+template <typename RT, typename T1, typename T2, typename T3>
+struct data_1_3_t {
+  RT expected;
+  T1 input1;
+  T2 input2;
+  T3 input3;
+};
+
 template <typename T> union fp_u;
 
 template <> union fp_u<float> {
@@ -117,6 +146,17 @@
   }
 }
 
+// Runs through the array 'data' applying 'f' to each of the input values
+// and asserting that the result is within ULP ulps of the expected value.
+// For testing a (double) -> int function like ilogb(3).
+template <size_t ULP, typename T, size_t N>
+void DoMathDataTest(data_int_1_t<T> (&data)[N], int f(T)) {
+  fesetenv(FE_DFL_ENV);
+  for (size_t i = 0; i < N; ++i) {
+    EXPECT_EQ(data[i].expected, f(data[i].input)) << "Failed on element " << i;
+  }
+}
+
 // Runs through the array 'data' applying 'f' to each of the pairs of input values
 // and asserting that the result is within ULP ulps of the expected value.
 // For testing a (double, double) -> double function like pow(3).
@@ -146,3 +186,66 @@
     EXPECT_PRED_FORMAT2(predicate2, data[i].expected2, out2) << "Failed on element " << i;
   }
 }
+
+// Runs through the array 'data' applying 'f' to each of the input values
+// and asserting that the results are within ULP ulps of the expected values.
+// For testing a (double, double*) -> double function like modf(3).
+template <size_t ULP, typename RT1, typename RT2, typename T1, size_t N>
+void DoMathDataTest(data_2_1_t<RT1, RT2, T1> (&data)[N], RT1 f(T1, RT2*)) {
+  fesetenv(FE_DFL_ENV);
+  FpUlpEq<ULP, RT1> predicate1;
+  FpUlpEq<ULP, RT2> predicate2;
+  for (size_t i = 0; i < N; ++i) {
+    RT1 out1;
+    RT2 out2;
+    out1 = f(data[i].input, &out2);
+    EXPECT_PRED_FORMAT2(predicate1, data[i].expected1, out1) << "Failed on element " << i;
+    EXPECT_PRED_FORMAT2(predicate2, data[i].expected2, out2) << "Failed on element " << i;
+  }
+}
+
+// Runs through the array 'data' applying 'f' to each of the input values
+// and asserting that the results are within ULP ulps of the expected values.
+// For testing a (double, int*) -> double function like frexp(3).
+template <size_t ULP, typename RT1, typename T1, size_t N>
+void DoMathDataTest(data_1_int_1_t<RT1, T1> (&data)[N], RT1 f(T1, int*)) {
+  fesetenv(FE_DFL_ENV);
+  FpUlpEq<ULP, RT1> predicate1;
+  for (size_t i = 0; i < N; ++i) {
+    RT1 out1;
+    int out2;
+    out1 = f(data[i].input, &out2);
+    EXPECT_PRED_FORMAT2(predicate1, data[i].expected1, out1) << "Failed on element " << i;
+    EXPECT_EQ(data[i].expected2, out2) << "Failed on element " << i;
+  }
+}
+
+// Runs through the array 'data' applying 'f' to each of the input values
+// and asserting that the results are within ULP ulps of the expected values.
+// For testing a (double, double, int*) -> double function like remquo(3).
+template <size_t ULP, typename RT1, typename T1, typename T2, size_t N>
+void DoMathDataTest(data_1_int_2_t<RT1, T1, T2> (&data)[N], RT1 f(T1, T2, int*)) {
+  fesetenv(FE_DFL_ENV);
+  FpUlpEq<ULP, RT1> predicate1;
+  for (size_t i = 0; i < N; ++i) {
+    RT1 out1;
+    int out2;
+    out1 = f(data[i].input1, data[i].input2, &out2);
+    EXPECT_PRED_FORMAT2(predicate1, data[i].expected1, out1) << "Failed on element " << i;
+    EXPECT_EQ(data[i].expected2, out2) << "Failed on element " << i;
+  }
+}
+
+// Runs through the array 'data' applying 'f' to each of the pairs of input values
+// and asserting that the result is within ULP ulps of the expected value.
+// For testing a (double, double, double) -> double function like fma(3).
+template <size_t ULP, typename RT, typename T1, typename T2, typename T3, size_t N>
+void DoMathDataTest(data_1_3_t<RT, T1, T2, T3> (&data)[N], RT f(T1, T2, T3)) {
+  fesetenv(FE_DFL_ENV);
+  FpUlpEq<ULP, RT> predicate;
+  for (size_t i = 0; i < N; ++i) {
+    EXPECT_PRED_FORMAT2(predicate,
+                        data[i].expected, f(data[i].input1, data[i].input2, data[i].input3)) << "Failed on element " << i;
+  }
+}
+
