view test/bug-38565.tst @ 20154:45565ecec019

New function psi to compute the digamma function. * libinterp/corefcn/psi.cc: file for the new function file (implementation is actually in lo-specfun.cc). * liboctave/numeric/lo-specfun.cc, liboctave/numeric/lo-specfun.h: added implementation of the digamma (psi )function. Partly based on diGamma() from XLiFE++ 1.1 (file gammaFunctions.cpp which was previously melina++) which is under GPL 3 or later and why D. Martin is also added to copyright. * doc/interpreter/arith.txi: add function entry to the manual. * libinterp/corefcn/module.mk: add file to the build system. * NEWS: note new function.
author Carnë Draug <carandraug@octave.org>
date Sun, 15 Mar 2015 03:31:16 +0000
parents b9e510a1f308
children
line wrap: on
line source

%!function r = f (x)
%!  if (ischar (x))
%!    r = x;
%!  else
%!    error ("expecting character string");
%!  endif
%!endfunction

%!assert (eval ("f 10;"), "10");