changeset 5261:90a9058de7e8

[project @ 2005-03-31 02:48:38 by jwe]
author jwe
date Thu, 31 Mar 2005 02:48:39 +0000
parents deed800e7bef
children 57b5030f5737
files liboctave/CSparse.cc liboctave/ChangeLog liboctave/dSparse.cc liboctave/lo-mappers.cc liboctave/lo-mappers.h src/ChangeLog src/defun-int.h src/ls-mat5.cc src/mappers.cc
diffstat 9 files changed, 93 insertions(+), 119 deletions(-) [+]
line wrap: on
line diff
--- a/liboctave/CSparse.cc	Wed Mar 30 23:18:58 2005 +0000
+++ b/liboctave/CSparse.cc	Thu Mar 31 02:48:39 2005 +0000
@@ -237,7 +237,7 @@
 	      if (octave_is_NaN_or_NA (tmp))
 		continue;
 
-	      double abs_tmp = ::abs (tmp);
+	      double abs_tmp = std::abs (tmp);
 
 	      if (octave_is_NaN_or_NA (abs_max) || abs_tmp > abs_max)
 		{
@@ -302,7 +302,7 @@
 
 	      if (octave_is_NaN_or_NA (tmp))
 		continue;
-	      else if (ix == -1 || ::abs(tmp) > ::abs(elem (ir, ix)))
+	      else if (ix == -1 || std::abs(tmp) > std::abs(elem (ir, ix)))
 		idx_arg.elem (ir) = j;
 	    }
 	}
@@ -389,7 +389,7 @@
 	      if (octave_is_NaN_or_NA (tmp))
 		continue;
 
-	      double abs_tmp = ::abs (tmp);
+	      double abs_tmp = std::abs (tmp);
 
 	      if (octave_is_NaN_or_NA (abs_min) || abs_tmp < abs_min)
 		{
@@ -454,7 +454,7 @@
 
 	      if (octave_is_NaN_or_NA (tmp))
 		continue;
-	      else if (ix == -1 || ::abs(tmp) < ::abs(elem (ir, ix)))
+	      else if (ix == -1 || std::abs(tmp) < std::abs(elem (ir, ix)))
 		idx_arg.elem (ir) = j;
 	    }
 	}
