comparison liboctave/numeric/lo-specfun.h @ 20155:1fae49e34a1a

psi: add support for complex numbers. * libinterp/corefcn/psi.cc: add logic and input check to support complex numbers (implementation is in lo-specfun.cc). Add tests. * liboctave/numeric/lo-specfun.cc, liboctave/numeric/lo-specfun.h: add template specialization to psi() for std::complex. It is mostly taken from the implementation in XLiFE++ (also under GPLv3+, see b03c7cccadc2 commit message for more details).
author Carnë Draug <carandraug@octave.org>
date Sun, 15 Mar 2015 06:30:09 +0000
parents 45565ecec019
children 65e22ba879f0
comparison
equal deleted inserted replaced
20154:45565ecec019 20155:1fae49e34a1a
663 ellipj (const Complex& u, double m, Complex& sn, Complex& cn, Complex& dn, 663 ellipj (const Complex& u, double m, Complex& sn, Complex& cn, Complex& dn,
664 double& err); 664 double& err);
665 665
666 template<class T> 666 template<class T>
667 extern OCTAVE_API T psi (const T& z); 667 extern OCTAVE_API T psi (const T& z);
668 668 template<class T>
669 #endif 669 extern OCTAVE_API std::complex<T> psi (const std::complex<T>& z);
670
671 #endif