comparison src/data.cc @ 9141:c1fff751b5a8

Update section 17.1 (Utility Functions) of arith.txi Split section into "Exponents and Logarithms" and "Utility Functions" Use Tex in many more of the doc strings for pretty printing in pdf format.
author Rik <rdrider0-list@yahoo.com>
date Mon, 20 Apr 2009 17:16:09 -0700
parents be150a172010
children b38c45d1fc08
comparison
equal deleted inserted replaced
9140:c309e028185e 9141:c1fff751b5a8
733 733
734 734
735 735
736 DEFUN (hypot, args, , 736 DEFUN (hypot, args, ,
737 "-*- texinfo -*-\n\ 737 "-*- texinfo -*-\n\
738 @deftypefn {Mapping Function} {} hypot (@var{x}, @var{y})\n\ 738 @deftypefn {Built-in Function} {} hypot (@var{x}, @var{y})\n\
739 Compute square-root of the squares of @var{x} and @var{y}\n\ 739 Compute the element-by-element square root of the squares of @var{x} and\n\
740 element-by-element. This equivalent to @code{sqrt (@var{x}.^ 2 + @var{y}\n\ 740 @var{y}. This is equivalent to @code{sqrt (@var{x}.^ 2 + @var{y}\n\
741 .^ 2)}, but calculated in a manner that avoids overflows for large\n\ 741 .^ 2)}, but calculated in a manner that avoids overflows for large\n\
742 values of @var{x} or @var{y}.\n\ 742 values of @var{x} or @var{y}.\n\
743 @end deftypefn") 743 @end deftypefn")
744 { 744 {
745 octave_value retval; 745 octave_value retval;
991 991
992 DEFUN (log2, args, nargout, 992 DEFUN (log2, args, nargout,
993 "-*- texinfo -*-\n\ 993 "-*- texinfo -*-\n\
994 @deftypefn {Mapping Function} {} log2 (@var{x})\n\ 994 @deftypefn {Mapping Function} {} log2 (@var{x})\n\
995 @deftypefnx {Mapping Function} {[@var{f}, @var{e}] =} log2 (@var{x})\n\ 995 @deftypefnx {Mapping Function} {[@var{f}, @var{e}] =} log2 (@var{x})\n\
996 Compute the base-2 logarithm for each element of @var{x}.\n\ 996 Compute the base-2 logarithm of each element of @var{x}.\n\
997 If called with two output arguments, split @var{x} to\n\ 997 \n\
998 binary mantissa and exponent so that @code{1/2 <= abs(f) < 1} and\n\ 998 If called with two output arguments, split @var{x} into\n\
999 @var{e} is an integer. If @code{x = 0}, @code{f = e = 0}.\n\ 999 binary mantissa and exponent so that\n\
1000 @seealso{log, log10, log2, exp}\n\ 1000 @iftex\n\
1001 @tex\n\
1002 ${1 \\over 2} \\le \\left| f \\right| < 1$\n\
1003 @end tex\n\
1004 @end iftex\n\
1005 @ifnottex\n\
1006 @code{1/2 <= abs(f) < 1}\n\
1007 @end ifnottex\n\
1008 and @var{e} is an integer. If @code{x = 0}, @code{f = e = 0}.\n\
1009 @seealso{pow2, log, log10, exp}\n\
1001 @end deftypefn") 1010 @end deftypefn")
1002 { 1011 {
1003 octave_value_list retval; 1012 octave_value_list retval;
1004 1013
1005 if (args.length () == 1) 1014 if (args.length () == 1)
1079 DEFUN (fmod, args, , 1088 DEFUN (fmod, args, ,
1080 "-*- texinfo -*-\n\ 1089 "-*- texinfo -*-\n\
1081 @deftypefn {Mapping Function} {} fmod (@var{x}, @var{y})\n\ 1090 @deftypefn {Mapping Function} {} fmod (@var{x}, @var{y})\n\
1082 Compute the floating point remainder of dividing @var{x} by @var{y}\n\ 1091 Compute the floating point remainder of dividing @var{x} by @var{y}\n\
1083 using the C library function @code{fmod}. The result has the same\n\ 1092 using the C library function @code{fmod}. The result has the same\n\
1084 sign as @var{x}. If @var{y} is zero, the result is implementation-defined.\n\ 1093 sign as @var{x}. If @var{y} is zero, the result is implementation-dependent.\n\
1094 @seealso{mod, rem}\n\
1085 @end deftypefn") 1095 @end deftypefn")
1086 { 1096 {
1087 octave_value retval; 1097 octave_value retval;
1088 1098
1089 int nargin = args.length (); 1099 int nargin = args.length ();