changeset 29970:106aa8480569 stable

cbrt: Clarify that function errors for non-real input. * libinterp/corefcn/mappers.cc (Fcbrt): Clarify that function errors for non-real input.
author Markus Mützel <markus.muetzel@gmx.de>
date Mon, 16 Aug 2021 14:57:45 +0200
parents 116dbaba5a74
children 2af7339fa6d1 d3298a58049e
files libinterp/corefcn/mappers.cc
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/mappers.cc	Sat Jul 31 16:07:45 2021 +0200
+++ b/libinterp/corefcn/mappers.cc	Mon Aug 16 14:57:45 2021 +0200
@@ -474,10 +474,12 @@
 DEFUN (cbrt, args, ,
        doc: /* -*- texinfo -*-
 @deftypefn {} {} cbrt (@var{x})
-Compute the real cube root of each element of @var{x}.
+Compute the real-valued cube root of each element of @var{x}.
 
 Unlike @code{@var{x}^(1/3)}, the result will be negative if @var{x} is
 negative.
+
+If any element of @var{x} is complex, @code{cbrt} aborts with an error.
 @seealso{nthroot}
 @end deftypefn */)
 {