 +    4.49894132584540740e-297,                  INFINITY, -2.70206686236961415e-299,
 +                   INFINITY,  1.61317424619081441e-301,                  INFINITY,
 +    -9.57373439875854268e-304,                  INFINITY};
- 
+
 -    // The table of values, coded using the (prettier) C++14 syntax for `constexpr`.
 -    // If needed, we could re-code this for C++11...
 -    struct Table {

             throw errors::SqrtNegativeNumber();
         else
@@ -114,17 +654,17 @@ namespace tables {
 
     // Inverse of the square root of n
     template <typename T>
-    T invsqrt_int(int n) {

+#include <cstddef>
+#include <array>
 #include "errors.h"

 // Square root of pi at double precision
@@ -24,88 +26,626 @@ using good old template metaprogramming (>= C++14)
 // Largest square root we're willing to tabulate
 #define MAXSQRT 300

-namespace tables {
-
-    double constexpr sqrt_rec(double x, double curr, double prev) {
