comparison scripts/specfun/nthroot.m @ 11587:c792872f8942

all script files: untabify and strip trailing whitespace
author John W. Eaton <jwe@octave.org>
date Thu, 20 Jan 2011 17:35:29 -0500
parents 34bb8d38f19f
children 619fbc98a7eb
comparison
equal deleted inserted replaced
11586:12df7854fa7c 11587:c792872f8942
20 ## Original version by Paul Kienzle distributed as free software in the 20 ## Original version by Paul Kienzle distributed as free software in the
21 ## public domain. 21 ## public domain.
22 22
23 ## -*- texinfo -*- 23 ## -*- texinfo -*-
24 ## @deftypefn {Function File} {} nthroot (@var{x}, @var{n}) 24 ## @deftypefn {Function File} {} nthroot (@var{x}, @var{n})
25 ## 25 ##
26 ## Compute the n-th root of @var{x}, returning real results for real 26 ## Compute the n-th root of @var{x}, returning real results for real
27 ## components of @var{x}. For example: 27 ## components of @var{x}. For example:
28 ## 28 ##
29 ## @example 29 ## @example
30 ## @group 30 ## @group
31 ## nthroot (-1, 3) 31 ## nthroot (-1, 3)
32 ## @result{} -1 32 ## @result{} -1
33 ## (-1) ^ (1 / 3) 33 ## (-1) ^ (1 / 3)
34 ## @result{} 0.50000 - 0.86603i 34 ## @result{} 0.50000 - 0.86603i
35 ## @end group 35 ## @end group
36 ## @end example 36 ## @end example
37 ## 37 ##
38 ## @var{n} must be a scalar. If @var{n} is not an even integer and @var{X} has 38 ## @var{n} must be a scalar. If @var{n} is not an even integer and @var{X} has
39 ## negative entries, an error is produced. 39 ## negative entries, an error is produced.
40 ## @seealso{realsqrt, sqrt, cbrt} 40 ## @seealso{realsqrt, sqrt, cbrt}
41 ## @end deftypefn 41 ## @end deftypefn
42 42