Mercurial > octave
diff src/mappers.cc @ 10391:59e34bcdff13
implement built-in erfcx
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Thu, 04 Mar 2010 09:35:38 +0100 |
parents | cd96d29c5efa |
children | 2a8b1db1e2ca |
line wrap: on
line diff
--- a/src/mappers.cc Wed Mar 03 13:01:44 2010 -0500 +++ b/src/mappers.cc Thu Mar 04 09:35:38 2010 +0100 @@ -632,6 +632,32 @@ */ +DEFUN (erfcx, args, , + "-*- texinfo -*-\n\ +@deftypefn {Mapping Function} {} erfcx (@var{z})\n\ +Computes the scaled complementary error function,\n\ +@tex\n\ +$z^2 (1 - {\\rm erf} (z))$.\n\ +@end tex\n\ +@ifnottex\n\ +@code{z^2*(1 - erf (@var{z}))}.\n\ +@end ifnottex\n\ +@seealso{erfc, erf, erfinv}\n\ +@end deftypefn") +{ + octave_value retval; + if (args.length () == 1) + retval = args(0).erfcx (); + else + print_usage (); + + return retval; +} + +/* + +*/ + DEFUN (exp, args, , "-*- texinfo -*-\n\ @deftypefn {Mapping Function} {} exp (@var{x})\n\