@@ -787,7 +787,7 @@
 	  double dmax = 0., dmin = octave_Inf; 
 	  for (int i = 0; i < nr; i++)
 	    {
-	      double tmp = ::abs(data(i));
+	      double tmp = std::abs(data(i));
 	      if (tmp > dmax)
 		dmax = tmp;
 	      if (tmp < dmin)
@@ -866,7 +866,7 @@
 	  double dmax = 0., dmin = octave_Inf; 
 	  for (int i = 0; i < nr; i++)
 	    {
-	      double tmp = ::abs(data(i));
+	      double tmp = std::abs(data(i));
 	      if (tmp > dmax)
 		dmax = tmp;
 	      if (tmp < dmin)
@@ -916,7 +916,7 @@
 	  double dmax = 0., dmin = octave_Inf; 
 	  for (int i = 0; i < nr; i++)
 	    {
-	      double tmp = ::abs(data(i));
+	      double tmp = std::abs(data(i));
 	      if (tmp > dmax)
 		dmax = tmp;
 	      if (tmp < dmin)
@@ -996,7 +996,7 @@
 	  double dmax = 0., dmin = octave_Inf; 
 	  for (int i = 0; i < nr; i++)
 	    {
-	      double tmp = ::abs(data(i));
+	      double tmp = std::abs(data(i));
 	      if (tmp > dmax)
 		dmax = tmp;
 	      if (tmp < dmin)
@@ -1044,7 +1044,7 @@
 	    {
 	      double atmp = 0.;
 	      for (int i = cidx(j); i < cidx(j+1); i++)
-		atmp += ::abs(data(i));
+		atmp += std::abs(data(i));
 	      if (atmp > anorm)
 		anorm = atmp;
 	    }
@@ -1116,7 +1116,7 @@
 		  double atmp = 0;
 		  for (int i = 0; i < j+1; i++)
 		    {
-		      atmp += ::abs(work[i]);
+		      atmp += std::abs(work[i]);
 		      work[i] = 0.;
 		    }
 		  if (atmp > ainvnorm)
@@ -1179,7 +1179,7 @@
 		  double atmp = 0;
 		  for (int i = 0; i < j+1; i++)
 		    {
-		      atmp += ::abs(work[i]);
+		      atmp += std::abs(work[i]);
 		      work[i] = 0.;
 		    }
 		  if (atmp > ainvnorm)
@@ -1253,7 +1253,7 @@
 	    {
 	      double atmp = 0.;
 	      for (int i = cidx(j); i < cidx(j+1); i++)
-		atmp += ::abs(data(i));
+		atmp += std::abs(data(i));
 	      if (atmp > anorm)
 		anorm = atmp;
 	    }
@@ -1356,7 +1356,7 @@
 		  double atmp = 0;
 		  for (int i = 0; i < j+1; i++)
 		    {
-		      atmp += ::abs(work[i]);
+		      atmp += std::abs(work[i]);
 		      work[i] = 0.;
 		    }
 		  if (atmp > ainvnorm)
@@ -1444,7 +1444,7 @@
 		  double atmp = 0;
 		  for (int i = 0; i < j+1; i++)
 		    {
-		      atmp += ::abs(work[i]);
+		      atmp += std::abs(work[i]);
 		      work[i] = 0.;
 		    }
 		  if (atmp > ainvnorm)
@@ -1518,7 +1518,7 @@
 	    {
 	      double atmp = 0.;
 	      for (int i = cidx(j); i < cidx(j+1); i++)
-		atmp += ::abs(data(i));
+		atmp += std::abs(data(i));
 	      if (atmp > anorm)
 		anorm = atmp;
 	    }
@@ -1591,7 +1591,7 @@
 		  double atmp = 0;
 		  for (int i = 0; i < j+1; i++)
 		    {
-		      atmp += ::abs(work[i]);
+		      atmp += std::abs(work[i]);
 		      work[i] = 0.;
 		    }
 		  if (atmp > ainvnorm)
@@ -1654,7 +1654,7 @@
 		  double atmp = 0;
 		  for (int i = 0; i < j+1; i++)
 		    {
-		      atmp += ::abs(work[i]);
+		      atmp += std::abs(work[i]);
 		      work[i] = 0.;
 		    }
 		  if (atmp > ainvnorm)
@@ -1728,7 +1728,7 @@
 	    {
 	      double atmp = 0.;
 	      for (int i = cidx(j); i < cidx(j+1); i++)
-		atmp += ::abs(data(i));
+		atmp += std::abs(data(i));
 	      if (atmp > anorm)
 		anorm = atmp;
 	    }
@@ -1831,7 +1831,7 @@
 		  double atmp = 0;
 		  for (int i = 0; i < j+1; i++)
 		    {
-		      atmp += ::abs(work[i]);
+		      atmp += std::abs(work[i]);
 		      work[i] = 0.;
 		    }
 		  if (atmp > ainvnorm)
@@ -1919,7 +1919,7 @@
 		  double atmp = 0;
 		  for (int i = 0; i < j+1; i++)
 		    {
-		      atmp += ::abs(work[i]);
+		      atmp += std::abs(work[i]);
 		      work[i] = 0.;
 		    }
 		  if (atmp > ainvnorm)
@@ -1993,7 +1993,7 @@
 	    {
 	      double atmp = 0.;
 	      for (int i = cidx(j); i < cidx(j+1); i++)
-		atmp += ::abs(data(i));
+		atmp += std::abs(data(i));
 	      if (atmp > anorm)
 		anorm = atmp;
 	    }
@@ -2066,7 +2066,7 @@
 		  double atmp = 0;
 		  for (int i = 0; i < j+1; i++)
 		    {
-		      atmp += ::abs(work[i]);
+		      atmp += std::abs(work[i]);
 		      work[i] = 0.;
 		    }
 		  if (atmp > ainvnorm)
@@ -2130,7 +2130,7 @@
 		  double atmp = 0;
 		  for (int i = j; i < nr; i++)
 		    {
-		      atmp += ::abs(work[i]);
+		      atmp += std::abs(work[i]);
 		      work[i] = 0.;
 		    }
 		  if (atmp > ainvnorm)
@@ -2204,7 +2204,7 @@
 	    {
 	      double atmp = 0.;
 	      for (int i = cidx(j); i < cidx(j+1); i++)
-		atmp += ::abs(data(i));
+		atmp += std::abs(data(i));
 	      if (atmp > anorm)
 		anorm = atmp;
 	    }
@@ -2307,7 +2307,7 @@
 		  double atmp = 0;
 		  for (int i = 0; i < j+1; i++)
 		    {
-		      atmp += ::abs(work[i]);
+		      atmp += std::abs(work[i]);
 		      work[i] = 0.;
 		    }
 		  if (atmp > ainvnorm)
@@ -2396,7 +2396,7 @@
 		  double atmp = 0;
 		  for (int i = j; i < nr; i++)
 		    {
-		      atmp += ::abs(work[i]);
+		      atmp += std::abs(work[i]);
 		      work[i] = 0.;
 		    }
 		  if (atmp > ainvnorm)
@@ -2472,7 +2472,7 @@
 	    {
 	      double atmp = 0.;
 	      for (int i = cidx(j); i < cidx(j+1); i++)
-		atmp += ::abs(data(i));
+		atmp += std::abs(data(i));
 	      if (atmp > anorm)
 		anorm = atmp;
 	    }
@@ -2545,7 +2545,7 @@
 		  double atmp = 0;
 		  for (int i = 0; i < j+1; i++)
 		    {
-		      atmp += ::abs(work[i]);
+		      atmp += std::abs(work[i]);
 		      work[i] = 0.;
 		    }
 		  if (atmp > ainvnorm)
@@ -2609,7 +2609,7 @@
 		  double atmp = 0;
 		  for (int i = j; i < nr; i++)
 		    {
-		      atmp += ::abs(work[i]);
+		      atmp += std::abs(work[i]);
 		      work[i] = 0.;
 		    }
 		  if (atmp > ainvnorm)
@@ -2684,7 +2684,7 @@
 	    {
 	      double atmp = 0.;
 	      for (int i = cidx(j); i < cidx(j+1); i++)
-		atmp += ::abs(data(i));
+		atmp += std::abs(data(i));
 	      if (atmp > anorm)
 		anorm = atmp;
 	    }
@@ -2787,7 +2787,7 @@
 		  double atmp = 0;
 		  for (int i = 0; i < j+1; i++)
 		    {
-		      atmp += ::abs(work[i]);
+		      atmp += std::abs(work[i]);
 		      work[i] = 0.;
 		    }
 		  if (atmp > ainvnorm)
@@ -2876,7 +2876,7 @@
 		  double atmp = 0;
 		  for (int i = j; i < nr; i++)
 		    {
-		      atmp += ::abs(work[i]);
+		      atmp += std::abs(work[i]);
 		      work[i] = 0.;
 		    }
 		  if (atmp > ainvnorm)
@@ -5959,7 +5959,7 @@
 
   for (int i = 0; i < nel; i++)
     {
-      double ip = imag (data (i));
+      double ip = std::imag (data (i));
       
       if (ip != 0.0 || lo_ieee_signbit (ip))
 	return false;
@@ -5980,15 +5980,15 @@
   if (nel == 0)
     return false;
 
-  max_val = real(data (0));
-  min_val = real(data (0));
+  max_val = std::real(data (0));
+  min_val = std::real(data (0));
 
   for (int i = 0; i < nel; i++)
     {
 	Complex val = data (i);
 
-	double r_val = real (val);
-	double i_val = imag (val);
+	double r_val = std::real (val);
+	double i_val = std::imag (val);
 
 	if (r_val > max_val)
 	  max_val = r_val;
@@ -6018,8 +6018,8 @@
     {
 	Complex val = data (i);
 
-	double r_val = real (val);
-	double i_val = imag (val);
+	double r_val = std::real (val);
+	double i_val = std::imag (val);
 
 	if (r_val > FLT_MAX
 	    || i_val > FLT_MAX
@@ -6100,7 +6100,7 @@
 
   for (int i = 0; i < nz; i++)
     {
-      retval.data (i) = ::abs (data (i));
+      retval.data (i) = std::abs (data (i));
       retval.ridx (i) = ridx (i);
     }
 
--- a/liboctave/ChangeLog	Wed Mar 30 23:18:58 2005 +0000
+++ b/liboctave/ChangeLog	Thu Mar 31 02:48:39 2005 +0000
@@ -1,8 +1,11 @@
 2005-03-30  John W. Eaton  <jwe@octave.org>
 
-	* liboctave/CColVector.cc, liboctave/CNDArray.cc,
-	liboctave/CRowVector.cc: Use std:: for Complex functions instead
-	of relying on wrappers from oct-cmplx.h.
+	* lo-mappers.cc (log10, tan, tanh): Delete functions.
+	* lo-mappers.h (log10, tan, tanh): Delete decls.
+
+	* CColVector.cc, CNDArray.cc, CRowVector.cc, CSparse.cc,
+	dSparse.cc: Use std:: for Complex functions instead of relying on
+	wrappers from oct-cmplx.h.
 
 	* oct-cmplx.h: Provide typedef only.
 
@@ -3309,7 +3312,7 @@
 
 2000-03-21  Ben Sapp  <bsapp@nua.lampf.lanl.gov>:
 
-	* liboctave/Makefile.in (liboctave.$(LIBEXT)): New target.
+	* Makefile.in (liboctave.$(LIBEXT)): New target.
 	(libraries): Depend only on library targets, not archive members.
 
 2000-03-17  John W. Eaton  <jwe@bevo.che.wisc.edu>
--- a/liboctave/dSparse.cc	Wed Mar 30 23:18:58 2005 +0000
+++ b/liboctave/dSparse.cc	Thu Mar 31 02:48:39 2005 +0000
@@ -506,7 +506,7 @@
 
   for (int i = 0; i < nz; i++)
     {
-      r.data(i) = real (a.data(i));
+      r.data(i) = std::real (a.data(i));
       r.ridx(i) = a.ridx(i);
     }
 
@@ -526,7 +526,7 @@
 
   for (int i = 0; i < nz; i++)
     {
-      r.data(i) = imag (a.data(i));
+      r.data(i) = std::imag (a.data(i));
       r.ridx(i) = a.ridx(i);
     }
 
@@ -3559,8 +3559,8 @@
 		      for (int i = 0; i < b_nr; i++)
 			{
 			  Complex c = b (i,j);
-			  Bx[i] = ::real (c);
-			  Bz[i] = ::imag (c);
+			  Bx[i] = std::real (c);
+			  Bz[i] = std::imag (c);
 			}
 
 
@@ -4211,8 +4211,8 @@
 		      for (int i = 0; i < b_nr; i++)
 			{
 			  Complex c = b (i,j);
-			  Bx[i] = ::real (c);
-			  Bz[i] = ::imag (c);
+			  Bx[i] = std::real (c);
+			  Bz[i] = std::imag (c);
 			}
 			  
 		      F77_XFCN (dpbtrs, DPBTRS, 
@@ -4326,8 +4326,8 @@
 		      for (int i = 0; i < nr; i++)
 			{
 			  Complex c = b (i, j);
-			  Bx[i] = ::real (c);
-			  Bz[i] = ::imag  (c);
+			  Bx[i] = std::real (c);
+			  Bz[i] = std::imag  (c);
 			}
 
 		      F77_XFCN (dgbtrs, DGBTRS, 
@@ -4455,8 +4455,8 @@
 		      for (int i = 0; i < b_nr; i++)
 			{
 			  Complex c = b (i,j);
-			  Bx[i] = ::real (c);
-			  Bz[i] = ::imag (c);
+			  Bx[i] = std::real (c);
+			  Bz[i] = std::imag (c);
 			}
 
 		      F77_XFCN (dpbtrs, DPBTRS, 
@@ -4603,8 +4603,8 @@
 		      for (int i = b.cidx(j); i < b.cidx(j+1); i++)
 			{
 			  Complex c = b.data(i);
-			  Bx[b.ridx(i)] = ::real (c);
-			  Bz[b.ridx(i)] = ::imag (c);
+			  Bx[b.ridx(i)] = std::real (c);
+			  Bz[b.ridx(i)] = std::imag (c);
 			}
 
 		      F77_XFCN (dgbtrs, DGBTRS, 
@@ -5083,8 +5083,8 @@
 		  for (int i = 0; i < b_nr; i++)
 		    {
 		      Complex c = b (i,j);
-		      Bx[i] = ::real (c);
-		      Bz[i] = ::imag (c);
+		      Bx[i] = std::real (c);
+		      Bz[i] = std::imag (c);
 		    }
 
 		  status = umfpack_di_solve (UMFPACK_A, Ap, Ai, Ax, 
@@ -5212,8 +5212,8 @@
 		  for (int i = 0; i < b_nr; i++)
 		    {
 		      Complex c = b (i,j);
-		      Bx[i] = ::real (c);
-		      Bz[i] = ::imag (c);
+		      Bx[i] = std::real (c);
+		      Bz[i] = std::imag (c);
 		    }
 
 		  status = umfpack_di_solve (UMFPACK_A, Ap, Ai, Ax, Xx,
--- a/liboctave/lo-mappers.cc	Wed Mar 30 23:18:58 2005 +0000
+++ b/liboctave/lo-mappers.cc	Thu Mar 31 02:48:39 2005 +0000
@@ -217,28 +217,6 @@
   return log ((1.0 + x) / (1.0 - x)) / 2.0;
 }
 
-#if !defined (CXX_ISO_COMPLIANT_LIBRARY)
-
-Complex
-log10 (const Complex& x)
-{
-  return M_LOG10E * log (x);
-}
-
-Complex
-tan (const Complex& x)
-{
-  return sin (x) / cos (x);
-}
-
-Complex
-tanh (const Complex& x)
-{
-  return sinh (x) / cosh (x);
-}
-
-#endif
-
 Complex
 ceil (const Complex& x)
 {
--- a/liboctave/lo-mappers.h	Wed Mar 30 23:18:58 2005 +0000
+++ b/liboctave/lo-mappers.h	Thu Mar 31 02:48:39 2005 +0000
@@ -50,12 +50,6 @@
 extern Complex atan (const Complex& x);
 extern Complex atanh (const Complex& x);
 
-#if !defined (CXX_ISO_COMPLIANT_LIBRARY)
-extern Complex log10 (const Complex& x);
-extern Complex tan (const Complex& x);
-extern Complex tanh (const Complex& x);
-#endif
-
 extern Complex ceil (const Complex& x);
 extern Complex fix (const Complex& x);
 extern Complex floor (const Complex& x);
--- a/src/ChangeLog	Wed Mar 30 23:18:58 2005 +0000
+++ b/src/ChangeLog	Thu Mar 31 02:48:39 2005 +0000
@@ -1,6 +1,10 @@
 2005-03-30  John W. Eaton  <jwe@octave.org>
 
-	* src/ov-complex.cc, src/ov-cx-mat.cc, src/xpow.cc: Use std:: for
+	* mappers.cc (install_mapper_functions): Use std:: as needed.
+	* defun-int.h (DEFUN_MAPPER_INTERNAL): Don't use X_CAST on
+	function pointer args.
+
+	* ov-complex.cc, ov-cx-mat.cc, xpow.cc, ls-mat5.cc: Use std:: for
 	Complex functions instead of relying on wrappers from oct-cmplx.h.
 
 	* oct-stream.cc (octave_scan): Initialize c1 to EOF.
@@ -627,7 +631,7 @@
 	* sighandlers.h, sighandlers.cc
 	(octave_child_list::octave_child_list_rep): New class.
 
-	* src/input.cc (gnu_readline, octave_gets, get_user_input):
+	* input.cc (gnu_readline, octave_gets, get_user_input):
 	Call OCTAVE_QUIT before doing anything.
 
 	* base-list.h (octave_base_list<T>::remove_if): New function.
@@ -2225,7 +2229,7 @@
 
 2004-04-15  David Bateman  <dbateman@free.fr>
 
-	* src/ov-ch-mat.h: convert_to_str_interal returns charNDArray.
+	* ov-ch-mat.h: convert_to_str_interal returns charNDArray.
 
 2004-04-12  John W. Eaton  <jwe@octave.org>
 
@@ -3747,13 +3751,13 @@
 
 	* ops.h (DEFNDUNOP_OP, DEFNDUNOP_FN, DEFNDBINOP_OP,
 	DEFNDBINOP_FN): New N-dimensional macros.
-	* src/OPERATORS/op-bm-bm.cc, src/OPERATORS/op-cm-cm.cc,
-	src/OPERATORS/op-cm-cs.cc, src/OPERATORS/op-cm-m.cc,
-	src/OPERATORS/op-cm-s.cc, src/OPERATORS/op-cs-cm.cc,
-	src/OPERATORS/op-cs-m.cc, src/OPERATORS/op-m-cm.cc,
-	src/OPERATORS/op-m-cs.cc, src/OPERATORS/op-m-m.cc,
-	src/OPERATORS/op-m-s.cc, src/OPERATORS/op-s-cm.cc,
-	src/OPERATORS/op-s-m.cc: Use N-dimensional macros as appropriate.
+	* OPERATORS/op-bm-bm.cc, OPERATORS/op-cm-cm.cc,
+	OPERATORS/op-cm-cs.cc, OPERATORS/op-cm-m.cc,
+	OPERATORS/op-cm-s.cc, OPERATORS/op-cs-cm.cc,
+	OPERATORS/op-cs-m.cc, OPERATORS/op-m-cm.cc,
+	OPERATORS/op-m-cs.cc, OPERATORS/op-m-m.cc,
+	OPERATORS/op-m-s.cc, OPERATORS/op-s-cm.cc,
+	OPERATORS/op-s-m.cc: Use N-dimensional macros as appropriate.
 
 	* DLD-FUNCTIONS/rand.cc (do_rand, Frand, Frandn):
 	Handle N-dimensions.
@@ -7011,7 +7015,7 @@
 2002-05-03  Cai Jianming  <caijianming@yahoo.co.uk>
 
 	* OPERATORS/op-cell.cc: New file.
-	* src/Makefile.in (OP_XSRC): Include it in the list.
+	* Makefile.in (OP_XSRC): Include it in the list.
 
 	* parse.y (cell): Return a cell type instead of Matrix type.
 
--- a/src/defun-int.h	Wed Mar 30 23:18:58 2005 +0000
+++ b/src/defun-int.h	Thu Mar 31 02:48:39 2005 +0000
@@ -240,12 +240,7 @@
 			      ch_map_flag, can_ret_cmplx_for_real, doc) \
   install_builtin_mapper \
     (new octave_mapper \
-     (X_CAST (octave_mapper::ch_mapper, ch_map), \
-      X_CAST (octave_mapper::d_b_mapper, d_b_map), \
-      X_CAST (octave_mapper::c_b_mapper, c_b_map), \
-      X_CAST (octave_mapper::d_d_mapper, d_d_map), \
-      X_CAST (octave_mapper::d_c_mapper, d_c_map), \
-      X_CAST (octave_mapper::c_c_mapper, c_c_map), \
+     (ch_map, d_b_map, c_b_map, d_d_map, d_c_map, c_c_map, \
       lo, hi, ch_map_flag, can_ret_cmplx_for_real, #name, doc))
 
 #endif /* ! MAKE_BUILTINS */
--- a/src/ls-mat5.cc	Wed Mar 30 23:18:58 2005 +0000
+++ b/src/ls-mat5.cc	Thu Mar 31 02:48:39 2005 +0000
@@ -1268,12 +1268,12 @@
 	  NDArray buf (dim_vector (nnz, 1));
 
 	  for (int i = 0; i < nnz; i++)
-	    buf (i) = ::real (m.data (i));
+	    buf (i) = std::real (m.data (i));
 
 	  write_mat5_array (os, buf, save_as_floats);
 
 	  for (int i = 0; i < nnz; i++)
-	    buf (i) = ::imag (m.data (i));
+	    buf (i) = std::imag (m.data (i));
 
 	  write_mat5_array (os, buf, save_as_floats);
 	}
--- a/src/mappers.cc	Wed Mar 30 23:18:58 2005 +0000
+++ b/src/mappers.cc	Thu Mar 31 02:48:39 2005 +0000
@@ -203,13 +203,13 @@
 Compute the inverse hyperbolic cosine of each element of @var{x}.\n\
 @end deftypefn");
 
-  DEFUN_MAPPER (angle, 0, 0, 0, arg, arg, 0, 0.0, 0.0, 0, 0,
+  DEFUN_MAPPER (angle, 0, 0, 0, arg, std::arg, 0, 0.0, 0.0, 0, 0,
     "-*- texinfo -*-\n\
 @deftypefn {Mapping Function} {} angle (@var{z})\n\
 See arg.\n\
 @end deftypefn");
 
-  DEFUN_MAPPER (arg, 0, 0, 0, arg, arg, 0, 0.0, 0.0, 0, 0,
+  DEFUN_MAPPER (arg, 0, 0, 0, arg, std::arg, 0, 0.0, 0.0, 0, 0,
     "-*- texinfo -*-\n\
 @deftypefn {Mapping Function} {} arg (@var{z})\n\
 @deftypefnx {Mapping Function} {} angle (@var{z})\n\
@@ -281,13 +281,13 @@
 @end deftypefn\n\
 @seealso{real and imag}");
 
-  DEFUN_MAPPER (cos, 0, 0, 0, cos, 0, cos, 0.0, 0.0, 0, 0,
+  DEFUN_MAPPER (cos, 0, 0, 0, cos, 0, std::cos, 0.0, 0.0, 0, 0,
     "-*- texinfo -*-\n\
 @deftypefn {Mapping Function} {} cos (@var{x})\n\
 Compute the cosine of each element of @var{x}.\n\
 @end deftypefn");
 
-  DEFUN_MAPPER (cosh, 0, 0, 0, cosh, 0, cosh, 0.0, 0.0, 0, 0,
+  DEFUN_MAPPER (cosh, 0, 0, 0, cosh, 0, std::cosh, 0.0, 0.0, 0, 0,
     "-*- texinfo -*-\n\
 @deftypefn {Mapping Function} {} cosh (@var{x})\n\
 Compute the hyperbolic cosine of each element of @var{x}.\n\
@@ -333,7 +333,7 @@
 \n\
 @seealso{erf and erfinv}");
 
-  DEFUN_MAPPER (exp, 0, 0, 0, exp, 0, exp, 0.0, 0.0, 0, 0,
+  DEFUN_MAPPER (exp, 0, 0, 0, exp, 0, std::exp, 0.0, 0.0, 0, 0,
     "-*- texinfo -*-\n\
 @deftypefn {Mapping Function} {} exp (@var{x})\n\
 Compute the exponential of @var{x}.  To compute the matrix exponential,\n\
@@ -542,7 +542,7 @@
 @end deftypefn\n\
 @seealso{gamma and gammai}");
 
-  DEFUN_MAPPER (log, 0, 0, 0, log, 0, log, 0.0, octave_Inf, 0, 1,
+  DEFUN_MAPPER (log, 0, 0, 0, log, 0, std::log, 0.0, octave_Inf, 0, 1,
     "-*- texinfo -*-\n\
 @deftypefn {Mapping Function} {} log (@var{x})\n\
 Compute the natural logarithm for each element of @var{x}.  To compute the\n\
@@ -550,7 +550,7 @@
 @end deftypefn\n\
 @seealso{log2, log10, logspace, and exp}");
 
-  DEFUN_MAPPER (log10, 0, 0, 0, log10, 0, log10, 0.0, octave_Inf, 0, 1,
+  DEFUN_MAPPER (log10, 0, 0, 0, log10, 0, std::log10, 0.0, octave_Inf, 0, 1,
     "-*- texinfo -*-\n\
 @deftypefn {Mapping Function} {} log10 (@var{x})\n\
 Compute the base-10 logarithm for each element of @var{x}.\n\
@@ -595,19 +595,19 @@
 For complex arguments, @code{sign} returns @code{x ./ abs (@var{x})}.\n\
 @end deftypefn");
 
-  DEFUN_MAPPER (sin, 0, 0, 0, sin, 0, sin, 0.0, 0.0, 0, 0,
+  DEFUN_MAPPER (sin, 0, 0, 0, sin, 0, std::sin, 0.0, 0.0, 0, 0,
     "-*- texinfo -*-\n\
 @deftypefn {Mapping Function} {} sin (@var{x})\n\
 Compute the sine of each element of @var{x}.\n\
 @end deftypefn");
 
-  DEFUN_MAPPER (sinh, 0, 0, 0, sinh, 0, sinh, 0.0, 0.0, 0, 0,
+  DEFUN_MAPPER (sinh, 0, 0, 0, sinh, 0, std::sinh, 0.0, 0.0, 0, 0,
     "-*- texinfo -*-\n\
 @deftypefn {Mapping Function} {} sinh (@var{x})\n\
 Compute the inverse hyperbolic sine of each element of @var{x}.\n\
 @end deftypefn");
 
-  DEFUN_MAPPER (sqrt, 0, 0, 0, sqrt, 0, sqrt, 0.0, octave_Inf, 0, 1,
+  DEFUN_MAPPER (sqrt, 0, 0, 0, sqrt, 0, std::sqrt, 0.0, octave_Inf, 0, 1,
     "-*- texinfo -*-\n\
 @deftypefn {Mapping Function} {} sqrt (@var{x})\n\
 Compute the square root of @var{x}.  If @var{x} is negative, a complex\n\
@@ -615,13 +615,13 @@
 @ref{Linear Algebra}.\n\
 @end deftypefn");
 
-  DEFUN_MAPPER (tan, 0, 0, 0, tan, 0, tan, 0.0, 0.0, 0, 0,
+  DEFUN_MAPPER (tan, 0, 0, 0, tan, 0, std::tan, 0.0, 0.0, 0, 0,
     "-*- texinfo -*-\n\
 @deftypefn {Mapping Function} {} tan (@var{z})\n\
 Compute tangent of each element of @var{x}.\n\
 @end deftypefn");
 
-  DEFUN_MAPPER (tanh, 0, 0, 0, tanh, 0, tanh, 0.0, 0.0, 0, 0,
+  DEFUN_MAPPER (tanh, 0, 0, 0, tanh, 0, std::tanh, 0.0, 0.0, 0, 0,
     "-*- texinfo -*-\n\
 @deftypefn {Mapping Function} {} tanh (@var{x})\n\
 Compute hyperbolic tangent of each element of @var{x}.\n\