Mercurial > hg > octave-nkf
diff src/data.cc @ 14169:c0ca47ab7641 stable
doc: Better explain which complex result is chosen by .^
* expr.txi: Explain which complex root is chosen and how to choose a
real one if preferred.
* data.cc (power): Ditto.
* help.cc (.^, .**): Ditto. (^, **): Suggest using real-valued functions.
author | Jordi Gutiérrez Hermoso <jordigh@octave.org> |
---|---|
date | Sun, 08 Jan 2012 15:24:53 -0500 |
parents | 72c96de7a403 |
children | 2ced2f59f523 |
line wrap: on
line diff
--- a/src/data.cc +++ b/src/data.cc @@ -5599,9 +5599,13 @@ "-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} power (@var{x}, @var{y})\n\ Return the element-by-element operation of @var{x} raised to the\n\ -@var{y} power.\n\ +@var{y} power. If several complex results are possible,\n\ +returns the one with smallest nonnegative argument (angle). Use\n\ +@code{realpow}, @code{realsqrt}, @code{cbrt}, or @code{nthroot} if a\n\ +real result is preferred.\n\ +\n\ This function and @w{@xcode{x .^ y}} are equivalent.\n\ -@seealso{mpower}\n\ +@seealso{mpower, realpow, realsqrt, cbrt, nthroot}\n\ @end deftypefn") { return binary_op_defun_body (octave_value::op_el_pow, args);