Mercurial > hg > octave-lyh
comparison liboctave/numeric/lo-specfun.h @ 15696:2fac72a256ce
Add complex erf,erfc,erfcx,erfi,dawson routines from Faddeeva package.
* libinterp/corefcn/mappers.cc: Add erfi and dawson mapper functions,
and add complex-argument test cases for erf, erfc, erfcx, erfi, and
dawson.
* libinterp/octave-value/ov-base.cc, libinterp/octave-value/ov-base.h:
Add erfi and dawson mapper functions.
* libinterp/octave-value/ov-complex.cc, libinterp/octave-value/ov-cx-mat.cc,
libinterp/octave-value/ov-cx-sparse.cc, libinterp/octave-value/ov-float.cc,
libinterp/octave-value/ov-flt-complex.cc,
libinterp/octave-value/ov-flt-cx-mat.cc,
libinterp/octave-value/ov-flt-re-mat.cc,
libinterp/octave-value/ov-re-mat.c,
libinterp/octave-value/ov-re-sparse.cc,
libinterp/octave-value/ov-scalar.cc,
libinterp/octave-value/ov.h:
Support erf, erfc, erfcx, erfi, and dawson mapper functions for
real and complex matrices and scalars.
* liboctave/cruft/Faddeeva/Faddeeva.cc, liboctave/cruft/Faddeeva/Faddeeva.hh:
liboctave/cruft/Faddeeva/module.mk, liboctave/cruft/Makefile.am:
Add Faddeeva package (from http://ab-initio.mit.edu/Faddeeva) to
libcruft, to provide the various complex-argument error functions.
* liboctave/numeric/lo-specfun.cc, liboctave/numeric/lo-specfun.h:
Add complex-argument erf, erfc, erfcx, erfi, and dawson functions
to liboctave API. Delete previous real-argument erfcx implementation
in favor of Faddeeva::erfcx (which seems to be slightly faster
in gcc/x86-64 benchmarks, with similar accuracy).
* doc/interpreter/arith.txi: Include erfi and dawson documentation.
author | Steven G. Johnson <stevenj@alum.mit.edu> |
---|---|
date | Tue, 27 Nov 2012 23:39:54 -0500 |
parents | 648dabbb4c6b |
children | 578805a293e5 |
comparison
equal
deleted
inserted
replaced
15683:806ea52af230 | 15696:2fac72a256ce |
---|---|
54 #endif | 54 #endif |
55 | 55 |
56 #if !defined (HAVE_ERF) | 56 #if !defined (HAVE_ERF) |
57 extern OCTAVE_API double erf (double); | 57 extern OCTAVE_API double erf (double); |
58 #endif | 58 #endif |
59 extern OCTAVE_API Complex erf (const Complex& x); | |
60 extern OCTAVE_API FloatComplex erf (const FloatComplex& x); | |
59 | 61 |
60 #if !defined (HAVE_ERFC) | 62 #if !defined (HAVE_ERFC) |
61 extern OCTAVE_API double erfc (double); | 63 extern OCTAVE_API double erfc (double); |
62 #endif | 64 #endif |
65 extern OCTAVE_API Complex erfc (const Complex& x); | |
66 extern OCTAVE_API FloatComplex erfc (const FloatComplex& x); | |
63 | 67 |
64 #if !defined (HAVE_ACOSHF) | 68 #if !defined (HAVE_ACOSHF) |
65 extern OCTAVE_API float acoshf (float); | 69 extern OCTAVE_API float acoshf (float); |
66 #endif | 70 #endif |
67 | 71 |
576 extern OCTAVE_API float erfinv (float x); | 580 extern OCTAVE_API float erfinv (float x); |
577 | 581 |
578 extern OCTAVE_API double erfcinv (double x); | 582 extern OCTAVE_API double erfcinv (double x); |
579 extern OCTAVE_API float erfcinv (float x); | 583 extern OCTAVE_API float erfcinv (float x); |
580 | 584 |
585 extern OCTAVE_API float erfcx (float x); | |
581 extern OCTAVE_API double erfcx (double x); | 586 extern OCTAVE_API double erfcx (double x); |
582 extern OCTAVE_API float erfcx (float x); | 587 extern OCTAVE_API Complex erfcx (const Complex& x); |
588 extern OCTAVE_API FloatComplex erfcx (const FloatComplex& x); | |
589 | |
590 extern OCTAVE_API float erfi (float x); | |
591 extern OCTAVE_API double erfi (double x); | |
592 extern OCTAVE_API Complex erfi (const Complex& x); | |
593 extern OCTAVE_API FloatComplex erfi (const FloatComplex& x); | |
594 | |
595 extern OCTAVE_API float dawson (float x); | |
596 extern OCTAVE_API double dawson (double x); | |
597 extern OCTAVE_API Complex dawson (const Complex& x); | |
598 extern OCTAVE_API FloatComplex dawson (const FloatComplex& x); | |
583 | 599 |
584 extern OCTAVE_API double betaincinv (double x, double a, double b); | 600 extern OCTAVE_API double betaincinv (double x, double a, double b); |
585 extern OCTAVE_API Array<double> betaincinv (double x, double a, const Array<double>& b); | 601 extern OCTAVE_API Array<double> betaincinv (double x, double a, const Array<double>& b); |
586 extern OCTAVE_API Array<double> betaincinv (double x, const Array<double>& a, double b); | 602 extern OCTAVE_API Array<double> betaincinv (double x, const Array<double>& a, double b); |
587 extern OCTAVE_API Array<double> betaincinv (double x, const Array<double>& a, const Array<double>& b); | 603 extern OCTAVE_API Array<double> betaincinv (double x, const Array<double>& a, const Array<double>& b); |