Mercurial > hg > octave-nkf
diff liboctave/lo-specfun.h @ 7789:82be108cc558
First attempt at single precision tyeps
* * *
corrections to qrupdate single precision routines
* * *
prefer demotion to single over promotion to double
* * *
Add single precision support to log2 function
* * *
Trivial PROJECT file update
* * *
Cache optimized hermitian/transpose methods
* * *
Add tests for tranpose/hermitian and ChangeLog entry for new transpose code
author | David Bateman <dbateman@free.fr> |
---|---|
date | Sun, 27 Apr 2008 22:34:17 +0200 |
parents | 2df457529cfa |
children | e998e81224b5 |
line wrap: on
line diff
--- a/liboctave/lo-specfun.h +++ b/liboctave/lo-specfun.h @@ -35,6 +35,12 @@ class ComplexNDArray; class RowVector; class ComplexColumnVector; +class FloatMatrix; +class FloatComplexMatrix; +class FloatNDArray; +class FloatComplexNDArray; +class FloatRowVector; +class FloatComplexColumnVector; class Range; #if !defined (HAVE_ACOSH) @@ -57,20 +63,54 @@ extern OCTAVE_API double erfc (double); #endif +#if !defined (HAVE_ACOSHF) +extern OCTAVE_API float acoshf (float); +#endif + +#if !defined (HAVE_ASINHF) +extern OCTAVE_API float asinhf (float); +#endif + +#if !defined (HAVE_ATANHF) +extern OCTAVE_API float atanhf (float); +#endif + +#if !defined (HAVE_ERFF) +extern OCTAVE_API float erf (float); +#endif + +#if !defined (HAVE_ERFCF) +extern OCTAVE_API float erfc (float); +#endif + #if !defined (HAVE_EXPM1) extern OCTAVE_API double expm1 (double x); #endif extern OCTAVE_API Complex expm1 (const Complex& x); +#if !defined (HAVE_EXPM1F) +extern OCTAVE_API float expm1f (float x); +#endif +extern OCTAVE_API FloatComplex expm1f (const FloatComplex& x); + #if !defined (HAVE_LOG1P) extern OCTAVE_API double log1p (double x); #endif extern OCTAVE_API Complex log1p (const Complex& x); +#if !defined (HAVE_LOG1PF) +extern OCTAVE_API float log1pf (float x); +#endif +extern OCTAVE_API FloatComplex log1pf (const FloatComplex& x); + extern OCTAVE_API double xgamma (double x); extern OCTAVE_API double xlgamma (double x); extern OCTAVE_API Complex xlgamma (const Complex& x); +extern OCTAVE_API float xgamma (float x); +extern OCTAVE_API float xlgamma (float x); +extern OCTAVE_API FloatComplex xlgamma (const FloatComplex& x); + extern OCTAVE_API Complex besselj (double alpha, const Complex& x, bool scaled, octave_idx_type& ierr); @@ -257,6 +297,192 @@ besselh2 (const RowVector& alpha, const ComplexColumnVector& x, bool scaled, Array2<octave_idx_type>& ierr); +extern OCTAVE_API FloatComplex +besselj (float alpha, const FloatComplex& x, bool scaled, octave_idx_type& ierr); + +extern OCTAVE_API FloatComplex +bessely (float alpha, const FloatComplex& x, bool scaled, octave_idx_type& ierr); + +extern OCTAVE_API FloatComplex +besseli (float alpha, const FloatComplex& x, bool scaled, octave_idx_type& ierr); + +extern OCTAVE_API FloatComplex +besselk (float alpha, const FloatComplex& x, bool scaled, octave_idx_type& ierr); + +extern OCTAVE_API FloatComplex +besselh1 (float alpha, const FloatComplex& x, bool scaled, octave_idx_type& ierr); + +extern OCTAVE_API FloatComplex +besselh2 (float alpha, const FloatComplex& x, bool scaled, octave_idx_type& ierr); + +extern OCTAVE_API FloatComplexMatrix +besselj (float alpha, const FloatComplexMatrix& x, bool scaled, + Array2<octave_idx_type>& ierr); + +extern OCTAVE_API FloatComplexMatrix +bessely (float alpha, const FloatComplexMatrix& x, bool scaled, + Array2<octave_idx_type>& ierr); + +extern OCTAVE_API FloatComplexMatrix +besseli (float alpha, const FloatComplexMatrix& x, bool scaled, + Array2<octave_idx_type>& ierr); + +extern OCTAVE_API FloatComplexMatrix +besselk (float alpha, const FloatComplexMatrix& x, bool scaled, + Array2<octave_idx_type>& ierr); + +extern OCTAVE_API FloatComplexMatrix +besselh1 (float alpha, const FloatComplexMatrix& x, bool scaled, + Array2<octave_idx_type>& ierr); + +extern OCTAVE_API FloatComplexMatrix +besselh2 (float alpha, const FloatComplexMatrix& x, bool scaled, + Array2<octave_idx_type>& ierr); + +extern OCTAVE_API FloatComplexMatrix +besselj (const FloatMatrix& alpha, const FloatComplex& x, bool scaled, + Array2<octave_idx_type>& ierr); + +extern OCTAVE_API FloatComplexMatrix +bessely (const FloatMatrix& alpha, const FloatComplex& x, bool scaled, + Array2<octave_idx_type>& ierr); + +extern OCTAVE_API FloatComplexMatrix +besseli (const FloatMatrix& alpha, const FloatComplex& x, bool scaled, + Array2<octave_idx_type>& ierr); + +extern OCTAVE_API FloatComplexMatrix +besselk (const FloatMatrix& alpha, const FloatComplex& x, bool scaled, + Array2<octave_idx_type>& ierr); + +extern OCTAVE_API FloatComplexMatrix +besselh1 (const FloatMatrix& alpha, const FloatComplex& x, bool scaled, + Array2<octave_idx_type>& ierr); + +extern OCTAVE_API FloatComplexMatrix +besselh2 (const FloatMatrix& alpha, const FloatComplex& x, bool scaled, + Array2<octave_idx_type>& ierr); + +extern OCTAVE_API FloatComplexMatrix +besselj (const FloatMatrix& alpha, const FloatComplexMatrix& x, bool scaled, + Array2<octave_idx_type>& ierr); + +extern OCTAVE_API FloatComplexMatrix +bessely (const FloatMatrix& alpha, const FloatComplexMatrix& x, bool scaled, + Array2<octave_idx_type>& ierr); + +extern OCTAVE_API FloatComplexMatrix +besseli (const FloatMatrix& alpha, const FloatComplexMatrix& x, bool scaled, + Array2<octave_idx_type>& ierr); + +extern OCTAVE_API FloatComplexMatrix +besselk (const FloatMatrix& alpha, const FloatComplexMatrix& x, bool scaled, + Array2<octave_idx_type>& ierr); + +extern OCTAVE_API FloatComplexMatrix +besselh1 (const FloatMatrix& alpha, const FloatComplexMatrix& x, bool scaled, + Array2<octave_idx_type>& ierr); + +extern OCTAVE_API FloatComplexMatrix +besselh2 (const FloatMatrix& alpha, const FloatComplexMatrix& x, bool scaled, + Array2<octave_idx_type>& ierr); + +extern OCTAVE_API FloatComplexNDArray +besselj (float alpha, const FloatComplexNDArray& x, bool scaled, + ArrayN<octave_idx_type>& ierr); + +extern OCTAVE_API FloatComplexNDArray +bessely (float alpha, const FloatComplexNDArray& x, bool scaled, + ArrayN<octave_idx_type>& ierr); + +extern OCTAVE_API FloatComplexNDArray +besseli (float alpha, const FloatComplexNDArray& x, bool scaled, + ArrayN<octave_idx_type>& ierr); + +extern OCTAVE_API FloatComplexNDArray +besselk (float alpha, const FloatComplexNDArray& x, bool scaled, + ArrayN<octave_idx_type>& ierr); + +extern OCTAVE_API FloatComplexNDArray +besselh1 (float alpha, const FloatComplexNDArray& x, bool scaled, + ArrayN<octave_idx_type>& ierr); + +extern OCTAVE_API FloatComplexNDArray +besselh2 (float alpha, const FloatComplexNDArray& x, bool scaled, + ArrayN<octave_idx_type>& ierr); + +extern OCTAVE_API FloatComplexNDArray +besselj (const FloatNDArray& alpha, const FloatComplex& x, bool scaled, + ArrayN<octave_idx_type>& ierr); + +extern OCTAVE_API FloatComplexNDArray +bessely (const FloatNDArray& alpha, const FloatComplex& x, bool scaled, + ArrayN<octave_idx_type>& ierr); + +extern OCTAVE_API FloatComplexNDArray +besseli (const FloatNDArray& alpha, const FloatComplex& x, bool scaled, + ArrayN<octave_idx_type>& ierr); + +extern OCTAVE_API FloatComplexNDArray +besselk (const FloatNDArray& alpha, const FloatComplex& x, bool scaled, + ArrayN<octave_idx_type>& ierr); + +extern OCTAVE_API FloatComplexNDArray +besselh1 (const FloatNDArray& alpha, const FloatComplex& x, bool scaled, + ArrayN<octave_idx_type>& ierr); + +extern OCTAVE_API FloatComplexNDArray +besselh2 (const FloatNDArray& alpha, const FloatComplex& x, bool scaled, + ArrayN<octave_idx_type>& ierr); + +extern OCTAVE_API FloatComplexNDArray +besselj (const FloatNDArray& alpha, const FloatComplexNDArray& x, bool scaled, + ArrayN<octave_idx_type>& ierr); + +extern OCTAVE_API FloatComplexNDArray +bessely (const FloatNDArray& alpha, const FloatComplexNDArray& x, bool scaled, + ArrayN<octave_idx_type>& ierr); + +extern OCTAVE_API FloatComplexNDArray +besseli (const FloatNDArray& alpha, const FloatComplexNDArray& x, bool scaled, + ArrayN<octave_idx_type>& ierr); + +extern OCTAVE_API FloatComplexNDArray +besselk (const FloatNDArray& alpha, const FloatComplexNDArray& x, bool scaled, + ArrayN<octave_idx_type>& ierr); + +extern OCTAVE_API FloatComplexNDArray +besselh1 (const FloatNDArray& alpha, const FloatComplexNDArray& x, bool scaled, + ArrayN<octave_idx_type>& ierr); + +extern OCTAVE_API FloatComplexNDArray +besselh2 (const FloatNDArray& alpha, const FloatComplexNDArray& x, bool scaled, + ArrayN<octave_idx_type>& ierr); + +extern OCTAVE_API FloatComplexMatrix +besselj (const FloatRowVector& alpha, const FloatComplexColumnVector& x, bool scaled, + Array2<octave_idx_type>& ierr); + +extern OCTAVE_API FloatComplexMatrix +bessely (const FloatRowVector& alpha, const FloatComplexColumnVector& x, bool scaled, + Array2<octave_idx_type>& ierr); + +extern OCTAVE_API FloatComplexMatrix +besseli (const FloatRowVector& alpha, const FloatComplexColumnVector& x, bool scaled, + Array2<octave_idx_type>& ierr); + +extern OCTAVE_API FloatComplexMatrix +besselk (const FloatRowVector& alpha, const FloatComplexColumnVector& x, bool scaled, + Array2<octave_idx_type>& ierr); + +extern OCTAVE_API FloatComplexMatrix +besselh1 (const FloatRowVector& alpha, const FloatComplexColumnVector& x, bool scaled, + Array2<octave_idx_type>& ierr); + +extern OCTAVE_API FloatComplexMatrix +besselh2 (const FloatRowVector& alpha, const FloatComplexColumnVector& x, bool scaled, + Array2<octave_idx_type>& ierr); + extern OCTAVE_API Complex airy (const Complex& z, bool deriv, bool scaled, octave_idx_type& ierr); extern OCTAVE_API Complex biry (const Complex& z, bool deriv, bool scaled, octave_idx_type& ierr); @@ -272,6 +498,21 @@ extern OCTAVE_API ComplexNDArray biry (const ComplexNDArray& z, bool deriv, bool scaled, ArrayN<octave_idx_type>& ierr); +extern OCTAVE_API FloatComplex airy (const FloatComplex& z, bool deriv, bool scaled, octave_idx_type& ierr); +extern OCTAVE_API FloatComplex biry (const FloatComplex& z, bool deriv, bool scaled, octave_idx_type& ierr); + +extern OCTAVE_API FloatComplexMatrix +airy (const FloatComplexMatrix& z, bool deriv, bool scaled, Array2<octave_idx_type>& ierr); + +extern OCTAVE_API FloatComplexMatrix +biry (const FloatComplexMatrix& z, bool deriv, bool scaled, Array2<octave_idx_type>& ierr); + +extern OCTAVE_API FloatComplexNDArray +airy (const FloatComplexNDArray& z, bool deriv, bool scaled, ArrayN<octave_idx_type>& ierr); + +extern OCTAVE_API FloatComplexNDArray +biry (const FloatComplexNDArray& z, bool deriv, bool scaled, ArrayN<octave_idx_type>& ierr); + extern OCTAVE_API double betainc (double x, double a, double b); extern OCTAVE_API Matrix betainc (double x, double a, const Matrix& b); extern OCTAVE_API Matrix betainc (double x, const Matrix& a, double b); @@ -291,6 +532,25 @@ extern OCTAVE_API NDArray betainc (const NDArray& x, const NDArray& a, double b); extern OCTAVE_API NDArray betainc (const NDArray& x, const NDArray& a, const NDArray& b); +extern OCTAVE_API float betainc (float x, float a, float b); +extern OCTAVE_API FloatMatrix betainc (float x, float a, const FloatMatrix& b); +extern OCTAVE_API FloatMatrix betainc (float x, const FloatMatrix& a, float b); +extern OCTAVE_API FloatMatrix betainc (float x, const FloatMatrix& a, const FloatMatrix& b); + +extern OCTAVE_API FloatNDArray betainc (float x, float a, const FloatNDArray& b); +extern OCTAVE_API FloatNDArray betainc (float x, const FloatNDArray& a, float b); +extern OCTAVE_API FloatNDArray betainc (float x, const FloatNDArray& a, const FloatNDArray& b); + +extern OCTAVE_API FloatMatrix betainc (const FloatMatrix& x, float a, float b); +extern OCTAVE_API FloatMatrix betainc (const FloatMatrix& x, float a, const FloatMatrix& b); +extern OCTAVE_API FloatMatrix betainc (const FloatMatrix& x, const FloatMatrix& a, float b); +extern OCTAVE_API FloatMatrix betainc (const FloatMatrix& x, const FloatMatrix& a, const FloatMatrix& b); + +extern OCTAVE_API FloatNDArray betainc (const FloatNDArray& x, float a, float b); +extern OCTAVE_API FloatNDArray betainc (const FloatNDArray& x, float a, const FloatNDArray& b); +extern OCTAVE_API FloatNDArray betainc (const FloatNDArray& x, const FloatNDArray& a, float b); +extern OCTAVE_API FloatNDArray betainc (const FloatNDArray& x, const FloatNDArray& a, const FloatNDArray& b); + extern OCTAVE_API double gammainc (double x, double a, bool& err); extern OCTAVE_API Matrix gammainc (double x, const Matrix& a); extern OCTAVE_API Matrix gammainc (const Matrix& x, double a); @@ -306,6 +566,21 @@ return gammainc (x, a, err); } +extern OCTAVE_API float gammainc (float x, float a, bool& err); +extern OCTAVE_API FloatMatrix gammainc (float x, const FloatMatrix& a); +extern OCTAVE_API FloatMatrix gammainc (const FloatMatrix& x, float a); +extern OCTAVE_API FloatMatrix gammainc (const FloatMatrix& x, const FloatMatrix& a); + +extern OCTAVE_API FloatNDArray gammainc (float x, const FloatNDArray& a); +extern OCTAVE_API FloatNDArray gammainc (const FloatNDArray& x, float a); +extern OCTAVE_API FloatNDArray gammainc (const FloatNDArray& x, const FloatNDArray& a); + +inline float gammainc (float x, float a) +{ + bool err; + return gammainc (x, a, err); +} + #endif /*