erf.cpp   erf.cpp 
/************************************************************************** *** /************************************************************************** ***
* erf.cpp Blitz++ Vector<T> example * erf.cpp Blitz++ Vector<T> example
* **************************************************************************
* $Id: erf.cpp,v 1.3 2002/07/02 19:49:02 jcumming Exp $ ***/
*
* $Log: erf.cpp,v $
* Revision 1.3 2002/07/02 19:49:02 jcumming
* Updated to use new header file names that avoid capitalization.
*
* Revision 1.2 2001/01/26 18:30:50 tveldhui
* More source code reorganization to reduce compile times.
*
* Revision 1.1.1.1 2000/06/19 12:26:17 tveldhui
* Imported sources
*
* Revision 1.1 1997/07/16 19:38:23 tveldhui
* Update: Alpha release 0.2 (Arrays)
*
**************************************************************************
***
*/
#include <blitz/blitz.h> #include <blitz/blitz.h>
#ifdef BZ_HAVE_IEEE_MATH #ifdef BZ_HAVE_IEEE_MATH
#include <blitz/vector-et.h> #include <blitz/vector-et.h>
// This program uses erf(), which is not part of ANSI C/C++. In order // This program uses erf(), which is not part of ANSI C/C++. In order
// to compile this example, you must have a Posix or X/Open-compliant // to compile this example, you must have a Posix or X/Open-compliant
// compiler, and #define an appropriate source level (-D_XOPEN_SOURCE or // compiler, and #define an appropriate source level (-D_XOPEN_SOURCE or
// -D_POSIX_SOURCE). You will need to run compiler/bzconfig with // -D_POSIX_SOURCE). You will need to run compiler/bzconfig with
// this flag defined as well, so that the Blitz++ flag BZ_HAVE_IEEE_MATH // this flag defined as well, so that the Blitz++ flag BZ_HAVE_IEEE_MATH
// will be set properly in <blitz/config.h>. // will be set properly in <blitz/config.h>.
#ifdef BZ_NAMESPACES BZ_USING_NAMESPACE(blitz)
using namespace blitz;
#endif
int main() int main()
{ {
// Integrate the expression // Integrate the expression
// x // x
// 2 / // 2 /
// ------- | exp(-t^2) dt // ------- | exp(-t^2) dt
// sqrt(Pi) / // sqrt(Pi) /
// 0 // 0
// to estimate the error function erf(x) on the interval [0,1]. // to estimate the error function erf(x) on the interval [0,1].
 End of changes. 2 change blocks. 
22 lines changed or deleted 3 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/