Last commit used xstrtod(), forgot to check it in.
diff --git a/lib/lib.h b/lib/lib.h
index 9325a89..a9a92fd 100644
--- a/lib/lib.h
+++ b/lib/lib.h
@@ -168,6 +168,7 @@
 unsigned xgetgid(char *name);
 void xsetuser(struct passwd *pwd);
 char *xreadlink(char *name);
+double xstrtod(char *s);
 long xparsetime(char *arg, long units, long *fraction);
 void xpidfile(char *name);
 void xregcomp(regex_t *preg, char *rexec, int cflags);
diff --git a/lib/xwrap.c b/lib/xwrap.c
index 83f54a0..74da0ed 100644
--- a/lib/xwrap.c
+++ b/lib/xwrap.c
@@ -755,6 +755,19 @@
   return total;
 }
 
+double xstrtod(char *s)
+{
+  char *end;
+  double d;
+
+  errno = 0;
+  d = strtod(s, &end);
+  if (!errno && *end) errno = E2BIG;
+  if (errno) perror_exit("strtod %s", s);
+
+  return d;
+}
+
 // parse fractional seconds with optional s/m/h/d suffix
 long xparsetime(char *arg, long units, long *fraction)
 {