Index: /branches/eam_branches/ohana.20150429/src/opihi/cmd.data/cast.c
===================================================================
--- /branches/eam_branches/ohana.20150429/src/opihi/cmd.data/cast.c	(revision 38405)
+++ /branches/eam_branches/ohana.20150429/src/opihi/cmd.data/cast.c	(revision 38406)
@@ -17,7 +17,15 @@
   // out type 
   char outType = OPIHI_NOTYPE;
-  if (!strcasecmp(argv[5], "int")) outType = OPIHI_INT;
-  if (!strcasecmp(argv[5], "float")) outType = OPIHI_FLT;
+  if (!strcasecmp(argv[5], "int"))    outType = OPIHI_INT;
+  if (!strcasecmp(argv[5], "float"))  outType = OPIHI_FLT;
+  if (!strcasecmp(argv[5], "single")) outType = OPIHI_FLT;
+  if (!strcasecmp(argv[5], "int64"))  outType = OPIHI_FLT;
   if (outType == OPIHI_NOTYPE) goto usage;
+
+  int ForceSingle = FALSE;
+  if (!strcasecmp(argv[5], "single")) ForceSingle = TRUE;
+
+  int ForceI64 = FALSE;
+  if (!strcasecmp(argv[5], "int64")) ForceI64 = TRUE;
 
   if ((ovec = SelectVector (argv[1], ANYVECTOR, TRUE)) == NULL) goto error;
@@ -32,5 +40,13 @@
     opihi_flt *vo = ovec[0].elements.Flt;
     for (i = 0; i < ovec[0].Nelements; i++, vi++, vo++) {
-      *vo = *vi;
+      if (ForceSingle) {
+	float tmp = *vi;
+	*vo = tmp;
+      } else if (ForceI64) {
+	int64_t tmp = *vi;
+	*vo = tmp;
+      } else {
+	*vo = *vi;
+      }
     }
     return (TRUE);
@@ -48,5 +64,10 @@
     opihi_flt *vo = ovec[0].elements.Flt;
     for (i = 0; i < ovec[0].Nelements; i++, vi++, vo++) {
-      *vo = *vi;
+      if (ForceSingle) {
+	float tmp = *vi;
+	*vo = tmp;
+      } else {
+	*vo = *vi;
+      }
     }
     return (TRUE);
@@ -66,5 +87,6 @@
 
 usage:
-  gprint (GP_ERR, "SYNTAX: cast vec = vec as (int/float)\n");
+  gprint (GP_ERR, "SYNTAX: cast vec = vec as (int/float/single)\n");
+  gprint (GP_ERR, "  note: (single) forces vector to have single precision\n");
   return (FALSE);
 }
Index: /branches/eam_branches/ohana.20150429/src/opihi/cmd.data/read_vectors.c
===================================================================
--- /branches/eam_branches/ohana.20150429/src/opihi/cmd.data/read_vectors.c	(revision 38405)
+++ /branches/eam_branches/ohana.20150429/src/opihi/cmd.data/read_vectors.c	(revision 38406)
@@ -487,10 +487,10 @@
   }
   if (start < 0) ESCAPE ("invalid range: start < 0\n");
-  if (start >= header.Naxis[1]) ESCAPE ("invalid range: start >= Ny (%d)\n", header.Naxis[1]);
+  if (start >= header.Naxis[1]) ESCAPE ("invalid range: start >= Ny ("OFF_T_FMT")\n", header.Naxis[1]);
   if (Nrows < 0) ESCAPE ("invalid range: Nrows < 0\n");
 
   // just a warning:
   if (start + Nrows > header.Naxis[1]) {
-    if (VERBOSE) gprint (GP_ERR, "NOTE: reading last block will return only %d rows\n", header.Naxis[1] - start);
+    if (VERBOSE) gprint (GP_ERR, "NOTE: reading last block will return only "OFF_T_FMT" rows\n", header.Naxis[1] - start);
   }
 
@@ -555,5 +555,5 @@
     
     vecType = OPIHI_INT;
-    if (!strcmp (type, "double") || !strcmp (type, "float")) {
+    if (!strcmp (type, "double") || !strcmp (type, "float") || !strcmp (type, "int64_t")) {
       vecType = OPIHI_FLT;
     }
Index: /branches/eam_branches/ohana.20150429/src/opihi/cmd.data/vstats.c
===================================================================
--- /branches/eam_branches/ohana.20150429/src/opihi/cmd.data/vstats.c	(revision 38405)
+++ /branches/eam_branches/ohana.20150429/src/opihi/cmd.data/vstats.c	(revision 38406)
@@ -121,4 +121,6 @@
       goto skip;
     }
+    // we can hit inf if pmax and pmin are close to the max range
+    if (isinf(dx)) dx = DBL_MAX / Nbin;
 
     ALLOCATE (Nval, int, Nbin + 2);
Index: /branches/eam_branches/ohana.20150429/src/opihi/lib.shell/VectorIO.c
===================================================================
--- /branches/eam_branches/ohana.20150429/src/opihi/lib.shell/VectorIO.c	(revision 38405)
+++ /branches/eam_branches/ohana.20150429/src/opihi/lib.shell/VectorIO.c	(revision 38406)
@@ -320,5 +320,5 @@
   ASSIGN_DATA(short,   short,   Int);
   ASSIGN_DATA(int,     int,     Int);
-  ASSIGN_DATA(int64_t, int64_t, Int);
+  ASSIGN_DATA(int64_t, int64_t, Flt); // int64_t has a problem: Int is too small, Flt is wrong precision
   ASSIGN_DATA(float,   float,   Flt);
   ASSIGN_DATA(double,  double,  Flt);
@@ -345,5 +345,5 @@
   ASSIGN_DATA_TRANSPOSE(short,   short,   Int);
   ASSIGN_DATA_TRANSPOSE(int,     int,     Int);
-  ASSIGN_DATA_TRANSPOSE(int64_t, int64_t, Int);
+  ASSIGN_DATA_TRANSPOSE(int64_t, int64_t, Flt);
   ASSIGN_DATA_TRANSPOSE(float,   float,   Flt);
   ASSIGN_DATA_TRANSPOSE(double,  double,  Flt);
Index: /branches/eam_branches/ohana.20150429/src/opihi/lib.shell/evaluate_stack.c
===================================================================
--- /branches/eam_branches/ohana.20150429/src/opihi/lib.shell/evaluate_stack.c	(revision 38405)
+++ /branches/eam_branches/ohana.20150429/src/opihi/lib.shell/evaluate_stack.c	(revision 38406)
@@ -115,5 +115,6 @@
 
 	/* there are no valid unary string operators */
-	push_error ("invalid operands for trinary operator (mismatch types?)");
+	snprintf (line, 512, "invalid operands for trinary operator %s (mismatch types?)", stack[i].name);
+	push_error (line);
 	clear_stack (&tmp_stack);
 	return (FALSE);
@@ -210,5 +211,6 @@
 
 	/* there are no valid unary string operators */
-	push_error ("syntax error: no valid string unary ops");
+	snprintf (line, 512, "invalid operand for unary operator %s (undefined value?)", stack[i].name);
+	push_error (line);
 	clear_stack (&tmp_stack);
 	return (FALSE);
