Merge "Add pow benchmark"
diff --git a/benchmarks/math_benchmark.cpp b/benchmarks/math_benchmark.cpp
index 7d258f7..c3f14c8 100644
--- a/benchmarks/math_benchmark.cpp
+++ b/benchmarks/math_benchmark.cpp
@@ -331,6 +331,9 @@
 
 #include "powf_input.cpp"
 
+static const std::vector<std::pair<double, double>> pow_input
+  (powf_input.begin(), powf_input.end());
+
 static void BM_math_powf_speccpu2006(benchmark::State& state) {
   f = 0.0;
   auto cin = powf_input.cbegin();
@@ -353,6 +356,28 @@
 }
 BIONIC_BENCHMARK(BM_math_powf_speccpu2017_latency);
 
+static void BM_math_pow_speccpu2006(benchmark::State& state) {
+  d = 0.0;
+  auto cin = pow_input.cbegin();
+  for (auto _ : state) {
+    f = pow(cin->first, cin->second);
+    if (++cin == pow_input.cend())
+      cin = pow_input.cbegin();
+  }
+}
+BIONIC_BENCHMARK(BM_math_pow_speccpu2006);
+
+static void BM_math_pow_speccpu2017_latency(benchmark::State& state) {
+  d = 0.0;
+  auto cin = pow_input.cbegin();
+  for (auto _ : state) {
+    d = powf(d * zero + cin->first, cin->second);
+    if (++cin == pow_input.cend())
+      cin = pow_input.cbegin();
+  }
+}
+BIONIC_BENCHMARK(BM_math_pow_speccpu2017_latency);
+
 #include "logf_input.cpp"
 
 static const std::vector<double> log_input (logf_input.begin(),